Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamp BUG #3798

Closed
SinDeng opened this issue Sep 14, 2020 · 52 comments
Closed

Timestamp BUG #3798

SinDeng opened this issue Sep 14, 2020 · 52 comments
Labels
bug Undesired behaviour duplicate Duplicate of another issue

Comments

@SinDeng
Copy link

SinDeng commented Sep 14, 2020

Describe the bug

Timestamp Greater than or equal to 1600000000 cann't zoom for graph and graph_export

Cacti Version | 0.8.8a
Cacti OS | unix
SNMP Version | NET-SNMP version: 5.5
RRDTool Version | RRDTool 1.4.x
PHP Version | 5.3.3

Screenshots

Graph Time is HK Time

image

@SinDeng SinDeng added bug Undesired behaviour unverified Some days we don't have a clue labels Sep 14, 2020
@budiroots
Copy link

budiroots commented Sep 14, 2020

same problem, zooming graph with preset "last half hour" - "last 6 hours" is not working...

Untitled

@toobadsosad
Copy link

toobadsosad commented Sep 14, 2020

Same here, same problem... cannot use preset lower than LAST DAY... weirdly this also happen to my other cacti installation suddenly 0.8.8b, 0.8.8h, 1.1.16, and 1.2.6...

is there any external resource that may impact this?? as it affecting 4 seperate cacti installation altogether...

@huybacnguyen
Copy link

Same problem on all of my Cacti System: Cacti 0.8.x on Redhat 6.x
@toobadsosad : Do you also have problem on Cacti new: 1.2.16 ???. What's your version OS which Cacti 1.2.16 run on.

@ISekan
Copy link

ISekan commented Sep 14, 2020

The same on cacti 1.2.8 - #3797

@toobadsosad
Copy link

toobadsosad commented Sep 14, 2020

Same problem on all of my Cacti System: Cacti 0.8.x on Redhat 6.x
@toobadsosad : Do you also have problem on Cacti new: 1.2.16 ???. What's your version OS which Cacti 1.2.16 run on.

sorry my bad.. 1.2.6 not 1.2.16
my 1.2.6 on centos 8

CentOS Linux release 8.0.1905

@SinDeng
Copy link
Author

SinDeng commented Sep 14, 2020

@netniV @TheWitness Pls check this bug . Thanks

@ISekan
Copy link

ISekan commented Sep 14, 2020

Guys, I solved the problem to install new cacti & spine 1.2.14

@YasharZand
Copy link

Same happening here, to all of our monitoring servers. It started around 18 hours ago I guess. Cacti 0.8.8b.

@toobadsosad
Copy link

Same happening here, to all of our monitoring servers. It started around 18 hours ago I guess. Cacti 0.8.8b.

Timestamp Converter
1600000000
Is equivalent to:
09/13/2020 @ 12:26pm (UTC)

seems about that time

@huybacnguyen
Copy link

howto migrate rrd to other server: From cacti 0.8 to Cacti 1.2.13: 32 bits t0 64 bits.
Which tools!

@YasharZand
Copy link

Guys, I solved the problem to install new cacti & spine 1.2.14

Any headache less solution to upgrade from 0.8.8b to 1.2.14 and above?

@ISekan
Copy link

ISekan commented Sep 14, 2020

  1. Copy information from your cacti/include/config.php to new cacti
  2. Copy rra plugins scripts resource folders to new cacti
  3. Replace old cacti to new

Spine
tar -xzvf cacti-spine
./bootstrap
./configure
make
make install

@huybacnguyen
Copy link

huybacnguyen commented Sep 14, 2020

@Izmenoff you upgrade from cacti ??? to cacti 1.2.14.
because cacti 1.x require many thing on OS vs Cacti 0.8.x. i've tried import cacti.sql from old version (0.8), but cannot. many error.

  • Old Cacti have many rrd file have to continuos, and old Cacti is 32 bits. New Cacti 64s

@ISekan
Copy link

ISekan commented Sep 14, 2020

I have Centos7 64bit. upgrade form 1.2.8
Try to ask how it possible here https://forums.cacti.net/

@toobadsosad
Copy link

