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


Article Comments

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


Jul, 2017 - Permalink