Extended system stats graphing- vmstat, iostat, mpstat (sar)

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

Moderators: Developers, Moderators

elpiako
Cacti User
Posts: 85
Joined: Tue Jul 01, 2008 10:02 am
Location: Lille (FRANCE)

Post by elpiako »

actually I graph no windows with sarparse, only some linux hosts :)
Server1
Cacti : 0.8.7h | Architecture : 3.0
autom8 : 0.35 | aggregate : 0.75 | settings : 0.71 | thold : 0.4.7 | weathermap : 0.97a

Server2
Cacti : 0.8.7g | Architecture : 2.8
autom8 : 0.35 | aggregate : 0.75 | settings : 0.7 | thold : 0.4.3 | weathermap : 0.97a | flowview : 0.6
it
Cacti User
Posts: 118
Joined: Tue Jun 17, 2008 12:44 pm

Post by it »

i appreciate thx
Priceadmin
Posts: 5
Joined: Tue Aug 12, 2008 5:14 am

Post by Priceadmin »

hi everybody,

in my Sarparse CPU Usage graph, i have only NAN instead of data.

i 've done all as described in this post but no data.

i'm on RH5 server, cacti 0.8.7a et NRPE 2.12.

thanks
Priceadmin
Posts: 5
Joined: Tue Aug 12, 2008 5:14 am

Post by Priceadmin »

noboby have an idea ?
elpiako
Cacti User
Posts: 85
Joined: Tue Jul 01, 2008 10:02 am
Location: Lille (FRANCE)

Post by elpiako »

does the command "check_nrpe -H <target host> -c sar" work from your cacti server ?

does any other sarparse graph work ?
Server1
Cacti : 0.8.7h | Architecture : 3.0
autom8 : 0.35 | aggregate : 0.75 | settings : 0.71 | thold : 0.4.7 | weathermap : 0.97a

Server2
Cacti : 0.8.7g | Architecture : 2.8
autom8 : 0.35 | aggregate : 0.75 | settings : 0.7 | thold : 0.4.3 | weathermap : 0.97a | flowview : 0.6
ahhdem
Posts: 18
Joined: Thu Jun 14, 2007 1:41 pm

Post by ahhdem »

hi everyone.. never expected this many users. so ashamed of my perl code now. :)

thanks, elpiako for being so helpful... for those of you having problems with one line of output like :
Average: procs

and thats it... be sure to grab the latest nrpe and compile it from source.. it's only requirements are typically openssl and of course gcc.. if you're on redhat just gcc and openssl-devel packages will satisfy all other requirements for building nrpe.

in my environments we've used 2.8.1 and had no problems. From the NRPE Changelog:

2.1 - 01/19/2004
----------------
- Any output from plugins after first line is now ignored before
plugin process is closed

2.8 - 05/08/2007
---------------
- Added support for multiline plugin output (limited to 1KB at the moment) (Matthias Flacke)

2.12 - 03/10/2008
-----------------
- Fix for unterminated multiline plugin (garbage) output (Krzysztof Oledzki)

so, stay current!
Rael
Cacti User
Posts: 129
Joined: Thu Apr 05, 2007 9:28 am

Post by Rael »

Would it be possible to re-work this script at all to not use NRPE and instead just use an ssh trust to the target host?
Rael
Cacti User
Posts: 129
Joined: Thu Apr 05, 2007 9:28 am

Post by Rael »

Also, none of the SARParse IO stuff works?
mdxp
Posts: 1
Joined: Wed Dec 17, 2008 7:55 am

Post by mdxp »

The original location of this script (http://frylab.com/~adamb/sarparse/) seems to be down. Can anyone else that used them, upload them somewhere to be available for others to download? Thanks in advance!
fazil
Posts: 11
Joined: Mon Jan 05, 2009 2:41 am

downloading template and script

Post by fazil »

hi all,
where can i download the templates and scripts of the ahhdem topic please ? :)
neocontrol
Posts: 22
Joined: Fri Oct 10, 2008 5:22 pm

Post by neocontrol »

I too am looking for this tool as well. If anyone has it, can they email it to me and I'll host it up myself for others.

Please email me at:

charlie <dot> reddington <at> gmail <dot> com
joe_hznm
Posts: 29
Joined: Thu May 19, 2005 12:29 am

Post by joe_hznm »

look into the word document in previous post, the tar ball included in it.
fazil
Posts: 11
Joined: Mon Jan 05, 2009 2:41 am

Post by fazil »

thank you very much. I did not pay attention we can get it here.

thx
neocontrol
Posts: 22
Joined: Fri Oct 10, 2008 5:22 pm

Post by neocontrol »

Thanks, same here, the file just acts a bit wonky using mac ms office.
neocontrol
Posts: 22
Joined: Fri Oct 10, 2008 5:22 pm

Post by neocontrol »

I am having 2 graphing issues, otherwise this works perfect.

The graph 'Load Average' is giving me the following from it's debug code. This graph, has yet to produce even an empty graph. It's pretty obvious that this graph has not even been created, like all the others and I have tried blowing it away, and recreating it, with no luck.

RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="serv56.ord01 - Load Average" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="processes in the run queue" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/server_007_load_1min_543.rrd":load_1min:AVERAGE \
DEF:b="/var/www/cacti/rra/server_007_load_5min_545.rrd":load_5min:AVERAGE \
DEF:c="/var/www/cacti/rra/server_007_load_15min_544.rrd":load_15min:AVERAGE \
CDEF:cdefg=TIME,1232567693,GT,a,a,UN,0,a,IF,IF,TIME,1232567693,GT,b,b,UN,0,b,IF,IF,TIME,1232567693,GT,c,c,UN,0,c,IF,IF,+,+ \
AREA:a#EACC00FF:"1 Minute Average" \
GPRINT:a:LAST:" Current\:%8.2lf\n" \
AREA:b#EA8F00FF:"5 Minute Average":STACK \
GPRINT:b:LAST:" Current\:%8.2lf\n" \
AREA:c#FF0000FF:"15 Minute Average":STACK \
GPRINT:c:LAST:"Current\:%8.2lf\n" \
LINE1:cdefg#000000FF:"Total"
RRDTool Says:
ERROR: opening '/var/www/cacti/rra/server_007_load_1min_543.rrd': No such file or directory
And then for the memory usage graph, which also has yet to create a empty graph as well, is giving a differnt error, that I'm not sure what it means. The RRD file does exist, but it's not getting updated, as the file size is staying the same.
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="server_007 - SarParse - Memory Usage" \
--base=1000 \
--height=250 \
--width=750 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="kb" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/cacti/rra/server_007_kbmemused_546.rrd":kbmemused:LAST \
DEF:b="/var/www/cacti/rra/server_007_kbmemused_546.rrd":kbmemused:MAX \
DEF:c="/var/www/cacti/rra/server_007_kbmemused_546.rrd":kbmemfree:LAST \
DEF:d="/var/www/cacti/rra/server_007_kbmemused_546.rrd":kbmemfree:MAX \
DEF:e="/var/www/cacti/rra/server_007_kbmemused_546.rrd":kbbuffers:LAST \
DEF:f="/var/www/cacti/rra/server_007_kbmemused_546.rrd":kbbuffers:MAX \
DEF:g="/var/www/cacti/rra/server_007_kbmemused_546.rrd":kbcached:LAST \
DEF:h="/var/www/cacti/rra/server_007_kbmemused_546.rrd":kbcached:MAX \
DEF:i="/var/www/cacti/rra/server_007_kbmemused_546.rrd":kbswpused:LAST \
DEF:j="/var/www/cacti/rra/server_007_kbmemused_546.rrd":kbswpused:MAX \
DEF:ba="/var/www/cacti/rra/server_007_kbmemused_546.rrd":kbswpcad:AVERAGE \
DEF:bb="/var/www/cacti/rra/server_007_kbmemused_546.rrd":kbswpcad:MAX \
CDEF:cdefa=a,1024,* \
CDEF:cdefc=b,1024,* \
CDEF:cdefe=c,1024,* \
CDEF:cdefg=d,1024,* \
CDEF:cdefi=e,1024,* \
CDEF:cdefbb=f,1024,* \
CDEF:cdefbc=g,1024,* \
CDEF:cdefbe=h,1024,* \
CDEF:cdefbg=i,-1024,* \
CDEF:cdefbh=i,1024,* \
CDEF:cdefbi=j,1024,* \
CDEF:cdefca=ba,-1024,* \
CDEF:cdefcb=ba,1024,* \
CDEF:cdefcd=bb,1024,* \
AREA:cdefa#8D85F3FF:"Used\:" \
GPRINT:cdefa:LAST:" Current\:%8.2lf%s" \
GPRINT:cdefc:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdefc:MAX:"Maximum\:%8.2lf%s\n" \
AREA:cdefe#C4FD3DFF:"Free\:":STACK \
GPRINT:cdefe:LAST:" Current\:%8.2lf%s" \
GPRINT:cdefg:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdefg:MAX:"Maximum\:%8.2lf%s\n" \
AREA:cdefi#55009DFF:"Kernel\:" \
GPRINT:cdefi:LAST:" Current\:%8.2lf%s" \
GPRINT:f:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdefbb:MAX:"Maximum\:%8.2lf%s\n" \
AREA:cdefbc#F5F800FF:"Kernel Cache\:":STACK \
GPRINT:cdefbc:LAST:"Current\:%8.2lf%s" \
GPRINT:cdefbe:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdefbe:MAX:"Maximum\:%8.2lf%s\n" \
AREA:cdefbg#FF5F00FF:"Swap Used\:" \
GPRINT:cdefbh:LAST:" Current\:%8.2lf%s" \
GPRINT:cdefbi:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdefbi:MAX:"Maximum\:%8.2lf%s\n" \
AREA:cdefca#FF0000FF:"Cached Swap\:" \
GPRINT:cdefcb:LAST:" Current\:%8.2lf%s" \
GPRINT:cdefcb:AVERAGE:"Average\:%8.2lf%s" \
GPRINT:cdefcd:MAX:"Maximum\:%8.2lf%s\n"
RRDTool Says:
ERROR: the RRD does not contain an RRA matching the chosen CF
I'm not getting any errors or warnings for these 2 graphs.

I am using a modified sarparse.pl script that pretty much strips out the nrpe stuff since I will eventually use this remotely with out that.

My output from sarparse is...
# perl sarparse.pl
procs:0.00 cswchs:86.14 CPU:all user:0.00 nice:0.00 system:0.99 iowait:0.00 steal:0.00 idle:99.01 pgpgins:0.00 pgpgouts:0.00 faults:12.87 majflts:0.00 kbmemfree:53576 kbmemused:457204 memused:89.51 kbbuffers:74420 kbcached:139392 kbswpfree:1049376 kbswpused:2872 swpused:0.27 kbswpcad:0 dentunusd:9889 file_sz:1020 inode_sz:7259 super_sz:0 super_sz:0.00 dquot_sz:0 dquot_sz:0.00 rtsig_sz:0 rtsig_sz:0.00 totsck:106 tcpsck:10 udpsck:6 rawsck:0 ip_frag:0 runq_sz:0 plist_sz:122 ldavg_1:0.22 ldavg_5:0.25 ldavg_15:0.13
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest