[Xymon] API MONITORING

J.C. Cleaver cleaver at terabithia.org
Sun Jan 3 19:46:26 CET 2016


On Sun, January 3, 2016 10:10 am, eli wrote:
> Hello,
> Is there any Api monitoring add on for xymon, I have bash script to test
> if the API return 200 or not but I am looking if some better script may
> indictate the latency like the url test or any other open source app can
> do that.
> ThanksEli


Hi,

Can you clarify what you're trying to do? "API monitoring" is pretty generic.

If you're referring to an internal web service, then it depends on what
the URL that you're hitting is doing and why.

If you just want to check that you're getting a 200 response (and,
therefore, that you're getting a response in the first place), you don't
need an external script to do that. Check out the 'httpstatus' option in
hosts.cfg(5) -- xymonnet can do that for you.

If you have something more involved, it's common to use xymon to check a
specific "health page" on a site that exercises a DB or does whatever
site-appropriate backend validation is necessary. You can then use
xymonnet to poll that page, possibly paying closer attention to the HTTP
response code, and/or looking for a specific string in the body/header,
and/or comparing against an MD5 hash of the content...

More complicated checks are possible (combo alerts based off of one or
more separate checks, or dependency configurations as long as all the
components are being checked over TCP by the same xymonnet instance), but
depending on your site's needs that might be when it's time to start
looking at scripting up a custom xymon test as a solution.


HTH,
-jc




More information about the Xymon mailing list