New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

300.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


Need to automatically export specific sensor data (csv,xml)

Votes:

0

Your Vote:

Up

Down

Hi

Hi need to export sensors data of a Specific Sensor "Group Name"(id=2853) with the following colums:

group,device,host,status

possibly colums separated by comma withouth the raw coulums.

Here is what actually i get:

query used: https://servername/api/table.csv?content=sensors&output=csvtable&columns=Group,device,status,filter_type=ping&id=2853

result "Group","Group(RAW)","Device","Device(RAW)","Host","Host(RAW)","Status","Status(RAW)","","(RAW)" "Ris-118","Ris-118","Colimatic-B-Node","Colimatic-B-Node","172.25.13.29","172.25.13.29","Up","3","Not found",""

what I need: Group,Device,Host,Status Ris-118,Colimatic-B-Node,172.25.13.29,Up

Can Somebody help me with the query?

Thanks for support

csvexport http-api prtg-network-monitor

Created on May 8, 2020 9:19:42 AM by  Angelo (0) 1



11 Replies

Votes:

0

Your Vote:

Up

Down

Dear Angelo,

please add the parameter "&noraw=1" to exclude the "raw" colums from the results. This parameter does not work for all API calls, but can be used for this one.

Please note, that you have a typo in your query. It should read (note the "&" instead of the comma, before "filter_type"): https://servername/api/table.csv?content=sensors&output=csvtable&columns=Group,device,status&filter_type=ping&id=2853

The full query would be: https://servername/api/table.csv?content=sensors&output=csvtable&columns=Group,device,status&filter_type=ping&id=2853&noraw=1


Kind Regards,
Matthias Kupfer - Team Tech Support

Created on May 8, 2020 1:51:40 PM by  Matthias Kupfer [Paessler Support]

Last change on May 8, 2020 1:58:34 PM by  Matthias Kupfer [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thanks Matthias for the reply.

Now with the "&noraw=1" raw column is excluded but the column "host" become empty...

here's the custom query:

https://servername/api/table.csv?content=sensors&output=csvtable&columns=Group,host,device,status&filter_type=ping&id=2853&noraw=1

here the output(host missing):

Group,"Host","Device","Status" Ris-118,"","Colimatic-B-Node","Up" Ris-118,"","Colimatic-Router","Up"

Am I missing something? Thanks for support

Created on May 11, 2020 6:52:56 AM by  Angelo (0) 1



Votes:

0

Your Vote:

Up

Down

Hi Angelo,

Update: I need to correct myself here. The "host" parameter indeed just works for devices, and not for sensors. It's therefore working as intended.


Kind regards,
Felix Saure, Tech Support Team

Created on May 11, 2020 9:34:58 AM by  Felix Saure [Paessler Support]

Last change on May 11, 2020 11:24:33 AM by  Felix Saure [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thanks Felix for the reply.

Host parameters appear in my csv if I include the RAW colums ..

Is there a way to insert in my list the IP address of the sensors without including raw colums?

here is my query: https://servername/api/table.csv?content=sensors&output=csvtable&columns=Group,host,device,status&filter_type=ping&id=2853&noraw=1

thanks

Created on May 11, 2020 12:09:34 PM by  Angelo (0) 1



Votes:

0

Your Vote:

Up

Down

Dear Angelo,

I'm afraid it's not. As you are interested in more granular API calls, you might want to check if it's possible with this PowerShell module: https://github.com/lordmilko/PrtgAPI


Kind regards,
Felix Saure, Tech Support Team

Created on May 12, 2020 4:04:15 AM by  Felix Saure [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thanks Felix for the support.

I move the noraw=1 option at the end ofthe url and the data now are perfect:

https://servername/api/table.csv?content=devices&output=csvtable&columns=group,device,host,status,filter_type=ping&id=2853&username=xxxx&passhash=1980399249&noraw=1

If possible I need to add to my query the time (date+hour) of the status "up" and "down", is there a way to do it? Just to understand when the down and up has been triggered

thanks

Created on May 12, 2020 10:36:19 AM by  Angelo (0) 1



Votes:

0

Your Vote:

Up

Down

Dear Angelo,

Just what is documented on the "Setup > PRTG API > Live Data" documentation.

For historic log entries, this query can be used:

/api/table.xml?content=messages&columns=objid,datetime,parent,type,name,status,message

But only for "messages", not with the filter for devices.


Kind regards,
Felix Saure, Tech Support Team

Created on May 13, 2020 7:37:04 AM by  Felix Saure [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Thanks for the reply.

According the live data guide for multiple objects: https://www.paessler.com/manuals/prtg/live_multiple_object_property_status

if i well understand the parameter needed is "Uptimesince" and "downtimesince" Description: Cumulated downtime/uptime of the sensor (in minutes/hours)

but when I put the parameter in my API query the column "Uptimesince" is empty: https://servername/api/table.csv?content=devices&output=csvtable&columns=group,device,host,status,uptimesince,filter_type=ping&id=2853&username=xxx&passhash=1980399249&noraw=1

Do u have any tips? Thanks for support

Created on May 13, 2020 9:08:27 AM by  Angelo (0) 1



Votes:

0

Your Vote:

Up

Down

Hello Angelo,

What's behind the ID 2853? This needs to be a probe or group to work.


Kind regards,
Felix Saure, Tech Support Team

Created on May 15, 2020 4:33:38 AM by  Felix Saure [Paessler Support]



Votes:

0

Your Vote:

Up

Down

hello,

ID 2853 is a device group ID.

regards

Created on May 15, 2020 6:35:57 AM by  Angelo (0) 1



Votes:

0

Your Vote:

Up

Down

Angelo,

Having another look at your query the "Filter_type" is not separated with "&". Please ensure that you follow all descriptions on the "Setup > PRTG API" page, we cannot provide extended support for typos here I'm afraid.


Kind regards,
Felix Saure, Tech Support Team

Created on May 15, 2020 12:40:05 PM by  Felix Saure [Paessler Support]



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.