New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Checking a JSON result

Votes:

0

Your Vote:

Up

Down

I am checking JSON, I have a set values get returned:

{
    "status": {
        "code": 200,
        "text": "OK"
    },
    "response": {
        "authenticated": false,
        "results": 16
    },
    "results": {
        "accounts": "OK",
        "audioprompts": "OK",
        "authenticate": "OK",
        "calls": "OK",
        "conferences": "OK",
        "connectors": "OK",
        "contacts": "OK",
        "countries": "OK",
        "diverts": "OK",
        "documentation": "OK",
        "numbers": "OK",
        "queues": "OK",
        "sip": "OK",
        "sms": "OK",
        "status": "OK",
        "voicemail": "OK"
    }
}

I want to glean values or even just check that it is equal to above.

I am using an "HTTP XML/REST Value" sensor.

I guess the magic, would occur in XML Node (and optional property).

comapre json string

Created on Jan 27, 2016 9:21:49 AM by  GlassMan (0) 1



1 Reply

Votes:

0

Your Vote:

Up

Down

Hi,

Using the "HTTP XML/REST Value" sensor you can only check on numeric values in your JSON result.
So checking if code=200 or results=16 is no problem.

Checking if accounts=OK will unfortunately not work.

Created on Jan 27, 2016 11:03:37 AM by  PRTG Tools Family [prtgtoolsfamily.com] (12,865) 3 4



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.