• 0
Tom S-L

Three hosts, one service check?

Question

Hi,

I have a datasource that uses a regex to pull values out of some JSON and graphs numerous values. This runs on multiple hosts and the host goes critical if a particular value hits 0.

I don't want the individual servers to go critical, I'd like a service/website check to go critical if two out of three sites return the zero value in their JSON response.

I can write a datasource to check the JSON from each site but then I have to apply it to a host, or multiple hosts, and that defeats the point as I don't care if a single one goes away.

 

Is it possible to create a website check that takes in the JSON, extracts the data required, then passes it on to be used in another step which checks the next site, can I alert on values within the response? Is this even the right way to do it?

 

It would be great if a datasource could be run from a collector group rather than tied to a specific host!

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

@Tom S-L - using our internal website checks (with multiple collectors as checkpoints,) you could check the JSON path for that specific datapoint to make sure that '0' is not present - and alert if it is in fact found (on a certain number of collectors of those you have specified.) For example:

image.png.5e0e54f946546930fa45ef96e9854f7e.png

I think that should work for the use case you've outlined. And just in case it's helpful, here's a set of links to the more advanced creation of scripted internal website checks:

Cheers,

Kerry

Share this post


Link to post
Share on other sites
  • 0
On 6/20/2018 at 9:47 PM, Kerry DeVilbiss said:

@Tom S-L - using our internal website checks (with multiple collectors as checkpoints,) you could check the JSON path for that specific datapoint to make sure that '0' is not present - and alert if it is in fact found (on a certain number of collectors of those you have specified.) For example

I think that should work for the use case you've outlined. And just in case it's helpful, here's a set of links to the more advanced creation of scripted internal website checks:

Cheers,

Kerry

Thanks Kerry, this is a good start.

As stated I need to check datapoints from multiple servers and alert if, say, 2/3 had an issue. If I can pass the result on to more steps then this will work as a website check.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.