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

API - Get historic data including percent used for all channels of sensor "WMI Free Disk Space"

Votes:

0

Hi

I'm a bit stuck constructing a specific api call and need some help.

I need at least the following data: Percent used/free, Bytes used or free, for all channels of a "WMI Free Disk Space" sensor for a specific date. The following html report contains the data I need:

/historicdata_html.htm?id=3035&sdate=2023-01-01-00-00-00&edate=2023-01-03-00-00-00&avg=0&pctavg=300&pctshow=false&pct=95&pctmode=false&hide=NaN

Using the api I've created the following query:

/api/historicdata.json?id=1005&avg=0&sdate=2023-01-01-00-00-00&edate=2023-01-03-00-00-00&usecaption=1&pctmode=true&apitoken=SECRET

This returns free bytes for all channels, but no percentage used/free.

datetime        : 01.01.2023 00:00:48
Summe           : 52349521920.0000
Freie Bytes C:  : 21604192256.0000
Freier Platz C: : 34.0000
Freie Bytes D:  : 30745329664.0000
Freier Platz D: : 19.0000
coverage        : 100 %

-

Adjusting the api call to match parameters from the html report:

/api/historicdata.json?id=3035&sdate=2023-01-01-00-00-00&edate=2023-01-03-00-00-00&avg=0&pctavg=300&pctshow=false&pct=95&pctmode=false&hide=NaN&apitoken=SECRET

returns only the percentage for one channel, without free bytes:

datetime     : 01.01.2023 00:00:42
datetime_raw : 44926.9588202778
value        : 2 %
value_raw    : 2.0000
coverage     : 100 %
coverage_raw : 10000

How do I construct an api call to get all channels of a sensor, including free bytes and % used?

Thanks in advance

api prtg wmi

Created on Jun 28, 2023 10:58:26 AM



1 Reply

Votes:

0

Hello, we would like to see how a regular report shows the information and compare it with the API report as well as some screenshots of your sensors. Therefore please send us all this information on a ticket at [email protected] so we can work better there.

Created on Jul 3, 2023 8:38:27 PM by  Jonathan Mena [Paessler Technical 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.