Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Graph template for SNMPv2-MIB - sysUpTime
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
zeroy



Joined: 25 Jan 2006
Posts: 16

PostPosted: Thu Jan 26, 2006 3:31 pm    Post subject: Reply with quote

Thanks Mikf, your script works a treat on my Linux box and cisco routers,
Back to top
Halfwalker



Joined: 24 Jan 2006
Posts: 18

PostPosted: Thu Jan 26, 2006 6:52 pm    Post subject: Reply with quote

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:
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.
Back to top
tman
Cacti User


Joined: 14 Oct 2004
Posts: 89

PostPosted: Fri Jan 27, 2006 5:32 am    Post subject: Reply with quote

Ignore my most. Bad day at the office.

Sorted now.
Back to top
ABX
Cacti User


Joined: 01 Mar 2007
Posts: 61

PostPosted: Tue Nov 06, 2007 9:39 am    Post subject: Reply with quote

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.
Back to top
ABX
Cacti User


Joined: 01 Mar 2007
Posts: 61

PostPosted: Mon Nov 12, 2007 7:31 am    Post subject: Reply with quote

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.



UpTime.PNG
 Description:
 Filesize:  13.09 KB
 Viewed:  1793 Time(s)

UpTime.PNG



cacti_graph_template_windows_uptime.xml
 Description:

Download
 Filename:  cacti_graph_template_windows_uptime.xml
 Filesize:  17.34 KB
 Downloaded:  198 Time(s)

Back to top
melanie_pfefer



Joined: 27 Feb 2008
Posts: 5

PostPosted: Mon Jun 30, 2008 6:39 am    Post subject: Reply with quote

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
Back to top
melanie_pfefer



Joined: 27 Feb 2008
Posts: 5

PostPosted: Fri Jul 11, 2008 7:02 am    Post subject: Reply with quote

Now I am getting another error

RRDTool Says:

ERROR: the RRD does not contain an RRA matching the chosen CF
Back to top
gandalf
Developer


Joined: 02 Dec 2004
Posts: 12604
Location: Muenster, Germany

PostPosted: Fri Jul 11, 2008 3:22 pm    Post subject: Reply with quote

I already answered to your mailing list post
Reinhard
Back to top
hurgh



Joined: 11 Oct 2006
Posts: 11

PostPosted: Mon Oct 13, 2008 6:23 pm    Post subject: Reply with quote

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:
RRDTool Says:

ERROR: the RRD does not contain an RRA matching the chosen CF


-Hurgh-
Back to top
charlesdf23



Joined: 13 Nov 2008
Posts: 25

PostPosted: Mon Dec 29, 2008 9:59 am    Post subject: Similar Issue Reply with quote

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
Back to top
charlesdf23



Joined: 13 Nov 2008
Posts: 25

PostPosted: Mon Dec 29, 2008 3:44 pm    Post subject: Reply with quote

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:

/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:

ERROR: the RRD does not contain an RRA matching the chosen CF
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group