Discussion:
Monitoring JSON Data
Robert Bell
2011-10-21 22:17:03 UTC
Permalink
Robert Bell [http://community.zenoss.org/people/wasguru] created the discussion

"Monitoring JSON Data"

To view the discussion, visit: http://community.zenoss.org/message/62088#62088

--------------------------------------------------------------
I'm looking for a way to monitor an  application that has a fairly elaborate JSON /status page. A simple http monitor is not going to cut it here, I'm not concerened with the availability of the URL being monitored. I want to capture elemets of that JSON as data points

just an example:

{

    "endpointConnectivityStatus": [
        {
            "status": "ok",
            "responseTimeMs": "208",
            "url": " https://someurl https://someurl"
        },
        {
            "status": "ok",
            "responseTimeMs": "65",
            "url": "another-url"
        }

I want to capture these response times and graph them for SLA purposes.

What are my options here? I've searched the forums/zenpacks but I just get hits on the JSON API
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62088#62088]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
j053ph4
2011-10-25 17:21:12 UTC
Permalink
j053ph4 [http://community.zenoss.org/people/j053ph4] created the discussion

"Re: Monitoring JSON Data"

To view the discussion, visit: http://community.zenoss.org/message/62142#62142

--------------------------------------------------------------
I may have to do this myself in a few days, i know that the check_http plugin will handle the HTTP POST, and has a -v (verbose) flag, so perhaps a wrapper script can be made to parse the output, or maybe one of the new zenoss "parser" plugins can be made to handle the debug output? 

If you're an Enterprise user, the "Web Transactions" zenpack may facilitate this as well (not sure about the custom data points).

Barring that, i'd just write a small script to handle it and output in "nagios" format:

message | datapoint=number datapoint2=number2
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62142#62142]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Robert Bell
2011-10-25 17:23:46 UTC
Permalink
Robert Bell [http://community.zenoss.org/people/wasguru] created the discussion

"Re: Monitoring JSON Data"

To view the discussion, visit: http://community.zenoss.org/message/62143#62143

--------------------------------------------------------------
Thats exactly what we've done. We have a python script returning data in Cacti format since the Nagios parser appears to be broken
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62143#62143]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
j053ph4
2011-10-25 17:25:10 UTC
Permalink
j053ph4 [http://community.zenoss.org/people/j053ph4] created the discussion

"Re: Monitoring JSON Data"

To view the discussion, visit: http://community.zenoss.org/message/62119#62119

--------------------------------------------------------------
Did you end up writing a wrapper for check-http or start from scratch?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62119#62119]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
jmp242
2011-10-25 17:48:57 UTC
Permalink
jmp242 [http://community.zenoss.org/people/jmp242] created the discussion

"Re: Monitoring JSON Data"

To view the discussion, visit: http://community.zenoss.org/message/62145#62145

--------------------------------------------------------------
The Nagios Parser works fine in 3.1 and 3.2.1. Do not run 3.2 without patches.

--
James Pulver
Information Technology Area Supervisor
LEPP Computer Group
Cornell University
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62145#62145]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Robert Bell
2011-10-25 17:52:36 UTC
Permalink
Robert Bell [http://community.zenoss.org/people/wasguru] created the discussion

"Re: Monitoring JSON Data"

To view the discussion, visit: http://community.zenoss.org/message/62147#62147

--------------------------------------------------------------
We wrote a script from scratch with the python json library, its pretty simple and just dumped the results in cacti, data1:value1 data2:value2 format.

I created a "fake" Device to run these endpoint monitors and it works except that with no host to get timezone from the graphs default to GMT which is annoying. Is theere a z property to se the time zone for a device?
--------------------------------------------------------------

Reply to this message by replying to this email -or- go to the discussion on Zenoss Community
[http://community.zenoss.org/message/62147#62147]

Start a new discussion in zenoss-users by email
[discussions-community-forums-zenoss--***@community.zenoss.org] -or- at Zenoss Community
[http://community.zenoss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2003]
Loading...