gonna wait a while for intermidiate solution (if any).. as need weathermap in my 0.8.8 installation.. :(

@ISekan
Copy link

ISekan commented Sep 14, 2020

@toobadsosad
#2411

@toobadsosad
Copy link

toobadsosad commented Sep 14, 2020

Hmm.. quick fix for older cacti at lease working in my 1.2.6..
(but i do not know what this "dirty fix" will create regression bug)
will still looking forward for official suggestion.

in graph_image.php and graph_json.php change the 1600000000 to 2600000000


/* override: graph start time (unix time) */
if (!isempty_request_var('graph_start') && get_request_var('graph_start') < 2600000000) {
        $graph_data_array['graph_start'] = get_request_var('graph_start');
}

/* override: graph end time (unix time) */
if (!isempty_request_var('graph_end') && get_request_var('graph_end') < 2600000000) {
        $graph_data_array['graph_end'] = get_request_var('graph_end');
}

@budiroots
Copy link

Hmm.. quick fix for older cacti at lease working in my 1.2.6..
(but i do not know what this "dirty fix" will create regression bug)
will still looking forward for official suggestion.

in graph_image.php and graph_json.php change the 1600000000 to 2600000000


/* override: graph start time (unix time) */
if (!isempty_request_var('graph_start') && get_request_var('graph_start') < 2600000000) {
        $graph_data_array['graph_start'] = get_request_var('graph_start');
}

/* override: graph end time (unix time) */
if (!isempty_request_var('graph_end') && get_request_var('graph_end') < 2600000000) {
        $graph_data_array['graph_end'] = get_request_var('graph_end');
}

it works on cacti 0.8.8g

@toobadsosad
Copy link

in latest cacti version, those 1600000000 value already replaced with FILTER_VALIDATE_MAX_DATE_AS_INT

@SinDeng
Copy link
Author

SinDeng commented Sep 14, 2020

Hmm.. quick fix for older cacti at lease working in my 1.2.6..
(but i do not know what this "dirty fix" will create regression bug)
will still looking forward for official suggestion.
in graph_image.php and graph_json.php change the 1600000000 to 2600000000


/* override: graph start time (unix time) */
if (!isempty_request_var('graph_start') && get_request_var('graph_start') < 2600000000) {
        $graph_data_array['graph_start'] = get_request_var('graph_start');
}

/* override: graph end time (unix time) */
if (!isempty_request_var('graph_end') && get_request_var('graph_end') < 2600000000) {
        $graph_data_array['graph_end'] = get_request_var('graph_end');
}

it works on cacti 0.8.8g

in graph_image.php Change the 1600000000 to 2600000000 for cacti 0.8.8a. Test normal now .

@flyingzf
Copy link

in graph_image.php and graph_xport.php change the 1600000000 to 2600000000

0.88h Test normal now

@toobadsosad
Copy link

in graph_image.php and graph_xport.php change the 1600000000 to 2600000000

0.88h Test normal now

thanks... i missed the graph_xport.php..

@toobadsosad
Copy link

found that value as well on remote_agent.php

@angelshiro2020
Copy link

angelshiro2020 commented Sep 14, 2020

嗯..在我的1.2.6 ..中可以租用較早的仙人掌的快速修復方法
(但是我不知道這個“臟修復”會
導致回歸錯誤),仍然期待官方的建議。

graph_image.phpgraph_json.php中將1600000000更改為2600000000


/* override: graph start time (unix time) */
if (!isempty_request_var('graph_start') && get_request_var('graph_start') < 2600000000) {
        $graph_data_array['graph_start'] = get_request_var('graph_start');
}

/* override: graph end time (unix time) */
if (!isempty_request_var('graph_end') && get_request_var('graph_end') < 2600000000) {
        $graph_data_array['graph_end'] = get_request_var('graph_end');
}

in graph_image.php Change the 1600000000 to 2600000000 for cacti 0.8.8c.
Test normal now .


graph_xport.php Change ok , thx!

@toobadsosad
Copy link

嗯..在我的1.2.6 ..中可以租用較早的仙人掌的快速修復方法
(但是我不知道這個“臟修復”會
導致回歸錯誤),仍然期待官方的建議。
graph_image.phpgraph_json.php中將1600000000更改為2600000000


/* override: graph start time (unix time) */
if (!isempty_request_var('graph_start') && get_request_var('graph_start') < 2600000000) {
        $graph_data_array['graph_start'] = get_request_var('graph_start');
}

/* override: graph end time (unix time) */
if (!isempty_request_var('graph_end') && get_request_var('graph_end') < 2600000000) {
        $graph_data_array['graph_end'] = get_request_var('graph_end');
}

in graph_image.php Change the 1600000000 to 2600000000 for cacti 0.8.8c. Test normal now .

in 0.8.8 version donot forget also graph_xport.php

@huybacnguyen
Copy link

cannot file graph_json.php on cacti 0.8.x

@toobadsosad
Copy link

cannot file graph_json.php on cacti 0.8.x

yes.. graph_json.php only for cacti 1.x
for cacti 0.8.x graph_image.php and graph_xport.php

@huybacnguyen
Copy link

huybacnguyen commented Sep 14, 2020

What happen after change it. Why change to 26 without other numbers. And how about if my OS is 32 bits.
In addition to the zoom of the cacti, what will be affected by this value 16...
I've changed in my backup server, 0.8.8.x OK. Wait tomorow to have clean fix....

@toobadsosad
Copy link

What happen after change it. Why change to 26 without other numbers. And how about if my OS is 32 bits.
In addition to the zoom of the cacti, what will be affected by this value 16...

i just change the 1 to 2.. that is why i consider this a dirty fix..
still waiting for official comment regarding this..

@angelshiro2020
Copy link

I watch the new version 1.2.14 code, the content is
FILTER_VALIDATE_MAX_DATE_AS_INT

So....I changed a device to the following code
Cacti 0.8.8c in graph_image.php and graph_xport.php
1600000000 >> FILTER_VALIDATE_MAX_DATE_AS_INT

/* override: graph start time (unix time) */
if (!isempty_request_var('graph_start') && get_request_var('graph_start') < FILTER_VALIDATE_MAX_DATE_AS_INT) {
$graph_data_array['graph_start'] = get_request_var('graph_start');
}

/* override: graph end time (unix time) */
if (!isempty_request_var('graph_end') && get_request_var('graph_end') < FILTER_VALIDATE_MAX_DATE_AS_INT) {
$graph_data_array['graph_end'] = get_request_var('graph_end');
}

This is normal in 0.8.8c
But the informal way

@toobadsosad
Copy link

I watch the new version 1.2.14 code, the content is
FILTER_VALIDATE_MAX_DATE_AS_INT

So....I changed a device to the following code
Cacti 0.8.8c in graph_image.php and graph_xport.php
1600000000 >> FILTER_VALIDATE_MAX_DATE_AS_INT

/* override: graph start time (unix time) */
if (!isempty_request_var('graph_start') && get_request_var('graph_start') < FILTER_VALIDATE_MAX_DATE_AS_INT) {
$graph_data_array['graph_start'] = get_request_var('graph_start');
}

/* override: graph end time (unix time) */
if (!isempty_request_var('graph_end') && get_request_var('graph_end') < FILTER_VALIDATE_MAX_DATE_AS_INT) {
$graph_data_array['graph_end'] = get_request_var('graph_end');
}

This is normal in 0.8.8c
But the informal way

Nice... I want to change to that as well.. Bu I thought that FILTER_VALIDATE_MAX_DATE_AS_INT not part of prior cacti version.... Will test again

@angelshiro2020
Copy link

Nice... I want to change to that as well.. Bu I thought that FILTER_VALIDATE_MAX_DATE_AS_INT not part of prior cacti version.... Will test again

Yes, but it is currently available in 0.8.8c.
Thanks for your ideas
Under constant observation

@TheWitness
Copy link
Member

Correct, you need to upgrade to at least 1.2.10 to resolve this issue, you can optionally edit the following files and search for "16000" and remove the lines that lock in the date range:

graph_view.php
graph_json.php
graph_xport.php

@TheWitness TheWitness added duplicate Duplicate of another issue and removed unverified Some days we don't have a clue labels Sep 14, 2020
@whsir
Copy link

whsir commented Sep 15, 2020

Describe the bug

Timestamp Greater than or equal to 1600000000 cann't zoom for graph and graph_export

Cacti Version | 0.8.8a
Cacti OS | unix
SNMP Version | NET-SNMP version: 5.5
RRDTool Version | RRDTool 1.4.x
PHP Version | 5.3.3

Screenshots

Graph Time is HK Time

image

Repair https://blog.whsir.com/post-5526.html

@TheWitness
Copy link
Member

Such old Cacti's still running out there. Hey, I guess if it ain't broke, no reason to fix it right?

@toobadsosad
Copy link

Such old Cacti's still running out there. Hey, I guess if it ain't broke, no reason to fix it right?

in my installation, many still use weathermap as daily monitoring. thats why still using 0.8.8 :D...

@cigamit
Copy link
Member

cigamit commented Sep 16, 2020

I use weathermap on 1.2.X :)

