check_mrtgtraf: Unable to open MRTG log file
Posted: Tue Nov 04, 2014 11:49 pm
Hi All
anyone can help on this issue? I have read all related topics of "check_mrtgtraf: Unable to open MRTG log file" within the forum and searched in google, but no solution for my case.
I have got the error "check_mrtgtraf: Unable to open MRTG log file " when i tried to monitor the bandwidth usage of switch ports, and my investigation is as below:
1. my service is as below:
define service{
use generic-service ; Inherit values from a template
host_name HKPUBSW09250
service_description Port 24 Bandwidth Usage
check_command check_local_mrtgtraf!/var/lib/mrtg/192.168.9.250_24.log!AVG!1000000,1000000!5000000,5000000!10
}
2. the file /var/lib/mrtg/192.168.9.250_24.log is exist, and permission is as below:
[root@ switches]# ll /var/lib/mrtg/192.168.9.250_24.log
-rw-r--r--. 1 root root 58410 Nov 5 12:40 /var/lib/mrtg/192.168.9.250_24.log
3. my command:
# 'check_local_mrtgtraf' command definition
define command{
command_name check_local_mrtgtraf
command_line $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
}
4. i can run the check_mrtgtraf under user nagios:
[nagios@ ~]$ /usr/lib64/nagios/plugins/check_mrtgtraf -F /var/lib/mrtg/192.168.9.250_24.log -a AVG -w 1000000,100000 -c 5000000,5000000 -e 10
Traffic CRITICAL - Avg. In = 336.3 KB/s, Avg. Out = 11.5 MB/s|in=336.285156KB/s;1000000.000000;5000000.000000;0.000000 out=11.459609MB/s;100000.000000;5000000.000000;0.000000
Does anyone has ideas about this problem?
Best and Regards,
Nigel
anyone can help on this issue? I have read all related topics of "check_mrtgtraf: Unable to open MRTG log file" within the forum and searched in google, but no solution for my case.
I have got the error "check_mrtgtraf: Unable to open MRTG log file " when i tried to monitor the bandwidth usage of switch ports, and my investigation is as below:
1. my service is as below:
define service{
use generic-service ; Inherit values from a template
host_name HKPUBSW09250
service_description Port 24 Bandwidth Usage
check_command check_local_mrtgtraf!/var/lib/mrtg/192.168.9.250_24.log!AVG!1000000,1000000!5000000,5000000!10
}
2. the file /var/lib/mrtg/192.168.9.250_24.log is exist, and permission is as below:
[root@ switches]# ll /var/lib/mrtg/192.168.9.250_24.log
-rw-r--r--. 1 root root 58410 Nov 5 12:40 /var/lib/mrtg/192.168.9.250_24.log
3. my command:
# 'check_local_mrtgtraf' command definition
define command{
command_name check_local_mrtgtraf
command_line $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
}
4. i can run the check_mrtgtraf under user nagios:
[nagios@ ~]$ /usr/lib64/nagios/plugins/check_mrtgtraf -F /var/lib/mrtg/192.168.9.250_24.log -a AVG -w 1000000,100000 -c 5000000,5000000 -e 10
Traffic CRITICAL - Avg. In = 336.3 KB/s, Avg. Out = 11.5 MB/s|in=336.285156KB/s;1000000.000000;5000000.000000;0.000000 out=11.459609MB/s;100000.000000;5000000.000000;0.000000
Does anyone has ideas about this problem?
Best and Regards,
Nigel