Retrieve max value of graph with bash/perl script

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

Moderators: Developers, Moderators

Post Reply
cdq74cn
Posts: 1
Joined: Thu Nov 14, 2013 11:45 pm

Retrieve max value of graph with bash/perl script

Post by cdq74cn »

I wonder how can I can retrieve from Command-line the max value on Cacti graph to an integer on a bash shell script.

I tried with the following command:

rrdtool graph - \ --start=1380874818 \ --end=1380889218 \ DEF:a="/usr/share/cacti/site/rra/17/1971.rrd":'traffic_out':MAX \ CDEF:cdefa='a,8,*' \ PRINT:cdefa:MAX:"Last\:%8.2lf %s"

But this did not work.

Anybody have a hint ?
Thanks in advance and kind regards, C.
dtr
Posts: 13
Joined: Mon Feb 28, 2011 4:53 am
Location: Germany

Re: Retrieve max value of graph with bash/perl script

Post by dtr »

http://oss.oetiker.ch/rrdtool/doc/rrdfetch.en.html

you'll have to do the math (i.e. the *8 ) on your own though
Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests