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 to export a list of devices only?

Votes:

0

I'm trying to export a list of devices that are in PRTG. How can I do this?

(I want to take that list and run comparisons against other data to make sure everything that should be in PRTG is there.)

devices export prtg

Created on Dec 30, 2011 9:10:21 PM



14 Replies

Accepted Answer

Votes:

5

This can be done using PRTG's API

/api/table.xml?content=devices&output=csvtable&columns=device,host

It will return something like:

"Device","Device(RAW)","Host","Host(RAW)"
"8001 Cisco 1800","8001 Cisco 1800","192.168.101.1","192.168.101.1"
"8002 Cisco 1800","8002 Cisco 1800","192.168.102.1","192.168.102.1"
"8003 Cisco 1800","8003 Cisco 1800","192.168.103.1","192.168.103.1"
"8004 Cisco 1800","8004 Cisco 1800","192.168.104.1","192.168.104.1"
"8005 Cisco 1800","8005 Cisco 1800","192.168.105.1","192.168.105.1"
"8006 Cisco 1800","8006 Cisco 1800","192.168.106.1","192.168.106.1"
"8008 Cisco 1800","8008 Cisco 1800","192.168.108.1","192.168.108.1"
....

Created on Jan 4, 2012 6:34:24 PM



Votes:

0

Excellent. Is that documented somewhere?

Created on Jan 4, 2012 6:44:18 PM



Votes:

0

Hi Christopher,

Documentation can be found in PRTG Manual: Application Programming Interface (API) Definition.

Regards,

Created on Jan 4, 2012 7:47:15 PM

Last change on Aug 7, 2018 8:16:02 AM by  Brandy Greger [Paessler Support]



Votes:

0

Close, but that would give me the listing of all 1000+ devices in our system without any clue as to which ones meet the search criteria and which do not. What I'm looking for is an API call or export capability which allows me to export a device list of only those devices which meet certain search criteria. Specifically, I need to export the list of all devices which match a search for "WMICPU" similar to this GUI URL:

https://prtgserver/search.htm?searchtext=wmicpu

In the "API" folder there is a file called "search.xml" which I have giving me some information but not what I"m looking for. Is there a way to use search.xml or table.xml to limit the resulting output to only those devices that match the search term?

Created on Jan 23, 2012 8:59:51 PM



Votes:

0

Hi Jim,

If I understand you correctly, you want to list devices that have sensors of the wmicpu type. You can do this using a API call to retrieve the complete sensor tree and do your own filtering afterwards.

/api/table.xml?content=sensortree&output=xml

Will give a complete listing of your installation. Run a XPATH query on the result to list only those devices that have a sensor of the type you are interested in..

Regards,

Created on Jan 24, 2012 10:00:25 AM



Votes:

1

Using XPATH and xmllint and paste I was able to finally produce the results I needed. Turns out we have about 25% more windows servers than we thought.

For future thinking, an advanced search function with export capabilities would sure be nice.. =)

Created on Jan 24, 2012 5:33:25 PM



Votes:

0

Adding ,objid to the end gives you the ID of the device in question as well. this was hugely helpful for me. ( I'd vote up the answer but don't have enough reputation)

Created on Jan 31, 2013 11:37:58 PM



Votes:

0

I've run the example above for my server:

/api/table.xml?content=devices&output=csvtable&columns=device,host

and I'm only getting about 500 entries. Is there a limit on the number of entries listed? I'm missing about 300+ devices.

Created on Nov 15, 2013 8:48:56 PM



Votes:

0

@cholobowicz: Just add the parameter count to your API call and provide a number of objects here.

/YOURCALL&count=1000

The default limitation is 500 objects which can be overwritten with above parameter.
Best regards

Created on Nov 18, 2013 6:58:52 AM by  Konstantin Wolff [Paessler Support]



Votes:

0

I get the list but the devices are arranged in the alphabetical order... i dont want that ... i want the devices in the CSV file to be in the same order in which they are present in the PRTG .

Created on Dec 10, 2014 10:07:07 AM



Votes:

0

@Shreyas Mohite: This is currently not possible. Sorry.
Best regards

Created on Dec 16, 2014 1:04:35 PM by  Konstantin Wolff [Paessler Support]



Votes:

0

Hello.

How to display a serial number? For Cisco switches for example. I can't find what column name to use.

Thank you Dmitri

Created on Jul 12, 2017 11:17:43 PM



Votes:

0

Hello dmitri_ruksha

For a value to be exported, it needs to be reported by the sensor. So, if the sensor reports your Cisco serial number the value can also be exported.

Created on Jul 13, 2017 6:30:04 AM



Votes:

0

Hello Dmitri,

Another possibility might be "System Information" tab on the device in PRTG. For most devices its serial number should show up there. This data is stored in json files in PRTG's data path, so you could use that to grab the data.

Kind regards,

Erhard

Created on Jul 14, 2017 9:24:36 AM by  Erhard Mikulik [Paessler 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.