Custom 'to' date not working when viewing graphs

Tags: #<Tag:0x00007fe229f18ac0>


When viewing a graph, we have the option of selecting a ‘from’ and ‘to’ date, to view the graph for the timeframe we want. However, when choosing a custom to date, the result always reverts to the current date / time.

For example, if I set the from / to time like this for this graph:

It will return this:

[moved to new post]

The from date / time appears to work as expected.

I can manually add the epoch seconds to the URL at the end of the string, but not ideal. This has been happening for months at least, so not limited to a recent update. It’s been happening on all of our Ubuntu 16.04 monitoring servers, but appears to be working correctly on our Ubuntu 18.04 server.

Here’s the output from validate.php, and all affected servers return the same:

Component | Version
--------- | -------
LibreNMS  | 1.49-54-g3905423
DB Schema | 2019_02_10_220000_add_dates_to_fdb (132)
PHP       |
MySQL     | 5.7.25-0ubuntu0.16.04.2
RRDTool   | 1.5.5
SNMP      | NET-SNMP 5.7.3

[OK]    Composer Version: 1.8.4
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct

Any suggestions would be appreciated.


Not allowed to post more than one image, so here’s the followup:


@rjackson I’m not sure I understand what is not working properly. In your examples you are only supplying the “from” portion. If I click on a random graph it will default to “now” as the “to” value. You can adjust this to suite the time range you need. for example, this produces the following graph:


Before I click the update button, I select a ‘to’ date and time. However, when the page loads it doesn’t return the selected to time, rather the current time. The custom to variable isn’t being detected by the script and it’s not showing in the query string in the address bar.

Paying closer attention, this isn’t happening 100% of the time, but may be affecting specific graph types. The behavior is triggered looking at CCQ and TX/RX rates for other devices, but doesn’t trigger when looking at bits.

I’ll look into this closer. Thanks for the feedback.


Interesting. I’ll keep an eye out for this behavior too.