Archive for 11月 2011
Nagios Check_as400 PlugIn
Last edited by Shao-Pin, Cheng Taipei, Taiwan
-----------------------------------------------------------
Check_as400 was created for Nagios to monitor IBM System i.
Easy monitoring of all key indicators.
(optional 2 - Change Nagios user profile to EN)
The NAGIOS user profile has INLPGM parameter set to a CLP (MAINGBCL)
This is the MAINGBCL:
/*********************************************************************/
/* SERVER PROFILE FOR NAGIOS !!!!!!!!! */
/*********************************************************************/
PGM
CHGSYSLIBL LIB(QSYS2924)
RCLRSC
ENDPGM
This CLP change the language in English.
* Fixed WRKSYSSTS check problem on V7R3
Check_as400 Version: 1.4.4 <2017> 2017>
* Fixed CPUT problem on OS V7R2.
* Added check job temporary storage used. (Thanks, BIANCHI Xavier)
Check_as400 Version: 1.4.2_1 (2016/04/29)
* Added ITALIAN language. (Thanks to Riccardo Morandotti)
Check_as400 Version: 1.4.2 <2015 style="font-family: verdana, tahoma, sans-serif; font-size: 12px; line-height: 20.4px;"> (2015>2015/06/29)
* Added SSL connection option.
* Fixed username display in Login ERROR message.
* Fixed Log in failure on 10 character username.
Check_as400 Version: 1.3.0 : (2015/03/10)
* Modified check CJ for duplicate jobs, can specify job number for CRITICAL and WARNING value.
(Thanks to Frederic MOURAGUES)
Check_as400 Version: 1.2.8 :
* Added check for Number of file members.
(Thanks to Tim Vandegrift)
Check_as400 Version: 1.2.7 : ( 2013.08.29 )
* Added check for work with problems.
* Added check for top CPU used job.
The total processing unit time used by the job.
Check_as400 Version: 1.2.5 :
* Added check for Rocket iCluster. Node Status, Group Status, Switch Readines.
Check_as400 Version: 1.2.4 :
* Added French language definitions
* Fixed check CJ command && parse error.
* Fixed check OUTQ error with V6R1/V7R1. And can specify the library now.
-----------------------------------------------------------
Check_as400 was created for Nagios to monitor IBM System i.
Easy monitoring of all key indicators.
Nagios Exchange - Check_AS400
The following I have completed the development of options:
AJ = Number of active jobs in system.
CJ = Check to see if job is in the system.
CJS [status ] [noperm]
= Check to see if job is existing in Subsystem and has this status.
Job checking can be controlled by :
status = any other status goes to critical
noperm = don't go to critical if job is not in the system
NOTE: if JobStatus is set, it has highest Priority
JOBS = Number of jobs in system.
CJM = Check the temporary storage used of job.
JOBQ = Number of jobs in JOBQ.
CPU = CPU load.
CPUC = CPU load, Consider Current processing capacity. (CPU used * VP nums / cpuBase).
NOTE: Specify, EX: You want use 3 CPU only, but VP use more than 3.
CPUT = Top CPU used job. The total processing unit time used by the job
Specify job name, ex: *ALL or QZ* or QZDASOINIT
US = Percent free storage
ASP = Check ASP used
DISK = Check DISK Status.
DB = DB utilization. (Not available after V6R1)
DBFault = Pool DB/Non-DB Fault
LOGIN = Check if login completes.
MSG = Check for any unanswered messages on msg queue
Any unanswered messages causes warning status.
OUTQ = Check outq files, writer and status. No writer, or
status of 'HLD' causes warning status. This default
behavior can be modified with the following options:
nw = Don't go critical when no writer
ns = Don't warn if status is 'HLD'
nf = Ignore number of files in queue
NOTE: threshold values are used on number of files
SBS = Check if the subsystem is running.
NOTE: specify as library/subsystem
PRB = Check if the problem was identified.
---------- VISION MIMIX ----------
MIMIX = Check MIMIX Data Group Unprocessed Entry Count, Transfer definition, RJ link state.
---------- Rocket iCluster ----------
ICNODE = Check for any Inactive or Failed Node status.
ICGROUP = Check for any Inactive or Indoubt Group status.
ICSWTCHRDY = Check for multiple conditions for switch readiness.
-SSL
Use SSL connection.
-d
Be verbose (debug)
NOTE: Needs to be one of the first arguments to work
-D
Be verbose and dump screen outputs (debug)
NOTES: Needs to be one of the first arguments to work
When things are not working, use this flag, redirect the output to a file and send it to me!
Notes:
-CPU, DB and US threshold's are decimal, JOBS, JOBQ and OUTQ are integers.
======================================================================
* Modify your $NAGIOS_PATH/.as400 with the correct user and password.
* Modify chech_as400 with the correct java path.
* Set NAGIOS user profile Display sign-on information *NO
- CHGUSRPRF USRPRF(NAGIOS) DSPSGNINF(*NO)
Initial program to call . . . . *NONE
Initial menu . . . . . . . . . . MAIN
* Nagios user may need to use IBM default sign-on display file
Or change nagiso user to other subsystem description to use system default display file
a.Use the Change Subsystem Description (CHGSBSD) command.
b.Specify the display file on the SGNDSPF parameter. System default is QSYS/QDSIGNON
c.ADDWSE SBSD(SBSLIB/SBSD) WRKSTN(QPADEVxx*) AT(*SIGNON)
* Avoid the massive entries log
CHGJOBD JOBD(NAGIOSJOBD) LOG(4 00 *MSG)
* Use SSL connection
Must add CE to JAVA, for EX:
keytool -import -trustcacerts -keystore /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85.x86_64/jre/lib/security/cacerts -storepass changeit -noprompt -alias xxxx_ce -file /xx/xxx/XXXX.cer
* If you upgrade cum-package, then plugin stop working
Releases affected, V6R1M0 and M1, V7.1 and V7.2 (with different ptfs)
Release 610 : MF58587
Release 611 : MF58588
Release 710 : MF58589
Release 720 : MF58590
* Apply LIC PTF MF59539 for i 7.1 *
* Apply LIC PTF MF59540 for i 7.2 *
This donation will help me provide everyone with greater content
(optional 1 - Support EN/FR/DE/IT)
CJ
CJS
= Check to see if job is existing in Subsystem and has this status.
Job checking can be controlled by :
status
noperm = don't go to critical if job is not in the system
NOTE: if JobStatus is set, it has highest Priority
JOBS = Number of jobs in system.
CJM = Check the temporary storage used of job.
JOBQ
CPU = CPU load.
CPUC
NOTE: Specify
CPUT
Specify job name, ex: *ALL or QZ* or QZDASOINIT
US = Percent free storage
ASP
DISK = Check DISK Status.
DB = DB utilization. (Not available after V6R1)
DBFault = Pool DB/Non-DB Fault
LOGIN = Check if login completes.
MSG
Any unanswered messages causes warning status.
OUTQ
status of 'HLD' causes warning status. This default
behavior can be modified with the following options:
nw = Don't go critical when no writer
ns = Don't warn if status is 'HLD'
nf = Ignore number of files in queue
NOTE: threshold values are used on number of files
SBS
NOTE: specify
PRB = Check if the problem was identified.
---------- VISION MIMIX ----------
MIMIX
---------- Rocket iCluster ----------
ICNODE = Check for any Inactive or Failed Node status.
ICGROUP = Check for any Inactive or Indoubt Group status.
ICSWTCHRDY
-SSL
Use SSL connection.
-d
Be verbose (debug)
NOTE: Needs to be one of the first arguments to work
-D
Be verbose and dump screen outputs (debug)
NOTES: Needs to be one of the first arguments to work
When things are not working, use this flag, redirect the output to a file and send it to me!
Notes:
-CPU, DB and US threshold's are decimal, JOBS, JOBQ and OUTQ are integers.
======================================================================
Install Note
======================================================================* Modify your $NAGIOS_PATH/.as400 with the correct user and password.
* Modify chech_as400 with the correct java path.
* Set NAGIOS user profile Display sign-on information *NO
- CHGUSRPRF USRPRF(NAGIOS) DSPSGNINF(*NO)
Initial program to call . . . . *NONE
Initial menu . . . . . . . . . . MAIN
* Nagios user may need to use IBM default sign-on display file
Or change nagiso user to other subsystem description to use system default display file
a.Use the Change Subsystem Description (CHGSBSD) command.
b.Specify the display file on the SGNDSPF parameter. System default is QSYS/QDSIGNON
c.ADDWSE SBSD(SBSLIB/SBSD) WRKSTN(QPADEVxx*) AT(*SIGNON)
CHGJOBD JOBD(NAGIOSJOBD) LOG(4 00 *MSG)
* Use SSL connection
Must add CE to JAVA, for EX:
keytool -import -trustcacerts -keystore /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85.x86_64/jre/lib/security/cacerts -storepass changeit -noprompt -alias xxxx_ce -file /xx/xxx/XXXX.cer
* If you upgrade cum-package, then plugin stop working
Releases affected, V6R1M0 and M1, V7.1 and V7.2 (with different ptfs)
Release 610 : MF58587
Release 611 : MF58588
Release 710 : MF58589
Release 720 : MF58590
There is a PTF to resolve plugin stop working
* RECOMMENDATION: Apply LIC PTF MF59537 for i 6.1 *
* Apply LIC PTF MF59538 for i 6.1.1 * * RECOMMENDATION: Apply LIC PTF MF59537 for i 6.1 *
* Apply LIC PTF MF59539 for i 7.1 *
* Apply LIC PTF MF59540 for i 7.2 *
======================================================================
Help check_as400 - Click Sponsored Ads
======================================================================This donation will help me provide everyone with greater content
======================================================================
For different language
======================================================================(optional 1 - Support EN/FR/DE/IT)
1.If your system is running on another language than english, follow the steps below
# cd /usr/local/nagios/libexec/check_as400/Lang Source
2.Then copy the java class file of your language (EX:substitute french with your language)
# cp check_as400_lang_french.java ../check_as400_lang.java
# cp check_as400_lang_french.java ../check_as400_lang.java
3.Then compile it
# javac check_as400_lang.java
# javac check_as400_lang.java
(optional 2 - Change Nagios user profile to EN)
The NAGIOS user profile has INLPGM parameter set to a CLP (MAINGBCL)
This is the MAINGBCL:
/*********************************************************************/
/* SERVER PROFILE FOR NAGIOS !!!!!!!!! */
/*********************************************************************/
PGM
CHGSYSLIBL LIB(QSYS2924)
RCLRSC
ENDPGM
This CLP change the language in English.
======================================================================
Troubleshooting
======================================================================
Use -D (debug) option,
.For example
check_as400 -D -H x.x.x.x -v DISK > debug.log
======================================================================
Change log
======================================================================
Check_as400 Version: 1.5.1 <2019> 2019>* Fixed WRKSYSSTS check problem on V7R3
Check_as400 Version: 1.4.4 <2017> 2017>
* Fixed CPUT problem on OS V7R2.
* Added check job temporary storage used. (Thanks, BIANCHI Xavier)
Check_as400 Version: 1.4.2_1 (2016/04/29)
* Added ITALIAN language. (Thanks to Riccardo Morandotti)
Check_as400 Version: 1.4.2 <2015 style="font-family: verdana, tahoma, sans-serif; font-size: 12px; line-height: 20.4px;"> (2015>2015/06/29)
* Added SSL connection option.
* Fixed username display in Login ERROR message.
* Fixed Log in failure on 10 character username.
Check_as400 Version: 1.3.0 : (2015/03/10)
* Modified check CJ for duplicate jobs, can specify job number for CRITICAL and WARNING value.
Check_as400 Version: 1.2.9 :
* Fixed check MSG for LANG FR/GE string index out of range error. (Thanks to Frederic MOURAGUES)
Check_as400 Version: 1.2.8 :
* Added check for Number of file members.
(Thanks to Tim Vandegrift)
Check_as400 Version: 1.2.7 : ( 2013.08.29 )
* Added check for work with problems.
* Added check for top CPU used job.
The total processing unit time used by the job.
Check_as400 Version: 1.2.5 :
* Added check for Rocket iCluster. Node Status, Group Status, Switch Readines.
Check_as400 Version: 1.2.4 :
* Added French language definitions
* Fixed check CJ command && parse error.
* Fixed check OUTQ error with V6R1/V7R1. And can specify the library now.