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 can I get a list of the most recently added devices?

Votes:

0

I need a list of the devices I added most recently...

api devices prtg recent

Created on Feb 9, 2010 3:23:53 PM by  Dirk Paessler [Founder Paessler AG] (11,025) 3 6

Last change on Feb 9, 2010 3:39:02 PM by  Daniel Zobel [Product Manager]



4 Replies

Accepted Answer

Votes:

0

This URL gives you a list of devices, sorted by "objectID" (descending)

https://prtg.ip/devices.htm?sortby=-objid&columns=objid,probegroupdevice,checkbox&id=0

Since new object IDs are always assigned in increasing numerical order you will get a list of the most recently added devices by sorting all devices using the descending object id.

  • Note 1: The "checkbox" column enables the multiedit feature for this list.
  • Note 2: The "id=" string can be used to filter the devices for a specific group.
  • Note 3: add the following strings to the "columns" parameter to get the sensor counts for each device &columns=objid,probegroupdevice,downsens,downacksens,upsens,warnsens,pausedsens,unusualsens,undefinedsens,checkbox

Created on Feb 9, 2010 3:29:30 PM by  Dirk Paessler [Founder Paessler AG] (11,025) 3 6

Last change on Feb 9, 2010 3:34:43 PM by  Dirk Paessler [Founder Paessler AG] (11,025) 3 6



Votes:

0

The desired functionality is realised with PRTG's application programming interface. For other HTTP API functions, please see Introduction to the PRTG API Interface

Created on Feb 9, 2010 3:38:48 PM by  Daniel Zobel [Product Manager]

Last change on Feb 12, 2010 8:59:23 AM by  Daniel Zobel [Product Manager]



Votes:

0

Unfortunately, the answer doesn't work because sortby incorrectly sorts objid alphabetically rather than numerically. For example:

https://172.16.2.235/api/table.xml?content=devices&output=xml&columns=objid&sortby=objid&username=admin&passhash=123456789 Results in: <?xml version="1.0" encoding="UTF-8"?> <devices totalcount="20" listend="1"> <prtg-version>18.4.46.1754</prtg-version> <item> <objid>10359</objid> </item> <item> <objid>10360</objid> </item> <item> <objid>2419</objid> </item> <item> <objid>2470</objid> </item> <item> <objid>2517</objid> </item> <item> <objid>2539</objid> </item> <item> <objid>2555</objid> </item> <item> <objid>2561</objid> </item> <item> <objid>2573</objid> </item> <item> <objid>2574</objid> </item> <item> <objid>2575</objid> </item> <item> <objid>2589</objid> </item> <item> <objid>2605</objid> </item> <item> <objid>2610</objid> </item> <item> <objid>2618</objid> </item> <item> <objid>2620</objid> </item> <item> <objid>2621</objid> </item> <item> <objid>3812</objid> </item> <item> <objid>40</objid> </item> <item> <objid>9445</objid> </item> </devices> As you can see, the most recent object is neither 10359 nor 9945, but 10360.

Created on Jan 29, 2019 3:25:08 AM



Votes:

0

Hi Alex,

Same as I wrote here :)

Kind regards,

Erhard

Created on Jan 29, 2019 7:33:29 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.