[mrtg] MRTG Script error

This is a discussion on [mrtg] MRTG Script error within the MRTG forums, part of the Networking and Network Related category; I am facing a littile problem in creating MRTG Graph for Disk I/O perfromance. I created script to collect ...


Go Back   Usenet Forums > Networking and Network Related > MRTG

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-22-2008
SYED JAHANZAiB ~!~ AA Internet Cable.Network Services
 
Posts: n/a
Default [mrtg] MRTG Script error


I am facing a littile problem in creating MRTG Graph for Disk I/O perfromance.
I created script to collect read/write data by thie following script.

################################
#disk.sh
#!/bin/bash
Kbr=`iostat -x |grep sda | awk '{print $7}' |sed "s/[.]//"`
Kbw=`iostat -x |grep sda | awk '{print $6}' |sed "s/[.]//"`
echo $Kbr
echo $Kbw
################################
If I run disk.sh, it shows me following result which is ok

429
26

My disk.cfg is as follows...
################################
Target[disk]: `/usr/local/mrtg-2/bin/disk.sh`
Title[disk]: Disk HDA I/O Utilization Report
#Unscaled[disk]: dwym
MaxBytes[disk]: 10240000
PageTop[disk]: Disk I/O Utilization Report
kmg[disk]: KB,MB,GB
LegendI[disk]: Disk I/O KBread/sec
LegendO[disk]: Disk I/O KBwrite/sec
Legend1[disk]: Disk I/O KBread/sec
Legend2[disk]: Disk I/O KBwrite/sec
YLegend[disk]: Megabytes
ShortLegend[disk]: &
Options[disk]: growright,gauge,nopercent
#################################

But when i set it in MRTG , it shows me follwing error and donot updatedisk Graph.

##################

2008-04-21 17:04:02 -- Started mrtg with config '/usr/local/mrtg-2/bin/mrtg.cfg'

2008-04-21 17:04:38 -- 2008-04-21 17:04:02: WARNING: Problem with External get '/usr/local/mrtg-2/bin/disk.sh':
Expected a Number for 'in' but got ''

2008-04-21 17:04:38 -- 2008-04-21 17:04:02: WARNING: Problem with External get '/usr/local/mrtg-2/bin/disk.sh':
Expected a Number for 'out' but got ''

2008-04-21 17:04:38 -- 2008-04-21 17:04:38: ERROR: Target[disk][_IN_] ' $target->[47]{$mode} ' did not eval into defined data

2008-04-21 17:04:38 -- 2008-04-21 17:04:38: ERROR: Target[disk][_OUT_] ' $target->[47]{$mode} ' did not eval into defined data

#############################

What could be the error ???

Regards,
__________________________________________________ _______________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.asp...aspx&mkt=en-us
_______________________________________________
mrtg mailing list
mrtg@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/mrtg
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:35 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0