@optimuscream
Copy link

optimuscream commented Sep 17, 2020

MERCI BEACOUP, Arigathanks Gozaimasu, Spasibo !!!.. Help me from a lot of headache ..
cacti 0.8.8a users here ..

@netniV
Copy link
Member

netniV commented Sep 18, 2020

Yeah quite a few users are using Weathermaps under 1.2.x. Seems a shame that one plugin forces so many to hold back though. @howardjones is still (sometimes?) working on it but as his primary job isn't in networking anymore that's in his free and valuable family time. Whilst we are waiting I know that @thurban has a modded version that works well and is announced on the forums.

@howardjones
Copy link

The first thing phalek did was reformat the code, so I can't easily merge any changes back (every line shows as a "change"). As far as I'm concerned he has forked and is maintaining that 1.x version :-)

I have two years worth of code that is basically dead at this point (from 0.98 onwards, I rewrote lots into more modern PHP, better input validation etc). If I spend any time on Weathermap, it'll be as I'm learning Go, most likely, and not on any Cacti compatibility.

@thurban
Copy link
Contributor

thurban commented Sep 18, 2020

@howardjones ups, sorry. Wasn't intentionally but PHPStorm did this. I'm more then happy to maintain that old Weathermap for 1.x. Not sure how to get the 0.8 users to go 1.x though. Maybe starting an survey about the reasons why they still use 0.8 would help ?

