I try to setup a Nagios but i've some issue to monitore my Cisco devices.
I've download this plugin : https://github.com/ranl/monitor-utils/b ... k-cisco.pl
This plugin is stored in /usr/local/nagios/libexec and name "check_cisco_int.pl" (chmod 777)
I've configured my command.cfg like this :
Code: Select all
define command {
command_name check_cisco_int.pl
command_line $USER1$/check_cisco_int.pl -H $HOSTADDRESS$
}
Code: Select all
# Define the switch that we'll be monitoring
define host {
use generic-switch ; Inherit default values from a template
host_name xxxxxx ; The name we're giving to this switch
alias xxxxxx ; A longer name associated with the switch
address xxxxxxx ; IP address of the switch
hostgroups switches ; Host groups this switch is associated with
}
Code: Select all
# Create a new hostgroup for switches
define hostgroup {
hostgroup_name switches ; The name of the hostgroup
alias Network Switches ; Long name of the group
}
Code: Select all
define service {
use generic-service ; Inherit values from a template
host_name xxxxx
service_description Port 49 Link Status
check_command check_cisco_int.pl! -C xxxxx -t int -i GigabitEthernet1/0/49
}
Code: Select all
root@xxxxxx:/usr/local/nagios/libexec# ./check_cisco_int.pl -H xxxxx -C xxxxxx -t int -i GigabitEthernet1/0/49
OK: GigabitEthernet1/0/49 -> up | int=1
Code: Select all
Syntax Error !
check-cisco.pl
-H = Ip/Dns Name of the Switch
-C = SNMP Community
-t = Check type
temp - Temperature
fan - Fan Fail
ps - Power Supply Fail
cpu - CPU Load
mem - Memory
module - Module Health
freeint - Free eth interfaces for X days (-d)
int - Interface Operation Stat (use with -i or -o)
-w = Warning Value
-c = Critical Value
-d = number of days that the ethernet interface hasn't change state, default is 14 (only for -t freeint)
-i = Interface Name (only for -t int)
-o = Interface OID (only for -t int)
Code: Select all
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Thanks!!