Custom 'to' date not working when viewing graphs

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       | 7.2.15-1+ubuntu16.04.1+deb.sury.org+1
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:
http://127.0.0.1:8000/graphs/to=2552848000/device=87/type=device_mempool/from=552561600/legend=yes/

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.

This behavior is still present.

====================================

Component Version
LibreNMS 1.59-39-g0b18ae7
DB Schema 2019_12_17_151314_add_invert_map_to_alert_rules (154)
PHP 7.2.24-1+ubuntu16.04.1+deb.sury.org+1
MySQL 5.7.28-0ubuntu0.16.04.2
RRDTool 1.5.5
SNMP NET-SNMP 5.7.3
====================================

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

When viewing the wireless rate and wireless ccq for a device, if I want the graphing to stop at a time / date before the current time/date, I must manually enter the to time into the query string.

Is this something I should report elsewhere? It’s been persistent for probably a year or more.

Thanks.

We have also noticed here Specific time periods in graphing past dates?

I’m encountering this exact issue as well. Interestingly enough, I was able to view about 10-12 different graphs with custom “to” values until I tried one a bit further back in time, when I suddenly started encountering this problem. From that point on, all graphs I try are having the same issue.

Tested in a couple of different browsers and from a couple of different devices, and it’s the same behavior across the board for me now.

The combination of the epoch converter tool from Chas and the last update from RJackson are a successful workaround for the time being.

Hello,
We’re seeing the same issue on our setup. I can modify the “from” but the “to” will always be the current time+date.

System Info:

Version 1.69-30-g3ffb79770 - Sat Nov 14 2020 20:24:50 GMT+0100
Database Schema 2020_11_02_164331_add_powerstate_enum_to_vminfo (193)
Web Server nginx/1.14.0
PHP 7.4.12
Python 3.6.9
MySQL 10.1.44-MariaDB-0ubuntu0.18.04.1
Laravel 8.11.2
RRDtool 1.7.0

Anyone knows how to fix it or has a good work-around?

BR
Claus

Hello

I’m still not sure what causes this, working ok at the moment for me, but it changes which might suggest it’s our environment, a few of us have reported similar and here’s a temp workaround here

#Specific time periods in graphing past dates?

Version21.8.0
Web Server |Apache/2.4.41 (Ubuntu)
PHP 7.3.9-1+ubuntu18.04.1+deb.sury.org+1
Python 3.8.10
MySQL 10.3.31-MariaDB-0ubuntu0.20.04.1
Laravel 8.49.2
RRDtool|1.7.2

Jut wanted to add that this is still happening for me as well. Did anyone ever find a fix or work around?

Hi Stuart,
I still also have this issue. If you need a work-around; when viewing graphs, click one of the predefined time slots (6 hours, 24 hours etc). Once the view opdates, you should see both the “from” and “to” in the web address. By modifying these numbers you can get the result you need. I’m not sure what the format is, so you need to fiddle with it.

BR
Claus

I have the same issue, the work-around works, has anyone found the solution ?