check_mrtgtraf: Unable to open MRTG log file

Discussion in 'Installation/Configuration' started by gads, Sep 2, 2010.

  1. ilyar

    ilyar New Member


    This is what i get when i run the command you mentioned.

    [root@NAGIOS01 /]# /usr/lib64/nagios/plugins/check_mrtgtraf -F /var/www/html/mymrtg/10.0.1.1_2.log -a AVG -w 1000000,1000000 -c 5000000,5000000 -e 10
    Traffic OK - Avg. In = 141.3 KB/s, Avg. Out = 11.1 KB/s|in=141.305664KB/s;1000000.000000;5000000.000000;0.000000 out=11.091797KB/s;1000000.000000;5000000.000000;0.000000
     
  2. Mark_NL

    Mark_NL Member

    Ok, so from your reply we can assume the plugin works when run as root.
    afaik see all files have the correct permissions to run this thing

    maybe try:
    Code:
    sudo -u nagios /usr/lib64/nagios/plugins/check_mrtgtraf -F /var/www/html/mymrtg/10.0.1.1_2.log -a AVG -w 1000000,1000000 -c 5000000,5000000 -e 10
    If that gives correct output, the error you told us about in your first post is either from an old log line or another object, because if the above is all true it SHOULD work.
    If not, you forgot something to tell us ;)
     
  3. ilyar

    ilyar New Member


    This is what I get when I run the command above.

    [root@NAGIOS01 /]# sudo -u nagios /usr/lib64/nagios/plugins/check_mrtgtraf -F /var/www/html/mymrtg/10.0.1.1_2.log -a AVG -w 1000000,1000000 -c 5000000,5000000 -e 10
    Traffic OK - Avg. In = 31.6 KB/s, Avg. Out = 12.3 KB/s|in=31.614258KB/s;1000000.000000;5000000.000000;0.000000 out=12.309570KB/s;1000000.000000;5000000.000000;0.000000



    I have no idea why it is still telling me check_mrtgtraf: Unable to open MRTG log file :(
     
  4. ilyar

    ilyar New Member

    I also see this in the mrtg.log

    Started mrtg with config '/etc/httpd/conf/mrtg.cfg'
    2012-11-27 10:55:02 -- ERROR: I Quit! Another copy of mrtg seems to be running. Check /etc/httpd/conf/mrtg.pid
    2012-11-27 11:00:02 -- Started mrtg with config '/etc/httpd/conf/mrtg.cfg'
    2012-11-27 11:00:02 -- ERROR: I Quit! Another copy of mrtg seems to be running. Check /etc/httpd/conf/mrtg.pid



    any ideas?
    thanks.
     

Share This Page