[Check_mk (english)] Monitoring Cisco UCS?

Timo Scheller timo.scheller at hiz-saarland.de
Mon Sep 12 10:33:26 CEST 2016


Hi,

pretty straight actually...
Activate SNMP on your FIs (Domain), then you can easily monitor switchports on all FIs.
For Chassis Temp, Fault and PSU, use check_multi and plugin check_ucs (see all below) and 
define for each domain like this in main.mk

Make sure you got this for the ports on FI
###########################################################
# Here is the config for FC-Monitoring of Nexus and Port-Channels for Nexus OS
if_inventory_uses_alias = True
if_inventory_uses_description = True
if_inventory_porttypes = ([ '6', '18', '22', '23', '30', '31','32', '33', '53', '56', '62', '63', '77', '81', '100', '103', '101', '104', '108', '111', '112', '117', '126', '131', '135','166', '222', '258', '272' ])

# Find usefull information for porttypes:
# http://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib
# ciscoISLvlan (222)
# fibreChannel (56)
# vmwareVirtualNic (258)
# vmwareNicTeam (272)

###########################################################

Define command for check_multi checks
###########################################################
# fi-[Domain]

define command {
  command_name         check_ucs_[DOMAIN]_fan
  command_line         $USER1$/check_multi -f ~/etc/check_multi/fi-[DOMAIN]_fan.cmd -s MYWALL="$USER2$" -s HOSTNAME=[YOUR-FI-Cluster-Adress] -s COMMUNITY=[YOUR-Community] -s extinfo_in_status=1 -r 2
}

define command {
  command_name         check_ucs_[DOMAIN]_psu
  command_line         $USER1$/check_multi -f ~/etc/check_multi/fi-[DOMAIN]_psu.cmd -s MYWALL="$USER2$" -s HOSTNAME=[YOUR-FI-Cluster-Adress] -s COMMUNITY=[YOUR-Community] -s extinfo_in_status=1 -r 2
}

define command {
  command_name         check_ucs_[DOMAIN]_temp
  command_line         $USER1$/check_multi -f ~/etc/check_multi/fi-[DOMAIN]_temp.cmd -s MYWALL="$USER2$" -s HOSTNAME=[YOUR-FI-Cluster-Adress] -s COMMUNITY=[YOUR-Community] -s extinfo_in_status=1 -r 2
}

define command {
  command_name         check_ucs_[DOMAIN]_fault
  command_line         $USER1$/check_multi -f ~/etc/check_multi/fi-[DOMAIN]_fault.cmd -s MYWALL="$USER2$" -s HOSTNAME=[YOUR-FI-Cluster-Adress] -s COMMUNITY=[YOUR-Community] -s extinfo_in_status=1 -r 2
}
###########################################################

The actuall checks per Domain
###########################################################
# check_multi fi-[Domain]
  ( ( "check_ucs_[Domain]_fan", "Chassis FAN", True), [ "[YOUR-FI-Cluster-Adress]" ] ),
  ( ( "check_ucs_[Domain]_psu", "Chassis PSU", True), [ "[YOUR-FI-Cluster-Adress]" ] ),
  ( ( "check_ucs_[Domain]_temp", "Chassis Temp", True), [ "[YOUR-FI-Cluster-Adress]" ] ),
  ( ( "check_ucs_[Domain]_fault", "Chassis Faults", True), [ "[YOUR-FI-Cluster-Adress]" ] ),
###########################################################


Then get the check_ucs Plugin for use with check_multi 
(https://exchange.nagios.org/directory/Plugins/Hardware/Server-Hardware/Cisco/Cisco-Unified-Computing-System/details)
and into ~/local/lib/nagios/plugins/check_ucs

And use this as config in ~/etc/check_multi/  for eg. with fi-[DOMAIN]_psu.cmd 
# ~/local/lib/nagios/plugins/check_ucs
#
# Nagios plugin for monitoring Cisco UCS systems
# Created 2012 by Petr Havlicek
#
# USAGE: -H <HOST_IP> -C <COMMUNITY> -T <TYPE> -N <OBJECT_NAME>
#
# Types:
#        ct - Chassis Temperature
#        ci - Chassis IOCard Status
#        f - Fans Status
#        po - PSUs Operate Status
#        fs - Faults Summary (Dont need -N)
#
# Fabric Interconnects support only these test: f, po
# Object name examples: switch, switch-A, switch-B, chassis-1, chassis-10
#

# Again, all in one Chassis, so only chassis-1 will be called
#command [ PSU-FI-A                    ] = $MYWALL$/check_ucs -H $HOSTNAME$ -C $COMMUNITY$ -T po -N switch-A
#command [ PSU-FI-B                    ] = $MYWALL$/check_ucs -H $HOSTNAME$ -C $COMMUNITY$ -T po -N switch-B
command [ PSU-Chassis-1               ] = $MYWALL$/check_ucs -H $HOSTNAME$ -C $COMMUNITY$ -T po -N chassis-1
#command [ PSU-Chassis-2               ] = $MYWALL$/check_ucs -H $HOSTNAME$ -C $COMMUNITY$ -T po -N chassis-2

# Definde Status of Output
#state [ CRITICAL ] = COUNT(CRITICAL) > 2
#state [ WARNING ] = COUNT(WARNING) > 1 || COUNT(CRITICAL) > 1
#state [ UNKNOWN ] = COUNT(UNKNOWN) > 2

OR for fault as ex. fi-[DOMAIN]_fault.cmd

# Location of Plugin:
#
# ~/local/lib/nagios/plugins/check_ucs
#
# Nagios plugin for monitoring Cisco UCS systems
# Created 2012 by Petr Havlicek
#
# USAGE: -H <HOST_IP> -C <COMMUNITY> -T <TYPE> -N <OBJECT_NAME>
#
# Types:
#        ct - Chassis Temperature
#        ci - Chassis IOCard Status
#        f - Fans Status
#        po - PSUs Operate Status
#        fs - Faults Summary (Dont need -N)
#
# Fabric Interconnects support only these test: f, po
# Object name examples: switch, switch-A, switch-B, chassis-1, chassis-10
#

command [ Faults                  ] = $MYWALL$/check_ucs -H $HOSTNAME$ -C $COMMUNITY$ -T fs

# Definde Status of Output
#state [ CRITICAL ] = COUNT(CRITICAL) > 2
#state [ WARNING ] = COUNT(WARNING) > 1 || COUNT(CRITICAL) > 1
#state [ UNKNOWN ] = COUNT(UNKNOWN) > 2

We are doing this with version 2.03 (V2 only), since 2013, works like a charm. ;-)

The hosts itself we are monitoring then either via SNMP or Agents. Depending on OS and Usage....

HTH, if you have any questions, just ask.



----- Original Message -----
> I need to monitor a Cisco UCS environment with 5108 Chassis combined with
> B-series servers and some C-serie (rack server) in the same UCS Domain
> I already saw that it is not officially supported by check_MK but maybe that
> someone in this forum already had this neeed and already founded a solution.
> Do you have any experience with UCS?
> 
> _______________________________________________
> checkmk-en mailing list
> checkmk-en at lists.mathias-kettner.de
> http://lists.mathias-kettner.de/mailman/listinfo/checkmk-en

-- 

Best

Timo 

----------------------------------------------------
Timo Scheller
Hochschul-IT-Zentrum (HIZ) 

Universität des Saarlandes 
D-66123 Saarbrücken

E-Mail:   timo.scheller at hiz-saarland.de
Internet: http://www.hiz-saarland.de
----------------------------------------------------


More information about the checkmk-en mailing list