Sida 1 av 1
Nagios
Postat: 23 jul 2008, 15:20
av BrusE1
Hej
( Ubuntu 8.04 )
Jag har ett problem med Nagios. Jag har installerat och testat Nagios. Allt fungerar och jag får inte upp några fel. Den klarar av att övervaka servern ( localhost ) men jag stöter på problem när jag ska övervaka min switch. Jag vill övervaka Bandwidth Usage på port 1 men jag får statusen UNKNOWN.
Under status Information står det " check_mrtgtraf: Unable to open MRTG log file"
Vad kan det vara för fel? Jag har testat att googla men jag har inte hittat lösningen

Re: Nagios
Postat: 23 jul 2008, 16:48
av northface
Kör du v2 eller v3 av Nagios?
Hur ser ditt "check_command" ut?
Monitoring Bandwidth / Traffic Rate
If you’re monitoring bandwidth usage on your switches or routers using MRTG, you can have Nagios
alert you when traffic rates exceed thresholds you specify. The check_mrtgtraf plugin (which is included
in the Nagios plugins distribution) allows you to do this.
You’ll need to let the check_mrtgtraf plugin know what log file the MRTG data is being stored in, along
with thresholds, etc. In my example, I’m monitoring one of the ports on a Linksys switch. The MRTG log
file is stored in /var/lib/mrtg/192.168.1.253_1.log. Here’s the service definition I use to monitor the
bandwidth data that’s stored in the log file...
define service{
use generic-service ; Inherit values from a template
host_name linksys-srw224p
service_description Port 1 Bandwidth Usage
check_command check_local_mrtgtraf!/var/lib/mrtg/192.168.1.253_1.log!AVG!1000000,2000000!5000000,5000000!10
}
In the example above, the "/var/lib/mrtg/192.168.1.253_1.log" option that gets passed to the
check_local_mrtgtraf command tells the plugin which MRTG log file to read from. The "AVG" option tells
it that it should use average bandwidth statistics. The "1000000,2000000" options are the warning
thresholds (in bytes) for incoming traffic rates. The "5000000,5000000" are critical thresholds (in bytes) for
outgoing traffic rates. The "10" option causes the plugin to return a CRITICAL state if the MRTG log file
is older than 10 minutes (it should be updated every 5 minutes).
Save the file.
Re: Nagios
Postat: 23 jul 2008, 20:34
av BrusE1
Jag kör v3. Problemet är löst. Man var tvungen att skapa loggfilerna själv och lägga dem i /var/www/mrtg