Page 1 of 1

cisco switch monitoring Step by Step

Posted: Fri Mar 15, 2019 12:48 pm
by victorlee55
Hello

I am new to nagios, I want to know how to start step by step with cisco switch monitoring.

What I have done so far is:

- create community in Switch = public2

- On switch.cfg (ping Work OK)

define host {

use generic-switch ; Inherit default values from a template
host_name switch01Prueba ; The name we're giving to this switch
alias pruebamonitoreo ; A longer name associated with the switch
address 192.168.1.XX ; IP address of the switch
hostgroups switches ; Host groups this switch is associated with

define service {

use generic-service ; Inherit values from a template
hostgroup_name switches ; The name of the host the service is associated with
service_description PING ; The service description
check_command check_ping!200.0,20%!600.0,60% ; The command used to monitor the service
check_interval 5 ; Check the service every 5 minutes under normal conditions
retry_interval 1 ; Re-check the service every minute until its final/hard state is determined
}



# Monitor uptime via SNMP

define service {

use generic-service ; Inherit values from a template
hostgroup_name switches
service_description Uptime
check_command check_snmp!-C public2 -o sysUpTime.0


- in usr/local/nagios/etc/objects/commands.cfg (

define command {

command_name check_snmp
command_line $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$


- validating the configuration with snmpwalk I have the following error:


[root@localhost libexec]# snmpwalk -v2c -c public2 192.168.1.XX |more
SNMPv2-SMI::mib-2 = No Such Object available on this agent at this OID

I do not know how to continue I need to monitor something like memory cpu process.

I thank you very much for your help to move forward :D

Re: cisco switch monitoring Step by Step

Posted: Fri Mar 15, 2019 2:05 pm
by cdienger
It's a bit odd that the walk doesn't work, but check out http://www.techspacekh.com/monitoring-c ... plication/ which links to a couple plugins including one to monitor memory and cpu.

Re: cisco switch monitoring Step by Step

Posted: Mon Mar 25, 2019 3:48 am
by seliimgnc
Hi,
I want to monitoring switch with nagios but why nagios status information for Port 1 Bandwidth Usage>>> : check_mrtgtraf: Unable to open MRTG log file and Port 1 Link Status >>>> : External command error: MIB search path:


my switch.cfg file is :


define host {

use generic-switch ; Inherit default values from a template
host_name SO-1 ; The name we're giving to this switch
alias Sytem Room 1 ; A longer name associated with the switch
address 192.168.11.201 ; IP address of the switch
hostgroups switches ; Host groups this switch is associated with
}



# Monitor bandwidth via MRTG logs

define service {

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

define service {

use generic-service ; Inherit values from a template
host_name SO-1
service_description Port 1 Link Status
check_command check_snmp!-C public -o ifOperStatus.1 -r 1 -m RFC1213-MIB
}

Re: cisco switch monitoring Step by Step

Posted: Mon Mar 25, 2019 11:31 am
by cdienger
@seliimgnc - please open a new thread for this issue.

Re: cisco switch monitoring Step by Step

Posted: Thu Mar 28, 2019 5:46 am
by seliimgnc
Also My switch' s status UP but it seeing DOWN on Nagios. What can be the reason for this ?

Re: cisco switch monitoring Step by Step

Posted: Thu Mar 28, 2019 7:11 am
by victorlee55
I followed the steps of the link and it worked perfectly on a switch cisco 2960 I am now doing tests on a switch cisco sg300

thank you very much for your help.

Re: cisco switch monitoring Step by Step

Posted: Thu Mar 28, 2019 7:21 am
by scottwilkerson
victorlee55 wrote:I followed the steps of the link and it worked perfectly on a switch cisco 2960 I am now doing tests on a switch cisco sg300

thank you very much for your help.
Great!

Going to lock this thread, if you have issues with another switch please feel free to open a new thread