Graph template for SNMPv2-MIB - sysUpTime

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

zeroy
Posts: 25
Joined: Wed Jan 25, 2006 8:27 am

Post by zeroy »

Thanks Mikf, your script works a treat on my Linux box and cisco routers,
¬¬ZeRoY¬¬
Halfwalker
Posts: 18
Joined: Tue Jan 24, 2006 6:11 pm

Post by Halfwalker »

Importing it into 0.8.6h on Debian sarge/stable almost works.

It comes up with the data input method being set to Linux - Get Mem usage and no OID. Change those manually, and it seems to save fine.

Problem is that it doesn't create the RRD ...

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Localhost - Uptime" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Days" \
DEF:a="/usr/share/cacti/site/rra/localhost_uptime_8.rrd":uptime:LAST \
CDEF:cdefa=a,8640000,/ \
CDEF:cdefb=a,DUP,8640000,%,-,8640000,/ \
CDEF:cdefc=a,8640000,%,DUP,360000,%,-,360000,/ \
CDEF:cdefd=a,360000,%,DUP,6000,%,-,6000,/ \
AREA:cdefa#4668E4:"Uptime"  \
GPRINT:cdefb:LAST:"Days \:%3.0lf"  \
GPRINT:cdefc:LAST:"Hours \:%2.0lf"  \
GPRINT:cdefd:LAST:"Minutes\:%2.0lf" 

RRDTool Says:

ERROR: opening '/usr/share/cacti/site/rra/localhost_uptime_8.rrd': No such file or directory
D.
tman
Cacti User
Posts: 97
Joined: Thu Oct 14, 2004 4:14 pm

Post by tman »

Ignore my most. Bad day at the office.

Sorted now.
ABX
Cacti User
Posts: 68
Joined: Thu Mar 01, 2007 5:55 am

Post by ABX »

I'm trying to use this script against a windows box, but like my own script it shows the Timeticks value and not the real time.


iso.3.6.1.2.1.1.3.0 = Timeticks: (2512334) 6:58:43.34

So instead of having 6 day uptime I have the 2.512.334 value.
ABX
Cacti User
Posts: 68
Joined: Thu Mar 01, 2007 5:55 am

Post by ABX »

Ok, I have hacked together some code to display the uptime in a proper way.

This is the uptime of the SNMP service and not the real up-time of the Windows server. Blame M$ for not providing this info via SNMP.
Attachments
cacti_graph_template_windows_uptime.xml
(17.34 KiB) Downloaded 789 times
UpTime.PNG
UpTime.PNG (13.09 KiB) Viewed 9551 times
melanie_pfefer
Posts: 5
Joined: Wed Feb 27, 2008 4:55 pm

Post by melanie_pfefer »

hi,
I imported the uptime unix template.

When I add a new graph, I get this error:

RRDTool Command:

/usr/local/rrdtool-1.2.19/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="myhost - Uptime" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Days" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
CDEF:cdefa=a,8640000,/ \
CDEF:cdefb=a,DUP,8640000,%,-,8640000,/ \
CDEF:cdefc=a,8640000,%,DUP,360000,%,-,360000,/ \
CDEF:cdefd=a,360000,%,DUP,6000,%,-,6000,/ \
AREA:cdefa#4668E4FF:"Uptime" \
GPRINT:cdefb:LAST:"Days \:%3.0lf" \
GPRINT:cdefc:LAST:"Hours \:%2.0lf" \
GPRINT:cdefd:LAST:"Minutes\:%2.0lf"
RRDTool Says:

ERROR: invalid rpn expression in: a,8640000,/


any idea?

thx
melanie_pfefer
Posts: 5
Joined: Wed Feb 27, 2008 4:55 pm

Post by melanie_pfefer »

Now I am getting another error :(

RRDTool Says:

ERROR: the RRD does not contain an RRA matching the chosen CF
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I already answered to your mailing list post
Reinhard
hurgh
Posts: 13
Joined: Wed Oct 11, 2006 2:40 am
Contact:

Post by hurgh »

gandalf wrote:I already answered to your mailing list post
Reinhard
Is it possible to post the answer here too, as I am getting the same error:

Code: Select all

RRDTool Says:

ERROR: the RRD does not contain an RRA matching the chosen CF
-Hurgh-
charlesdf23
Cacti User
Posts: 77
Joined: Thu Nov 13, 2008 2:30 pm

Similar Issue

Post by charlesdf23 »

I'm having the same issue as someone earlier. Any ideas?

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title="fitzeast-q29-dc-1 - Uptime" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="Days" \
--slope-mode \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/fitzeast-q29-dc-1_sysuptime_49752.rrd":sysUpTime:AVERAGE \
CDEF:cdefa=a,8640000,/ \
AREA:cdefa#7EE600FF:"" \
GPRINT:cdefa:LAST:"Current\:%8.2lf%s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf%s\n"
RRDTool Says:
ERROR: opening '/var/www/cacti/rra/fitzeast-q29-dc-1_sysuptime_49752.rrd': No such file or directory
charlesdf23
Cacti User
Posts: 77
Joined: Thu Nov 13, 2008 2:30 pm

Post by charlesdf23 »

It appears that something is not right with the template. When it tries copy the info from the data source, I end up with...

Code: Select all

/usr/bin/rrdtool create \
>  /var/www/cacti/rra/localhost_uptime_49795.rrd \
>  --step 60  \
>  DS:uptime:COUNTER:120:0:U \
>  RRA::0.5:1:525600 \
>  RRA:AVERAGE:0.5:1:500 \
>  RRA:AVERAGE:0.5:1:600 \
>  RRA:AVERAGE:0.5:6:700 \
>  RRA:AVERAGE:0.5:24:775 \
>  RRA:AVERAGE:0.5:288:797 \
>  RRA:MAX:0.5:1:500 \
>  RRA:MAX:0.5:1:600 \
>  RRA:MAX:0.5:6:700 \
>  RRA:MAX:0.5:24:775 \
>  RRA:MAX:0.5:288:797 \
>  
ERROR: Unrecognized consolidation function 



If I remove the > RRA::0.5:1:525600, then it creates the rrd without issue. However, I end up with a different error under the graph management

Code: Select all

ERROR: the RRD does not contain an RRA matching the chosen CF
sacoo
Posts: 14
Joined: Fri Mar 30, 2007 2:22 am

Re: Graph template for SNMPv2-MIB - sysUpTime

Post by sacoo »

I wanted to confirm that the last variation of the template (ABX) works flawlessly on my system. The only change I had to do was to remove the word 'windows' :)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest