cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to capture a color change in synthetic test?

I am monitoring a page using synthetic monitoring which shows services status. If they are up and running they are in GREEN color. If they are down they are in RED color. 

Each service name is in GreenBox and the server name where it runs.

Whenever the service fails it we see a message (string) on "Overall Status". and the synthetic test fails.

I am not able to capture which service failed. How can I capture which is RED in problem body of notification.

Please guide.

 

roushan_kumar1_1-1670612060341.png

 

 

3 REPLIES 3

HannahM
Dynatrace Champion
Dynatrace Champion

Is there something in the page source that can be used to confirm the colour? Possibly the colour is mentioned there. Is this for a public page that we could look at?

 

I see below in aspx response-

style="color:white;background-color:darkgreen;

Fab, so you could check for the "background-color:darkgreen" for the relevant service in a javascript event . Although, actually if you're looking for the ones that have failed, you might want to iterate through the services and see which one has a background color of red and you could then list any failed services in the failure message using api.fail()