Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

Check LPAR2RRD

Rating
0 votes
Favoured:
0
Current Version
v2.04
Last Release Date
2019-01-11
Compatible With
  • Nagios 4.x
  • Nagios XI
License
GPL
Hits
6788
Files:
FileDescription
check_lpar2rrd.kshcheck_lpar2rrd.ksh
Nagios CSP

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!
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.
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