Page 1 of 1

PROBLEM IN MONITORING CISCO ROUTER BANDWIDTH VIA NAGIOS CORE

Posted: Wed Jul 13, 2016 1:23 am
by musman
Refer to subject cited above please find below:

Following email to root from crone job:

Date: Wed, 13 Jul 2016 11:20:01 +0500
Message-Id: <[email protected]>
From: "(Cron Daemon)" <[email protected]>
To: [email protected]
Subject: Cron <root@localhost> /usr/bin/env LANG=C /usr/bin/mrtg /etc/mrtg/mymrtg.cfg –logging /var/log/mrtg.log
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
Precedence: bulk
X-Cron-Env: <XDG_SESSION_ID=394>
X-Cron-Env: <XDG_RUNTIME_DIR=/run/user/0>
X-Cron-Env: <LANG=en_US.UTF-8>
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>

Use of uninitialized value $first in pattern match (m//) at /usr/bin/../lib64/mrtg2/MRTG_lib.pm line 631.
Use of uninitialized value $dir in concatenation (.) or string at /usr/bin/mrtg line 2658.
Use of uninitialized value $dir in concatenation (.) or string at /usr/bin/mrtg line 2676.
Use of uninitialized value $dir in concatenation (.) or string at /usr/bin/mrtg line 2692.
ERROR: "WorkDir" not specified in mrtg config file


Following is configuration in switch.cfg:

# SNMP BANDWIDTH MONITOR

define service{
use generic-service ; Inherit values from a template
host_name Router-INTERNET
service_description Port 1 Bandwidth Usage
check_command check_local_mrtgtraf!/var/www/html/mymrtg/172.16.16.33.log!AVG!1000000,2000000!5000000,5000000!10
}
The file is attached which shows error please help to resolve at your earliest.

Regards,

Re: PROBLEM IN MONITORING CISCO ROUTER BANDWIDTH VIA NAGIOS

Posted: Wed Jul 13, 2016 2:03 am
by Box293
Please post your file /etc/mrtg/mymrtg.cfg