How to export a list of devices only?

Votes:

0

Your Vote:

Up

Down

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 by  Christopher Schremser (0) 1



9 Replies

Votes:

0

Your Vote:

Up

Down

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 by  PRTGToolsFamily (5,544) 3 2



Votes:

0

Your Vote:

Up

Down

Excellent. Is that documented somewhere?

Created on Jan 4, 2012 6:44:18 PM by  Christopher Schremser (0) 1



Votes:

0

Your Vote:

Up

Down

Hi Christopher,

Documentation can be found on the api.htm page of your own PRTG server or the api.htm of PRTG's demo server.

Regards,

Created on Jan 4, 2012 7:47:15 PM by  PRTGToolsFamily (5,544) 3 2



Votes:

0

Your Vote:

Up

Down

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 by  Jim Kirby (181) 2 1



Votes:

0

Your Vote:

Up

Down

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 by  PRTGToolsFamily (5,544) 3 2



Votes:

0

Your Vote:

Up

Down

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 by  Jim Kirby (181) 2 1



Votes:

0

Your Vote:

Up

Down

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 by  nathp (0) 1



Votes:

0

Your Vote:

Up

Down

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 by  cholobowicz (0)



Votes:

0

Your Vote:

Up

Down

@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] (3,860) 3 2



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.

PRTG
Network Monitor
Intuitive to Use.
Easy to manage.

150.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Visit
www.paessler.com

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