cisco switch monitoring Step by Step

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

cisco switch monitoring Step by Step

Postby victorlee55 » Fri Mar 15, 2019 12:48 pm

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
victorlee55
 
Posts: 2
Joined: Mon Feb 18, 2019 12:02 pm

Re: cisco switch monitoring Step by Step

Postby cdienger » Fri Mar 15, 2019 2:05 pm

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

Re: cisco switch monitoring Step by Step

Postby seliimgnc » Mon Mar 25, 2019 3:48 am

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
}
seliimgnc
 
Posts: 14
Joined: Mon Mar 18, 2019 8:43 am

Re: cisco switch monitoring Step by Step

Postby cdienger » Mon Mar 25, 2019 11:31 am

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

Re: cisco switch monitoring Step by Step

Postby seliimgnc » Thu Mar 28, 2019 5:46 am

Also My switch' s status UP but it seeing DOWN on Nagios. What can be the reason for this ?
seliimgnc
 
Posts: 14
Joined: Mon Mar 18, 2019 8:43 am

Re: cisco switch monitoring Step by Step

Postby victorlee55 » Thu Mar 28, 2019 7:11 am

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.
victorlee55
 
Posts: 2
Joined: Mon Feb 18, 2019 12:02 pm

Re: cisco switch monitoring Step by Step

Postby scottwilkerson » Thu Mar 28, 2019 7:21 am

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
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
scottwilkerson
DevOps Engineer
 
Posts: 14468
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Nagios Core

Who is online

Users browsing this forum: freytag and 34 guests