Synthetics Monitoring

Hi Everyone,

We are using synthetics to monitor various applications, mostly TCP and HTTP plugins are being used to monitor Application and Web Services. We are trying to create a wrapper dashboard where it will show the status of all the monitors on a single visualizaton. For this we have tried using TSVB and Lens Metrics to show the number of monitors showing status as down, and we tried fetching only the last event for each monitor in the visualizaton however, we are struggling to do that. We tried Last Value option available under TSVB however it's not working as intended. Can someone guide how can we pull only the latest event for each monitor and show the count of it based on application of filter monitor.status: down.

1 Like

Hi @Ankita_Pachauri

Can you explain a bit more... and am not sure what count of it what the it refers to.

Suppose I have 10 services I am monitoring and if right now / last result
8 are up and 2 are down... is that what you want to show?

If not, can you describe what you want to see?

Also How often are you running the monitors? 10s , 30s, 1m a mix... curious

Hi Stephen,
This is exactly what we are trying to do, all monitors have a polling interval of 5 mins. We have three visualisations one showing the total number of monitors like 10, and the other two showing how many of these are up and how many of these are down, like 8 up and 2 down. However, there is almost always a mismatch as during the dashboard refresh all visualisations do not refresh simultaneously. The count thus could show like 8 up and 3 down if 1 additional service happens to go down, and would only come into sync after a few additional refreshes have been made.

@Ankita_Pachauri can you please share what filters are you using to get monitor status and what field are you using?

Hi,
I have three visualizations with the below logic

  1. To find total of errors for a particular application:
    cardinality of monitor.id
    monitor.status: down and tags: appname
  2. To find Total Application:
    cardinality of monitor.id
    tags:appname and tags: type of app
  3. To find unhealthy applications:
    cardinality of monitor.id
    monitor.status: down and tags: app name and tags: app type.

However I am using synthetics with fleet server policy which contains two servers. When I try to visualise these, it does not provide me the correct value all the time. Sometimes it shows and some times it does not show. If I refresh the dashboard the values keeps on changing automatically as if it is flapping.

Also, i would like to know what logic is applied to the synthesis default monitors which shows it as red or green?

@Ankita_Pachauri i have done a PR which will allow you to add Overview panel from Synthetics app as an embeddable, that will show status overview in dashboard [Synthetics] Status overview embeddable by shahzad31 · Pull Request #188807 · elastic/kibana · GitHub
this will ship in 8.16.0 !!

Unfortunately it's not easy to replicate it via simple lens viz, though you can try adding summary.final_attempt: true filter and also build viz per location, since monitors running from multiple locations, will not reflect true cardinality.

Another trick you can try is adding monitor.timespan range filter , essentially something like monitor.timespan: now - 15m to now to match only latest run of the document.

Best regards

Thanks it worked!!