Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
Cisco UCS XML API
0.6
2017-07-19
- Nagios 3.x
- Nagios 4.x
GPL
71630
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
source file: check_cisco_ucs.go
Version 0.6 (19.07.2017)
check_cisco_ucs is a Nagios plugin to monitor Cisco UCS rack and blade center hardware.
The plugin uses the Cisco UCS XML API via HTTPS to do a wide variety of checks.
It uses the Google Go progamming language because of no need to install any libraries.
For Go installation instructions see http://golang.org/doc/install
64 bit binary version can be found at:
http://vs241041.vserver.de/dl/check_cisco_ucs_v0.6/amd64/check_cisco_ucs
This nagios plugin is free software, and comes with ABSOLUTELY NO WARRANTY.
It may be used, redistributed and/or modified under the terms of the GNU General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt).
tested with:
1. UCSC-C240-M3S server and CIMC firmware version 1.5(1f).24
2. Cisco UCS Manager version 2.1(1e) and UCSB-B22-M3 blade center
3. Cisco UCS Manager version 2.2(1b) and UCSB-B200-M3
4. UCSC-C220-M4S server and CIMC firmware version 2.0(4c).36
5. UCS C240 M4S and CIMC firmware version 3.0(3a)
see also:
Cisco UCS Rack-Mount Servers Cisco IMC XML API Programmer's Guide, Release 3.0
http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/c/sw/api/3_0/b_Cisco_IMC_api_301.html
changelog:
Version 0.1 (11.06.2013) initial release
Version 0.2 (26.06.2013)
usage text debug flag added,
write errors to stdout instead of stderr,
flag -E to show environment variables added
flag -V to print plugin version added
Version 0.3 (24.04.2014)
flag -z *OK if zero instances* added
Version 0.4 (24.02.2015)
flag -F display only faults in output, newlines between objects in output line
Version 0.5 (19.05.2015) fix for: "remote error: handshake failure" see: TLSClientConfig ... MaxVersion: tls.VersionTLS11, ...
Version 0.6 (19.07.2017)
fix for: " Post https:///nuova/: read tcp :443: connection reset by peer"
see: TLSClientConfig ... MaxVersion: tls.VersionTLS12, ...
flag -M *max TLS Version* added.
CIMC firmware version 3.0 needs flag -M 1.2
fix for: "HTTP 403 Forbidden error"
error in URL path: no backslash after *nuova*
see code line: url := "https://" + ipAddr + "/nuova"
old: .../nuova/ new: .../nuova
todo:
1. better error handling
2. add performance data support
3. command line flag to influence TLS cert verification
usage:
-H CIMC IP address or Cisco UCS Manager IP address
-t query type 'dn' or 'class'
-q XML API object class name, examples: storageVirtualDrive or storageLocalDisk or storageControllerProps
Distinguished Name (DN) name, examples: "sys/rack-unit-1"
-o
Version 0.6 (19.07.2017)
check_cisco_ucs is a Nagios plugin to monitor Cisco UCS rack and blade center hardware.
The plugin uses the Cisco UCS XML API via HTTPS to do a wide variety of checks.
It uses the Google Go progamming language because of no need to install any libraries.
For Go installation instructions see http://golang.org/doc/install
64 bit binary version can be found at:
http://vs241041.vserver.de/dl/check_cisco_ucs_v0.6/amd64/check_cisco_ucs
This nagios plugin is free software, and comes with ABSOLUTELY NO WARRANTY.
It may be used, redistributed and/or modified under the terms of the GNU General Public Licence (see http://www.fsf.org/licensing/licenses/gpl.txt).
tested with:
1. UCSC-C240-M3S server and CIMC firmware version 1.5(1f).24
2. Cisco UCS Manager version 2.1(1e) and UCSB-B22-M3 blade center
3. Cisco UCS Manager version 2.2(1b) and UCSB-B200-M3
4. UCSC-C220-M4S server and CIMC firmware version 2.0(4c).36
5. UCS C240 M4S and CIMC firmware version 3.0(3a)
see also:
Cisco UCS Rack-Mount Servers Cisco IMC XML API Programmer's Guide, Release 3.0
http://www.cisco.com/c/en/us/td/docs/unified_computing/ucs/c/sw/api/3_0/b_Cisco_IMC_api_301.html
changelog:
Version 0.1 (11.06.2013) initial release
Version 0.2 (26.06.2013)
usage text debug flag added,
write errors to stdout instead of stderr,
flag -E to show environment variables added
flag -V to print plugin version added
Version 0.3 (24.04.2014)
flag -z *OK if zero instances* added
Version 0.4 (24.02.2015)
flag -F display only faults in output, newlines between objects in output line
Version 0.5 (19.05.2015) fix for: "remote error: handshake failure" see: TLSClientConfig ... MaxVersion: tls.VersionTLS11, ...
Version 0.6 (19.07.2017)
fix for: " Post https://
see: TLSClientConfig ... MaxVersion: tls.VersionTLS12, ...
flag -M *max TLS Version* added.
CIMC firmware version 3.0 needs flag -M 1.2
fix for: "HTTP 403 Forbidden error"
error in URL path: no backslash after *nuova*
see code line: url := "https://" + ipAddr + "/nuova"
old: .../nuova/ new: .../nuova
todo:
1. better error handling
2. add performance data support
3. command line flag to influence TLS cert verification
usage:
-H
-t
-q
-o
Reviews (6)
bygrayloglearn, November 26, 2020
Hi team,
I am getting the below error could you please suggest
./check_cisco_ucs.go --help
./check_cisco_ucs.go: line 1: //: Is a directory
./check_cisco_ucs.go: line 2: syntax error near unexpected token `('
./check_cisco_ucs.go: line 2: `// Version 0.6 (19.07.2017)'
[root@ittestnagiosxi test]# ./check_cisco_ucs.go --help
./check_cisco_ucs.go: line 1: //: Is a directory
./check_cisco_ucs.go: line 2: syntax error near unexpected token `('
./check_cisco_ucs.go: line 2: `// Version 0.9 (11.06.2019)
I am getting the below error could you please suggest
./check_cisco_ucs.go --help
./check_cisco_ucs.go: line 1: //: Is a directory
./check_cisco_ucs.go: line 2: syntax error near unexpected token `('
./check_cisco_ucs.go: line 2: `// Version 0.6 (19.07.2017)'
[root@ittestnagiosxi test]# ./check_cisco_ucs.go --help
./check_cisco_ucs.go: line 1: //: Is a directory
./check_cisco_ucs.go: line 2: syntax error near unexpected token `('
./check_cisco_ucs.go: line 2: `// Version 0.9 (11.06.2019)
byJatin, July 21, 2014
Check out the plugins released by Cisco.
communities.cisco.com/ucsintegrations
communities.cisco.com/ucsintegrations
bymunterhuber, November 10, 2013
Plugin works great, but is there any possibility to alert only under the following conditions:
*Faults are Major/Critical
*Faults are unaknowleged
Best regards Michael Unterhuber
*Faults are Major/Critical
*Faults are unaknowleged
Best regards Michael Unterhuber
byKrupal, November 6, 2013
This plugin works very well. I had few troubles in the beginning so I contacted the owner/developer and he helped me a lot.
For the issue of working from command line and not working on GUI, I did following:
# go build go build check_cisco_ucs.go
The you will get the binary file check_cisco_ucs in the same folder.
After that move the binary file to the nagios libexec folder. (e.g. /usr/local/nagios/libexec)
Then change the owner and permissions on file check_cisco_ucs:
# chmod 755 check_cisco_ucs
# chown nagios.nagios check_cisco_ucs
Test the new binary at CLI with user nagios:
# su – nagios
$ cd /usr/local/nagios/libexec
$ ./check_cisco_ucs -H 172.18.4.7 -t class -q equipmentPsu -a "id model operability" -e "operable" -u kmp -p password
Finally, I am able to monitor all switch ports and power supply units of cisco UCS 5108.
However, I would like to know what other commands I can use? I don't know where I can find CISCO UCS XML API Object class names or DN (distinguished name).
It would be good if I can monitor other components also but don't know what names these components/parts are called in XML API.
For the issue of working from command line and not working on GUI, I did following:
# go build go build check_cisco_ucs.go
The you will get the binary file check_cisco_ucs in the same folder.
After that move the binary file to the nagios libexec folder. (e.g. /usr/local/nagios/libexec)
Then change the owner and permissions on file check_cisco_ucs:
# chmod 755 check_cisco_ucs
# chown nagios.nagios check_cisco_ucs
Test the new binary at CLI with user nagios:
# su – nagios
$ cd /usr/local/nagios/libexec
$ ./check_cisco_ucs -H 172.18.4.7 -t class -q equipmentPsu -a "id model operability" -e "operable" -u kmp -p password
Finally, I am able to monitor all switch ports and power supply units of cisco UCS 5108.
However, I would like to know what other commands I can use? I don't know where I can find CISCO UCS XML API Object class names or DN (distinguished name).
It would be good if I can monitor other components also but don't know what names these components/parts are called in XML API.
byjjtechtech, June 25, 2013
I have been waiting for a long time for someone to write a check for the cisco rackmount servers. I am glad that I can monitor them very similar to the way I monitor my HP servers. I look forward to any future updates. Thanks Herwig for the support as well since I am new to the Go language.
bycgr11, June 24, 2013
1 of 1 people found this review helpful
Hello,
works great from the command line,
./check_cisco_ucs -H x.x.x.x-t class -q topSystem -a "name address currentTime mode" -e "stand-alone" -u username-p password
OK - Cisco UCS topSystem (name,address,currentTime,mode) ServerName,x.x.x.x,Mon Jun 24 17:29:28 2013
,stand-alone (1 of 1 ok)
When i add as a Nagios service check, i just get status unknown "error: EOF"?? Any ideas?
works great from the command line,
./check_cisco_ucs -H x.x.x.x-t class -q topSystem -a "name address currentTime mode" -e "stand-alone" -u username-p password
OK - Cisco UCS topSystem (name,address,currentTime,mode) ServerName,x.x.x.x,Mon Jun 24 17:29:28 2013
,stand-alone (1 of 1 ok)
When i add as a Nagios service check, i just get status unknown "error: EOF"?? Any ideas?