micro_sucks
06-14-2004, 05:05 AM
Greetings people, it's now 2:02 am and I have been working on trying to configure mrtg since 9 and now I give up and am at your mercy. The following problem happens when I try to run mrtg :
[root@cp root]# /usr/bin/mrtg /home/httpd/vhosts/****.com/httpdocs/mrtg/mrtg.cfg
ERROR: Target[mrtg][_IN_] ''/home/httpd/vhosts/westcs.com/httpdocs/mrtg/getstats.sh'' evaluated to '/home/httpd/vhosts/****.com/httpdocs/mrtg/getstats.sh' instead of a number
ERROR: Target[mrtg][_OUT_] ''/home/httpd/vhosts/****.com/httpdocs/mrtg/getstats.sh'' evaluated to '/home/httpd/vhosts/****.com/httpdocs/mrtg/getstats.sh' instead of a number
WARNING: Skipping Update of mrtg, inlast is not defined
WARNING: Skipping Update of mrtg, outlast is not defined
Here is my getstats.sh file :
#!/bin/sh
# Get transmit and receive bytes.
#
INFO=`grep eth0 /proc/net/dev | tr -s ' ' ' ' | cut -d: -f2`
RECEIVE=`echo $INFO | cut -d" " -f1`
TRANSMIT=`echo $INFO | cut -d" " -f9`
# Get uptime.
#
UPTIME=`uptime | tr -s ' ' ' ' | cut -d" " -f4-`
# Final output to MRTG
#
echo $RECEIVE
echo $TRANSMIT
echo $UPTIME
echo "westcs.com"
Here is my mrtg.cfg :
WorkDir: /home/httpd/vhosts/****.com/httpdocs/mrtg
Target[mrtg]: '/home/httpd/vhosts/westcs.com/httpdocs/mrtg/getstats.sh'
MaxBytes[mrtg]: 25000000
Title[mrtg]: Traffic and load analysis for ****.com
PageTop[mrtg]: <H1>Traffic and Load for ****.com</H1>
Can someone please tell me what I can do to fix this ? As always appreciated. Oh yeah forgot, I am running Mandrake linux 9.2 and I am using the rpm install of mrtg.
[root@cp root]# /usr/bin/mrtg /home/httpd/vhosts/****.com/httpdocs/mrtg/mrtg.cfg
ERROR: Target[mrtg][_IN_] ''/home/httpd/vhosts/westcs.com/httpdocs/mrtg/getstats.sh'' evaluated to '/home/httpd/vhosts/****.com/httpdocs/mrtg/getstats.sh' instead of a number
ERROR: Target[mrtg][_OUT_] ''/home/httpd/vhosts/****.com/httpdocs/mrtg/getstats.sh'' evaluated to '/home/httpd/vhosts/****.com/httpdocs/mrtg/getstats.sh' instead of a number
WARNING: Skipping Update of mrtg, inlast is not defined
WARNING: Skipping Update of mrtg, outlast is not defined
Here is my getstats.sh file :
#!/bin/sh
# Get transmit and receive bytes.
#
INFO=`grep eth0 /proc/net/dev | tr -s ' ' ' ' | cut -d: -f2`
RECEIVE=`echo $INFO | cut -d" " -f1`
TRANSMIT=`echo $INFO | cut -d" " -f9`
# Get uptime.
#
UPTIME=`uptime | tr -s ' ' ' ' | cut -d" " -f4-`
# Final output to MRTG
#
echo $RECEIVE
echo $TRANSMIT
echo $UPTIME
echo "westcs.com"
Here is my mrtg.cfg :
WorkDir: /home/httpd/vhosts/****.com/httpdocs/mrtg
Target[mrtg]: '/home/httpd/vhosts/westcs.com/httpdocs/mrtg/getstats.sh'
MaxBytes[mrtg]: 25000000
Title[mrtg]: Traffic and load analysis for ****.com
PageTop[mrtg]: <H1>Traffic and Load for ****.com</H1>
Can someone please tell me what I can do to fix this ? As always appreciated. Oh yeah forgot, I am running Mandrake linux 9.2 and I am using the rpm install of mrtg.