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

Min and Max values from API with historic range

Votes:

0

Hi Paessler,

we have a sensor built that reports numbers of calls on our SIP lines as a channel each, i need to export this for the month of november with the min and max values. Is this possible via API ?

My current query is

/api/historicdata.xml?id=56709&max=1&sdate=2017-11-01-00-00-00&edate=2017-11-30-00-00-00

however this shows averages, which are entirely zeros even thought this is not accurate. however the only query ive found capable of Max/Min is the table.xml which as far as i can tell cannot do s/e dates

kindest sam

api historic-data maximum-value

Created on Dec 18, 2017 11:47:45 AM

Last change on Dec 18, 2017 2:26:42 PM by  Luciano Lingnau [Paessler]



5 Replies

Votes:

0

Hello Samuel,
thank you for your KB-Post.

Are you able to share the partial output of the API query you've performed? Just to make sure I understand the issue.

Created on Dec 19, 2017 11:41:20 AM by  Luciano Lingnau [Paessler]



Votes:

0

Sure,

/api/historicdata.xml?id=56709&max=1&sdate=2017-11-01-00-00-00&edate=2017-11-30-00-00-00

Returns the following, which is the correct time range however is showing 0 calls which is the average measurement not the max. We are providing line utilisation stats to a customer so need the maximum that they are using not the avg over a period.

Date Time	Date Time(RAW)	100000	100000(RAW)	100001	100001(RAW)	100002	100002(RAW)	100003	100003(RAW)	100004	100004(RAW)	100005
11/1/2017 12:00:00 AM - 12:05:00 AM	43040.00347	0 calls	0	0 calls	0	0 calls	0	0 calls	0	0 calls	0	0 calls
11/1/2017 12:05:00 AM - 12:10:00 AM	43040.00694	0 calls	0	0 calls	0	0 calls	0	0 calls	0	0 calls	0	0 calls
11/1/2017 12:10:00 AM - 12:15:00 AM	43040.01042	0 calls	0	0 calls	0	0 calls	0	0 calls	0	0 calls	0	0 calls
/api/table.csv?content=channels&columns=name,objid,lastvalue_,minimum,maximum&id=56709

returns the table view with the min and max columns, however not over a time range and we need last 30d

Channel	Channel(RAW)	ID	ID(RAW)	Last Value	Last Value(RAW)	Minimum	Minimum(RAW)	Maximum	Maximum(RAW)
100000	100000	2	2	0 calls	0	0 calls	0	11 calls	11
100001	100001	3	3	2 calls	2	0 calls	0	19 calls	19
100002	100002	4	4	0 calls	0	0 calls	0	10 calls	10
100003	100003	5	5	3 calls	3	0 calls	0	24 calls	24

I'm unable to find a way to add the start and end dates to the table query or to add the min/max to the historic output.

Created on Dec 19, 2017 12:06:35 PM

Last change on Dec 20, 2017 11:38:20 AM by  Luciano Lingnau [Paessler]



Votes:

0

Hello Samuel, thank you for your reply.

Ok, so the issue is basically the average. You're polling 5 minute averages, which can result in 0 calls over a period. This can actually be changed within the settings of the channel. There is a channel setting called Value Mode with the following possible values:

  • Average (Default)
  • Minimum
  • Maximum

By changing this to "Maximum", you should get the "peak" numbers of concurrent calls for any given period (instead of the average). The other option is to use &avg=0 in the URL, to poll the Raw readings instead of 5 minute averages.

Best Regards,
Luciano Lingnau [Paessler Support]

Created on Dec 20, 2017 11:42:58 AM by  Luciano Lingnau [Paessler]



Votes:

0

Hi Luciano,

We have the channel settings set to max already but they are still returning avg figures over api

Created on Dec 20, 2017 12:37:04 PM



Votes:

0

Hello Samuel,
thank you for your reply.

I will need to test this internally to confirm this. Are you able to confirm the precise PRTG version (visible on the footer of all pages or in the XML result of API calls) that you're currently running?

Best Regards,
Luciano Lingnau [Paessler Support]

Created on Dec 20, 2017 3:26:08 PM by  Luciano Lingnau [Paessler]




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.