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

Two queries about the PRTG API

Votes:

0

Hi,

I have two queries about the PRTG API:

  1. When we retrieve data, we can see that it is returned with the corresponding timezone offset (depending on the PRTG machine location). How can we get what that offset is? My point is that we need to convert it to UTC in order to use it in another tool and if we do not know the offset, that would pose an issue.
  2. In the documentation I can see that for messages we have the following message date filters available for use:
    • filter_drel
    • filter_dstart
    • filter_dend

Our needs require to use the second one in order to create a collection that will use a dynamic parameter for collecting messages (and metrics if possible) from a date/time point on. However for the life of me I can't figure out how to do that as everytime I try to use this parameter, I just get all messages. I have tried the following so far:

filter_dstart=<epoch_timestamp>
filter_dstart=<MM/dd/yyyy hh:mm:ss AM/PM>      //this is how the datetime columns are returned, so I tried it
filter_dstart=42934.2687622801                          //this is how the raw datetime columns are returned

The filter was not applied, so after noticing in the docs some examples like "filter_xyz=@above(value)", I tried this as well:

  • filter_dstart=@above(<epoch_timestamp>)
  • filter_dstart=@above(<MM/dd/yyyy hh:mm:ss AM/PM>)
  • filter_dstart=@above(42934.2687622801)

It made no difference too. Currently I have set up "filter_drel" instead and it works fine, but offers quite limited options.

All help on the matter is highly appreciated.

Thanks, Alex

api filter-dend filter-drel filter-dstart offset prtg timezone

Created on Jul 18, 2017 6:44:05 AM

Last change on Jul 19, 2017 10:03:42 AM by  Stephan Linke [Paessler Support]



1 Reply

Accepted Answer

Votes:

0

Hi Alex,

Thanks for your question and the detailed description of the situation! The actual syntax is filter_dstart=yyyy-mm-dd-hh-mm-ss&filter_dend=yyyy-mm-dd-hh-mm-ss

So, a working example would look like this: filter_dstart=2017-07-19-01-00-00&filter_dend=2017-07-19-03-00-00

As far as I'm aware, it will use the timezone of the user that executes the query.


Kind regards,
Stephan Linke, Tech Support Team

Created on Jul 19, 2017 11:42:30 AM by  Stephan Linke [Paessler Support]

Last change on Jul 19, 2017 11:42:47 AM by  Stephan Linke [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.