Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Description: Shell Script for Nagios, checks if there are alerts generated by lpar2rrd in a log. It can be used to check the CPU status of a PowerVM LPAR or POOL.
Current Version
v2.04
Last Release Date
2019-01-11
Owner
Carlos Ijalba
Website
https://ijalba.wordpress.com
License
GPL
Compatible With
Shell Script for Nagios, checks if there are alerts generated by lpar2rrd in a log. It can be used to check the CPU status of a PowerVM LPAR or POOL.
Parameters: $1 - TYPE of check, it can be [ LPAR | POOL ] $2 - SERVER, the physical host of the LPAR or POOL $3 - NAME of the object
Output: 3 - Error: Missing parameters, usage shown. 2 - CRITICAL: CPU Alarm generated by lpar2rrd. 0 - OK: CPU OK, actual CPU utilization reported.
Description:
LPAR2RRD log alerts have the following syntax:
Alert target : OBJECT TYPE:SERVER NAME:OBJECT NAME utilization=%.%
"Alert nagios : LPAR=aix_server_1:P9_Pool:aix_server_1 utilization=0.491"
Based in original "LPAR2RRD Nagios plugin" script which comes with the LPAR2RRD application.
Verified compatible with the following OS: IBM AIX v7.2 Ubuntu v18.04 LTS CygWin v2.5.1 & BusyBox v1.22.1
Debugging:
To debug this script, touching a file named DEBUG (defined in the constants block) in the scripts PATH, will show extra debug info and deleting the file will switch back to normal. To fully debug it from KSH, take the coment off "#set -x", in the Debug section.
Installation - Follow the official LPAR2RRD documentation to enable the Nagios integration module, and then you can use LPAR2RRDs own plugin or this enhanced one.
http://www.lpar2rrd.com/nagios.html
Released under GPLv3, feel free to use and modify, please give credits and references when appropriate. Authors: Carlos Ijalba, Aitor RĂ³denas - 2018-2019.
Alerts given to Nagios:
OK - CPU OK, and CPU %. CRITICAL - CPU alarm generated by lpar2rrd. ERROR - Invalid Parameters passed.
------------- USE: $PROGRAM [ TYPE ] [ SERVER ] [ NAME ]
Reports: OK - lpar2rrd: $SERVER:$NAME, CPU OK (act utilization %.%%). CRITICAL - Alarm generated by lpar2rrd: $ALERT. ERROR - Missing parameters!
Examples: $PROGRAM LPAR P9_Server db2_server <-- check the CPU of LPAR db2_server in P9_Server $PROGRAM POOL P9_Server db2_pool <-- check the CPU of CPU POOL db2_pool in P9_Server
Debug: ON: in the same PATH as the executable script:
touch DEBUG
OFF: in the same PATH as the executable script:
rm DEBUG ------------- NAGIOS Plugin Version Control:
After the Nagios Status reported, the script shows the script's name and version, very useful to track nagios services versions and scripts invoked by a service/command.
2019 - Carlos Ijalba & Aitor Rodenas, GPLv3
You must be logged in to submit a review.
To:
From: