Page 1 of 1

check_mrtgtraf: Unable to open MRTG log file

Posted: Wed Aug 19, 2020 11:33 am
by sophisticated
Hi.

I added a firewall to the nagios and I have such errors (attachment).

in 192.168.3.148/mrtg only shows me the machine where nagios is installed, no firewall logs. If I try this way 192.168.3.148/mrtg/192.168.3.6_12.html then the firewall logs are shown.

Code: Select all

define command {

    command_name    check_local_mrtgtraf
    command_line    $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$
}

Code: Select all

define service {

    use                              generic-service                     ; Inherit values from a template
    host_name                   servsw01,firewall
    service_description       Port 1 Bandwidth Usage
    check_command           check_local_mrtgtraf!/var/lib/mrtg/192.168.3.6_1.log!AVG!1000000,1000000!5000000,5000000!10
}
/etc/mrtg/mrtg.cfg

Code: Select all

# Created by
# /usr/bin/cfgmaker --output=/etc/mrtg/mrtg.cfg [email protected]


### Global Config Options

#  for UNIX
# WorkDir: /home/http/mrtg

#  for Debian
WorkDir: /var/www/mrtg

#  or for NT
# WorkDir: c:\mrtgdata

### Global Defaults

#  to get bits instead of bytes and graphs growing to the right
# Options[_]: growright, bits

EnableIPv6: no

######################################################################
# System:
# Description:
# Contact:
# Location:
######################################################################


RunAsDaemon: Yes
Interval: 5