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


How to get a list of devices newly discovered/created in specific date range

Votes:

0

Your Vote:

Up

Down

I'm using the following API command to get a list of newly created devices/sensors: /api/table.csv?content=messages&columns=objid,datetime,type,name,device,status,message&filter_status=501

Is there a way to specify a date range (I see sdate and edate are used in the API for specific objects), but this doesn't seem to work for my command. (I know it'll only list the most recent 500 which can be altered)

Thanks!

api historic-data prtg

Created on Apr 12, 2019 1:12:26 PM by  craigj (0) 1



3 Replies

Accepted Answer

Votes:

2

Your Vote:

Up

Down

There are two ways the date can be specified

1. With an sdate/edate

filter_dend=2019-04-12-20-24-35&filter_dstart=2019-04-11-20-24-35

2. With a time period

filter_drel=yesterday

Possible values for filter_drel include today, yesterday, 7days, 30days, 12months, 6months

You can also do this way easier via PrtgAPI using PowerShell

C:\> Get-ObjectLog -Status Created -Start (Get-Date).AddDays(-1) -End (Get-Date).AddDays(-7)

DateTime               Id     Name      Device      Status         Message
--------               --     ----      ------      ------         -------
11/04/2019 10:28:10 PM 2091   exch-1    exch-1      Created        See history for details.
11/04/2019 10:22:38 PM 2090   dc-1      dc-1        Created        See history for details.

For more information on using Get-ObjectLog, see the wiki.

Regards,

lordmilko

Created on Apr 12, 2019 1:34:04 PM by  lordmilko (2,002) 2 1



Votes:

0

Your Vote:

Up

Down

God, I love that library :) Thanks, @lordmilko!

Created on Apr 12, 2019 6:41:23 PM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Perfect! Thanks lordmilko :)

Created on Apr 15, 2019 10:29:36 AM by  craigj (0) 1



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.