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 do I export a list of my sensors into an XML or CSV Format?

Votes:

0

I need to create a data dump for a list of my sensors. I would prefer to export the sensor list into an XML Format, but will settle for .CSV. I'm currently playing around with the API v2, but am having a difficult time in trying to figure out how and where to create the report. Can anyone assist me with this or have experience with creating such a report? It just needs to show the name of the device/sensor and it's associated IP.

ping prtg snmp

Created on Aug 2, 2022 4:17:47 PM



1 Reply

Votes:

0

Hello,

Thanks for contacting us.

I believe this might help you in a way to use it as reference:

$response = Invoke-RestMethod -Method 'POST' -Body '{"username": "prtgadmin", "password": "prtgadmin"}' 'http://prtgserver/api/v2/session'

$token = $response.token

$devices = Invoke-RestMethod -Method 'GET' -head @{"Authorization" = "Bearer $token"} 'http://prgtgserver/api/v2/devices'

$values = $devices | Select-Object -Property id,name,host,status_info | Export-Csv file.csv

Regards,

Miguel Aikens

Created on Aug 5, 2022 8:09:39 PM by  Miguel Aikens [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.