What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

How to interpret JSON-value as counter

Votes:

0

I have a json-http-request which gives me some kind of counter-value

I call http://xxx.mydomain.local/customers/served

which gives me

    {
        "data": {
            "customers_served": {
                "today": 34,
                "ever": 14800
            }
        }
    }

I am using the "HTTP XML/REST Value Sensor" and evaluate the node: /data/customers_served/ever I will get an ever increasing line as graphics because every day we get more customers served. This kind of graphics is good to display a temperature of a room.

But I am interested to look onto a graphic where I can see wether we are having a busy day or a day with low frequence of customers served. I am interested to see the *difference* to the last value in the graphics of PRTG. Is this possible to define somewhere?

Thanks, Richard

json performancecounter traffic

Created on Aug 6, 2017 6:01:29 PM



4 Replies

Votes:

0

Hello richard-lippmann,
thank you for your KB-Post.

What you're looking for is a Delta(counter) sensor/channel. However, this is currently not possible with the HTTP XML Rest Value sensor. I would advise you to measure/poll the /data/customers_served/today instead, this may give you the graph that you're looking for.

Best Regards,
Luciano Lingnau [Paessler Support]

Created on Aug 7, 2017 6:05:34 AM by  Luciano Lingnau [Paessler]

Last change on Nov 5, 2019 11:05:25 AM by  Timo Dambach [Paessler Support]



Votes:

0

The nearly same situation, 2 years later.

How can I show difference values with in Grapics? I can only find the absolute value shown.

I have a json-http-request which gives me some kind of counter-value

I call http://xxx.mydomain.local/customers/served

which gives me

    {
                "nr_of_accesses_ever": 14800

    }

I tried:

  • REST Custom Beta, with channelDiscovery.

The sensor found the channel $['nr_of_accesses_ever']. The values are shown as absolute values, but not as difference value like "accesses/minute".

I haven't found a difference-computation in the settings of the channel.

Greetings, Richard

Created on Nov 4, 2019 12:09:08 PM



Votes:

0

We have the same issue. Our bandwidth counter value is only accessible through a REST API. (rx_octets, tx_octets) How to build a bandwidth (bits/s) graph with a counter value from a JSON object. Is this still not possible?

Thanks, Benno

Created on Dec 10, 2019 2:50:54 PM



Votes:

0

Hi,

Maybe you can use the Rest Custom Sensor to monitor the desired information. You can find more information about the Rest Custom Sensor here.

Kind regards

Created on Dec 11, 2019 1:27:20 PM by  Marijan Horsky [Paessler Support]




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.