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
Article Comments
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.
Dec, 2017 - Permalink
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]
Dec, 2017 - Permalink
Hi Luciano,
We have the channel settings set to max already but they are still returning avg figures over api
Dec, 2017 - Permalink
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]
Dec, 2017 - Permalink
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.
Dec, 2017 - Permalink