[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Cheshire Cat Computing • View topic - routers2.cgi: Cannot see result of rrd-archive

Cheshire Cat Computing

Software support and information
It is currently Tue Nov 11, 2025 11:57 pm

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Mon Dec 24, 2012 10:25 pm 
Offline
User

Joined: Mon Dec 24, 2012 9:48 pm
Posts: 9
My MRTG, router2 CGI running on Linux environment. Having read the information from forum, able to setup the cron job to archive rrd daily by rrd-archive.pl. In the router2.cgi, the archive can be shown in the pull-down list under Graphs as attached. Whatever I click in this pull-down list, it shows the current data, i.e. no archive shown.

I tried to extract the form session from html source code related to this.
=================================================================
<FORM name=archform method=GET action=http://Server1/cgi-bin/routers2.cgi target=graph class=sidemenu><img width="15" src="/rrdicons/calendar-sm.gif" class="sidemenuform" height="15" />&nbsp;<select name="arch" onchange="archform.submit();" class="sidemenuform">
<option selected="selected" value="0">Live data</option>
<option value="2012-12-23">23/12/12</option>
<option value="2012-12-22">22/12/12</option>
<option value="2012-12-21">21/12/12</option>
</select><input type="hidden" name="rtr" value="router2.cfg" /><input type="hidden" name="if" value="HKASIP02-CPU" /><input type="hidden" name="page" value="graph" /><input type="hidden" name="xpage" value="graph" /><input type="hidden" name="xgtype" value="d" /><input type="hidden" name="xgstyle" value="l2" /><input type="hidden" name="xgopts" value="" /><input type="hidden" name="bars" value="Cami" /><input type="hidden" name="extra" value="" /><input type="hidden" name="uopts" value="t" /></FORM>


Attachments:
pulldownlist.JPG
pulldownlist.JPG [ 6.34 KiB | Viewed 24896 times ]
Top
 Profile Send private message  
 
PostPosted: Mon Dec 31, 2012 2:00 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
It may be your browser which is doing this (selecting the item from the dropdown that is not the one marked 'selected' in the HTML). If you change it to be 'Live Data' and let it update, is it then OK? Switch it back and forth a couple of times and you might then find it works. Some browsers have a habit of resetting form elements to their previous known values, even if the HTML tells them otherwise.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
PostPosted: Mon Dec 31, 2012 3:01 pm 
Offline
User

Joined: Mon Dec 24, 2012 9:48 pm
Posts: 9
Thanks for your suggestion. I tried to click different date in the pull-down list, back and forth, it kept showing the live data(no change). Attach the graph with information highlighted.


Attachments:
Router2-Graphs.JPG
Router2-Graphs.JPG [ 49.9 KiB | Viewed 24878 times ]
Top
 Profile Send private message  
 
PostPosted: Mon Dec 31, 2012 6:16 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
Which version of routers2 do you have? Can you make sure you have the latest..?

Also, make sure the archived RRD files are readable by the web process. It is possible that they are visible, but not readable, so it fails back to the current data.

Steve

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
PostPosted: Mon Dec 31, 2012 9:24 pm 
Offline
User

Joined: Mon Dec 24, 2012 9:48 pm
Posts: 9
Glad to have your quick feedback. I am using the routers2 version 2.22 and my Redhat Linux version is Red Hat Enterprise Linux Server release 5.6. The rrd-archive is the one come with routers2-v2.22.tar.gz.

Related to the permission of rrd archive files, I've changed it to be readable by others (644) and all archive directories are 755, but cannot help.

When I select the archive date from the pull down list, it still show live data and no error message in the apache error log. Then, I tried to simply capture the URL from apache access log and open it with IE:

http://server1/cgi-bin/routers2.cgi?arc ... a=&uopts=t HTTP/1.1

It still shows the live data.


Top
 Profile Send private message  
 
PostPosted: Mon Dec 31, 2012 10:48 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
It looks as if routers2 is rejecting the specified date. There are a few possibilities.

1. The form submission is failing, and there is no archdate being received.
You can check your web server logs for this, and find what URL is being requested when you select a date from the dropdown. It should have 'arch=yyyy-mm-dd' in the options somewhere.

2. The option is being passed, but is today's date.
You can check this by verifying the logs as in (1), and also choosing a date further in the past.

3. The date is being received, and is parsed as not being today, but is not believed to be valid for this target.
This should not be possible (as otherwise how would it get into the menu?), but may occur in strange situations with mod_perl or similar. To test for this, enable debug mode (debug=1 in the routers2.conf) and then loog at the HTML for the central frame. There will be a large comment section at the end, giving amongst other things the archdate information and any error messages from the archive date validation.
Make sure that the directory holding the RRD files has a subdirectory 'archive' that is readable and executable by the httpd process. Unless you have set archive-mode=hash then this should have a subdirectory for the date, which again should be read/execute.

4. The interface ID is invalid for this target.
If this is the case, then you would get an error message in the debug comments, as in (3).

Steve

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
PostPosted: Wed Jan 02, 2013 5:14 pm 
Offline
User

Joined: Mon Dec 24, 2012 9:48 pm
Posts: 9
Hi Steve,

Thanks for your suggestion and patience. I tried your advice and these are my observation.

1. From the access log of my web server, it has 'arch=yyyy-mm-dd' in the option.

2. The options being passed is the archive date I selected according to the access log.

3. Tested that the archive rrd file is accessible by the apache id by browsing the file in command line inside OS. Apache is the id that own the web server process.
Tried to turn on the debug=1 in conf file, no error can be found in apache log again. When read the HTML source, the comment items are
===============================================================
<!--
rrdtool graph /var/www/html/graphs/ClientServer1.cfg-Item1-d-l2.png
--imgformat
PNG
--base
1024
--lazy
--interlaced
--units-exponent
0
--force-rules-legend
--slope-mode
-e
1357098900
-s
end-2000m
-u
0.1
-w
530
-h
200
--x-grid
HOUR:1:HOUR:24:HOUR:2:0:%k
--title
Item1
--vertical-label
Item 1 (%)
--watermark
Generated by routers2.cgi Version v2.22
DEF:in=/var/www/mrtg/ClientServer1-item1.rrd:ds0:AVERAGE
DEF:out=/var/www/mrtg/ClientServer1-item1.rrd:ds1:AVERAGE
CDEF:ffin=in,1,*
CDEF:ffout=out,1,*
DEF:min=/var/www/mrtg/ClientServer1-item1.rrd:ds0:MAX
DEF:mout=/var/www/mrtg/ClientServer1-item1.rrd:ds1:MAX
CDEF:ffmin=min,1,*
CDEF:ffmout=mout,1,*
CDEF:pcin=ffin,100,*,100,/
CDEF:mpcin=ffmin,100,*,100,/
CDEF:pcout=ffout,100,*,100,/
CDEF:mpcout=ffmout,100,*,100,/
CDEF:xffout=ffout
CDEF:xffmout=ffmout
AREA:ffin#00eb0c:Util(1st take)
LINE1:xffout#1000ff:Util(2nd take)\l
CDEF:down=in,UN,out,UN,+,2,EQ,INF,0,IF
AREA:down#d0d0d0
HRULE:100#ff0000:Maximum (100 %)\l
GPRINT:ffmin:MAX:Max Util(1st take)%7.2lf %%\g
GPRINT:ffin:AVERAGE: Avg Util(1st take)%7.2lf %%\g
GPRINT:ffin:LAST: Cur Util(1st take)%7.2lf %%\g
COMMENT:\l
GPRINT:ffmout:MAX:Max Util(2nd take)%7.2lf %%\g
GPRINT:ffout:AVERAGE: Avg Util(2nd take)%7.2lf %%\g
GPRINT:ffout:LAST: Cur Util(2nd take)%7.2lf %%\g
COMMENT:\l
COMMENT:Wed Jan 2 11\:55\:00 2013\r
-->
===============================================================
Seems no archive item inside.

4. No error being logged in Apache error log.

Would it be possible that the web server did receive the archive option, but routers2.cgi program may not be able to comprehend this option and return the default (live data) result?


Top
 Profile Send private message  
 
PostPosted: Fri Jan 04, 2013 2:34 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
PostPosted: Fri Jan 04, 2013 3:09 pm 
Offline
User

Joined: Mon Dec 24, 2012 9:48 pm
Posts: 9
Hi Steve,

Thanks again. I can identify the similar comment as you shown below.
==================================================
<!-- R:[ClientServer1.cfg]
I:[ClientServer1-Item1]
A:[]
U:[] -->
<!--
Instance: 27094
NOCACHE[routers]
Reading: /etc/mrtg/cfg/ClientServer1.cfg ifcnt=0
NOCACHE
Invalid date 2012-12-23 for target ClientServer1-Item1!
Graph: ClientServer1-Item1
RRD: /var/www/mrtg/ClientServer1-Item1.rrd
-->
<!-- Refresh: 300 -->
<!-- Expires: +5s -->
<!-- Language: None -->
<!-- CF: Not defined -->
<!-- Processing took 0.04s -->
=====================================================

Same as your expectation, it's because the date is invalid. Inside routers2.conf, I didn't touch the setting of "dateonlyformat", or should I change it in order to align with YYYY-MM-DD?


Top
 Profile Send private message  
 
PostPosted: Fri Jan 04, 2013 3:12 pm 
Offline
User

Joined: Mon Dec 24, 2012 9:48 pm
Posts: 9
Hi Steven,

Forgot to say, the content of /etc/sysconfig/clock in my Redhat linux is:
======================================================

ZONE="Asia/Hong_Kong"
UTC=true
ARC=false

======================================================
Don't know if it is related.


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page 1, 2  Next

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group