Posted by : 紹斌 2011年11月18日 星期五

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.


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.

======================================================================
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)

* 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 


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            * 
*                 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
3.Then compile it
# 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> 
* Fixed WRKSYSSTS check problem on V7R3 


Check_as400 Version: 1.4.4 <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/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. 

11 Responses so far.

  1. Unknown says:

    Excellent work! Could you upload your code to github to be able to fork it and to extend it?

  2. Unknown says:

    I noticed that, on our system the plugin always hung during the logoff phase. after some investigation we detected that the language was changed to italian after a user logoff (the nagios user had an english profile). We solved it by adding a clean timeout. based on version 1.2.8:

    ~# diff checkas400/check_as400.java checkas400-original/
    1521,1540d1520
    < /* RPIOLA 20140407 BEGIN: introcucing a timeout for the logoff screen */
    < final int finalExitStatus=exitStatus;
    < Thread timeoutthread=new Thread()
    < {
    < public void run()
    < {
    < try
    < {
    < Thread.sleep(30000);
    < }
    < catch(Exception e)
    < {
    < }
    < if(ARGS.DEBUG) System.out.println(" TIMEOUT ON LOGOFF: terminating connection...");
    < close();
    < System.exit(finalExitStatus);
    < }
    < };
    < timeoutthread.start();
    < /* RPIOLA 20140407 END: introcucing a timeout for the logoff screen */

  3. vakão says:

    Hello Roberto,

    In wich part of code that your block should be in? I'm having the same problem.

    Thank you.

  4. 紹斌 says:

    To Roberto Piola:
    TIMEOUT ON LOGOFF: terminating connection is good idea.


    root cause :

    When you turn on debugging


    waiting for screen...
    waiting for token System . . . . . (or xxxx) ...



    * Nagios user need to use IBM default sign-on display file
    *Or change nagiso user to other subsystem description to use system default display file(QSYS/QDSIGNON)
    *Or change source code to meet your environment display file setting.

    Also note:
    if not English, you need recompile your LANG
    (1).copy Lang Source/check_as400_langxxx to ../check_as400_lang.java
    (2).Re compile. javac check_as400_lang.java

    ps: help to definitions for the Italian language file is welcome.

  5. Unknown says:

    Hello,
    Great work, all is ok except i have a parsing error only with -CJS parameter. Would you have an idea?

    Thanks

  6. 紹斌 says:

    To Bryan DENISE:
    Use -D (debug) option, redirect the output to a file and send it to me!
    For example
    check_as400 -D -H x.x.x.x -v DISK > debug.log

  7. Unknown says:

    What is your email to send the file please?

  8. Henrik says:

    Hi,
    Could you please help me translate this plugin to Swedish?
    It’s not possible for us to change to English due to lots of Swedish users.

    Best Regards

  9. 紹斌 says:

    Take (optional 2 - Change Nagios user profile to EN)

  10. Unknown says:

    Hello. Will this work on my old v5r4?
    Thx.

Translate

關於我

我的相片
台北市, Taiwan
主要工作領域於Linux、IBM System i/ P 的系統管理維護, (認證:CISA、RHCE)

Donate Check_AS400

OR - Click Sponsored advertising

Labels

ShaoPin網誌. 技術提供:Blogger.

- Copyright © Shao Pin Cheng (Bruce) - Powered by Blogger