Or do some more marketing for using Cacti 1.x compatible plugin alternatives

@howardjones
Copy link

howardjones commented Sep 18, 2020

@thurban Just posted a bit of marketing on the Weathermap site for you! (and by robot-power, Twitter and Facebook)

@netniV
Copy link
Member

netniV commented Sep 20, 2020

Hi Guys, thanks for your valuable and appreciated efforts 👍

@Jazziwatson
Copy link

Jazziwatson commented Sep 30, 2020

my name is Hamza Wajid ,
I have installed Cacti of version 1.2.8 but it is not displaying graph less nor more than 1 day (24 hours).
how can i check graph less or more than 1 Day?
Capture

@kron2020
Copy link

Correct, you need to upgrade to at least 1.2.10 to resolve this issue, you can optionally edit the following files and search for "16000" and remove the lines that lock in the date range:

graph_view.php
graph_json.php
graph_xport.php

Have you try this?

@nadeesharajapaksha
Copy link

Hmm.. quick fix for older cacti at lease working in my 1.2.6..
(but i do not know what this "dirty fix" will create regression bug)
will still looking forward for official suggestion.

in graph_image.php and graph_json.php change the 1600000000 to 2600000000


/* override: graph start time (unix time) */
if (!isempty_request_var('graph_start') && get_request_var('graph_start') < 2600000000) {
        $graph_data_array['graph_start'] = get_request_var('graph_start');
}

/* override: graph end time (unix time) */
if (!isempty_request_var('graph_end') && get_request_var('graph_end') < 2600000000) {
        $graph_data_array['graph_end'] = get_request_var('graph_end');
}

This worked for me. Thanks !!!

@tkmbe99
Copy link

tkmbe99 commented Oct 5, 2020

The bug fix works also for 0.8.8a
I cannot upgrade to newer versions because cacti ir running on en embedded device which has php5 running
and cannot be upgarded to php7...
Sometimes it's impossible to upgrade to newer version in real world.

@howardjones
Copy link

0.8.8h (4 years worth of bug fixes from 0.8.8a) works on php5. The readme for Cacti 1.2 says it also supports php 5.4+

@netniV
Copy link
Member

netniV commented Oct 6, 2020

Yes, @howardjones is correct, 1.2.x is supported on PHP 5.4 so as long as you are able to reach 5.4 or later (later the better from a security point of view), you should be able to run it on your device. If you do have issues, those should be raised on either the forums for pre 1.2 or here if they are actually a bug (1.2.0 or above).

@pan781023
Copy link

pan781023 commented Oct 26, 2020

I have installed Cacti of version 1.2.14 but it is not displaying graph less nor more than 1 day (24 hours).
in version 1.2.14 config is replace FILTER_VALIDATE_MAX_DATE_AS_INT but my graph still have the same problem.
how can i do ?
2020-10-26_112835

@upengan78
Copy link

upengan78 commented Nov 19, 2020

Thank you for this Thread. Very important . I had issue with Cacti on Ubunut 18.04 with following versions
cacti 1.1.38+ds1-1 (1.1.38)
cacti-spine 1.1.35-1

I just happened to have been brought to notice about this same exact issue and I was wondering and scratching head for 3-4 hours. That update for unix time 16.... to 26....resolved the issue.

I did check Ubuntu repositories and there is no update available so likely their packages are not fixed with this bug if it's resolved upstream at all. :)

@kevin-christopher
Copy link

I have installed Cacti of version 1.2.14 but it is not displaying graph less nor more than 1 day (24 hours).
in version 1.2.14 config is replace FILTER_VALIDATE_MAX_DATE_AS_INT but my graph still have the same problem.
how can i do ?
2020-10-26_112835

try to follow the conversation above, then the results you want will be achieved.

I used Cacti version 1.2.8 before having problems like yours. and I followed the conversation above, then the problem was resolved.

thank you

@github-actions github-actions bot locked and limited conversation to collaborators Mar 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour duplicate Duplicate of another issue
Projects
None yet
Development

No branches or pull requests