cisco switch monitoring Step by Step

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
victorlee55
Posts: 2
Joined: Mon Feb 18, 2019 12:02 pm

cisco switch monitoring Step by Step

Post 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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: cisco switch monitoring Step by Step

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
seliimgnc
Posts: 14
Joined: Mon Mar 18, 2019 8:43 am

Re: cisco switch monitoring Step by Step

Post 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
}
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: cisco switch monitoring Step by Step

Post by cdienger »

@seliimgnc - please open a new thread for this issue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
seliimgnc
Posts: 14
Joined: Mon Mar 18, 2019 8:43 am

Re: cisco switch monitoring Step by Step

Post by seliimgnc »

Also My switch' s status UP but it seeing DOWN on Nagios. What can be the reason for this ?
victorlee55
Posts: 2
Joined: Mon Feb 18, 2019 12:02 pm

Re: cisco switch monitoring Step by Step

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: cisco switch monitoring Step by Step

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked