include last updated time on a grapf
Moderators: Developers, Moderators
include last updated time on a grapf
hi,
i am a really newbie and need some help
i have some problems to include the last updated time of a graph. i try it with CDEF functions but i don't realy now how?!?!
i would like add the last updated time as a default for all new graphs, is it possible???
thx for help
i am a really newbie and need some help
i have some problems to include the last updated time of a graph. i try it with CDEF functions but i don't realy now how?!?!
i would like add the last updated time as a default for all new graphs, is it possible???
thx for help
You won't be able to do this with CDEF's, but if you want to follow I can explain how to do this.
First, add a new data input source and call it 'Get Current Date'. Make the input string '/bin/date', and the output string '<date>'.
Save it, and add a new field. Give the field a name of 'Current Date' and a data name of 'date'. Make sure that 'Output' is selected and 'Field Used to Update RRA' unchecked.
Save this and add a new data source. Call it 'current_date' and select 'Get Current Data' as the data input source. Select all values under 'Associated RRA's' and save.
Now to add the 'Last Updated Date' to your graph, simply add a new graph item. Then choose 'current_date' for the data source, 'COMMENT' for the graph item type, and enter the text format in this form:
Hope this helps
-Ian
First, add a new data input source and call it 'Get Current Date'. Make the input string '/bin/date', and the output string '<date>'.
Save it, and add a new field. Give the field a name of 'Current Date' and a data name of 'date'. Make sure that 'Output' is selected and 'Field Used to Update RRA' unchecked.
Save this and add a new data source. Call it 'current_date' and select 'Get Current Data' as the data input source. Select all values under 'Associated RRA's' and save.
Now to add the 'Last Updated Date' to your graph, simply add a new graph item. Then choose 'current_date' for the data source, 'COMMENT' for the graph item type, and enter the text format in this form:
Code: Select all
Last Updated: <date>
-Ian
hi,
thx for help.
i am working on a win2000 server.....
it doesn' t work
the values in the graph are blank!!
i am working with input strings 'date /t' and 'time /t' on win 2000
c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start="-86400" \
--title="Traffic Analysis for 10.224.26.247__FastEthernet0/0" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--vertical-label="Bits Per Second" \
DEF:a="c\:/inetpub/wwwroot/cacti/rra/traf_10_224_26_247_2_in.rrd":traf_10_224_26_247_:AVERAGE \
DEF:b="c\:/inetpub/wwwroot/cacti/rra/traf_10_224_26_247_2_out.rrd":traf_10_224_26_247_:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefe=b,8,* \
AREA:cdefa#00CF00:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefe#002A97:"Outbound" \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"last updated: " \
COMMENT:""
thx for help
thx for help.
i am working on a win2000 server.....
it doesn' t work
the values in the graph are blank!!
i am working with input strings 'date /t' and 'time /t' on win 2000
c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start="-86400" \
--title="Traffic Analysis for 10.224.26.247__FastEthernet0/0" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--vertical-label="Bits Per Second" \
DEF:a="c\:/inetpub/wwwroot/cacti/rra/traf_10_224_26_247_2_in.rrd":traf_10_224_26_247_:AVERAGE \
DEF:b="c\:/inetpub/wwwroot/cacti/rra/traf_10_224_26_247_2_out.rrd":traf_10_224_26_247_:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdefe=b,8,* \
AREA:cdefa#00CF00:"Inbound" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefe#002A97:"Outbound" \
GPRINT:cdefe:LAST:"Current\:%8.2lf %s" \
GPRINT:cdefe:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefe:MAX:"Maximum\:%8.2lf %s" \
COMMENT:"last updated: " \
COMMENT:""
thx for help
hi,
i've tried two different data inputs "date/t" and "time/t". Both worked.
However, it seems that rrdtool only allow one COMMENT. So i couldn't print both date and time together.
i'm using unxutil's date.exe function, which return date/time as follows:
Mon Oct 7 15:55:01 Malay Peninsula Standard Time 2002
cheers
i've tried two different data inputs "date/t" and "time/t". Both worked.
However, it seems that rrdtool only allow one COMMENT. So i couldn't print both date and time together.
i'm using unxutil's date.exe function, which return date/time as follows:
Mon Oct 7 15:55:01 Malay Peninsula Standard Time 2002
cheers
I have been trying to do this for sometime now on a win2k server. I have setup the data input and date source as you have explaned but when I run cmd.php to check if all is ok I get this wrror message:
C:\Apache\htdocs\cacti>php cmd.php
ERROR: Not enough arguments
X-Powered-By: PHP/4.2.0
Content-type: text/html
Any help would be greatly appreciated
Eddy
C:\Apache\htdocs\cacti>php cmd.php
ERROR: Not enough arguments
X-Powered-By: PHP/4.2.0
Content-type: text/html
Any help would be greatly appreciated
Eddy
-
- Posts: 31
- Joined: Fri Nov 22, 2002 10:50 am
- Location: Rochester, UK
Who is online
Users browsing this forum: No registered users and 4 guests