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
Don't miss your chance to attend the 2014 Nagios World conference!

Don't miss your chance to attend the 2014 Nagios World Conference, Oct 13-16th. Informative Sessions, Networking, Food and Cocktails! Visit go.nagios.com/conference/ for more information or to register.


Check_as400 Popular

Bookmark and Share

Current Version
1.2.8
Last Release Date
2014-02-13
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI
Owner
E-mail
License
GPL
Hits
322035
Files:
FileDescription
check_as400_1.2.8.rarcheck_as400_1.2.8
Check_as400
Nagios plugin to monitor IBM System i (AS/400)
Check_as400 Version: 1.2.8 : <2014/03/11>
* Added check for Number of file members.
(Thanks to Tim Vandegrift)

Check_as400 Version: 1.2.7.2 : <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.
* Fixed French language check DISK halt. <2013/10/31>
* Fixed iCluster parse String lost define <2014/02/13>

Check_as400 feature
* check CPU load.
* check top CPU used job.
* check ASP usage.
* check Pool DB/Non-DB Fault
* check number of active jobs in system.
* check to see if job is in the system.
* check Job Status.
* check number of jobs in JOBQ
* check DB utilization. (Not available after V6R1)
* check DISK Status.
* check if login completes.
* check for any unanswered messages on msg queue.
* check outq files, writer and status.
* check if the subsystem is running.
* check for Number of file members.
* check MIMIX Data Group Unprocessed Entry, transfer definition, RJ link state.
* check for Rocket iCluster. Node Status, Group Status, Switch Readines.

Last edited by Shao-Pin, Cheng Taipei, Taiwan
==========================================================

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)
* For languages other than English , change system library list to ENGLISH.
Reviews (7)
byhlustik, January 4, 2011
1 of 1 people found this review helpful
i just get two error messages for check_as400_jobs
and check_as400_msg
1) check_as400_jobs ( the number of jobs in the system is displayed inverted )

Exception in thread "main" java.lang.NumberFormatException: For input string: "[7m
[0"at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:449)
at java.lang.Integer.(Integer.java:660)
at check_as400.parseWrkSysSts(check_as400.java:641)
at check_as400.parse(check_as400.java:398)
at check_as400.main(check_as400.java:325)

2) check_as400_msg qsysopr

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -102
at java.lang.String.substring(String.java:1937)
at check_as400.parseDspMsg(check_as400.java:470)
at check_as400.parse(check_as400.java:402)
at check_as400.main(check_as400.java:325)

as i have not found any mail adress i post this here.
Owner's reply

Definitions AS/400 use ENGLISH language may solve your problem.

bysebnad, September 15, 2010
1 of 1 people found this review helpful
with an other person. We change this to see the message on dspsmg

public static int parseDspMsg(String paramString) {
if (paramString.indexOf(LANG.NO_MESSAGES_AVAILABLE) != -1) {
System.out.println("OK - No messages");
return 0;
}

int i = paramString.indexOf("cessitant une r", 0);
int j = paramString.indexOf("cessitant pas de r", 0);
i += 72;
j -= 72;
String str1 = paramString.substring(i, j);
try {
String str2 = new String(str1.getBytes("ISO-8859-15"), "UTF-8");
System.out.println(str2);
}
catch (UnsupportedEncodingException localUnsupportedEncodingException) {
System.err.println(localUnsupportedEncodingException);
}

return 1;
}
You have done an excellent job that lets Nagios (and its flavors) to get deep into iSeries monitoring. It could be easy extended.
One issue that I found is in parseDspMsg when there are a few pages of "need-reply" messages and a new "do not need reply" messages page appears. In this case, where (e.g. k = 334 i=460) we get: Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -126 at java.lang.String.substring(Unknown Source).

This happens in line "String str3 = paramString.substring(i, k);" where the begin is 460 and end is 334 (!!!) that is not possible.

Thank you for your excellent work!
bykgauler, February 4, 2014
I use it checking about 30 functions of the iSeries. It just works like expected.
Klaus Gauler
Does what it said.
All checks i had setup work perfectly for over 6 months now on a V5R2M0 English system.
I would love to see a more detail online help, but anyway the dev had always and quickly reply my emails.
Good job !
This worked great for our Version 5 OS, but there we a couple of issues for 7.1.

Below are the changes to make the wrksyssts portions to work with 7.1
// else if(ARGS.checkVariable==DB){
// start=findToken(buffer,":",5)+1;
// double db=(new Double(checkDouble((buffer.substring(start,start+11)).trim()))).doubleValue();
//
// returnStatus=getStatus(db);
//
// System.out.println("DB Load ("+nf.format(db)+"%) | DBload="+nf.format(db)+";80;90;0; ");
// }
else if(ARGS.checkVariable==US){
double percentFree,total,percentUsed;

start=findToken(buffer,":",10)+1;
percentUsed=(new Double(checkDouble(buffer.substring(start,start+11)))).doubleValue();
start=findToken(buffer,":",10)+1;
percentFree=100.0-(new Double(checkDouble(buffer.substring(start,start+11)))).doubleValue();
// start=findToken(buffer,":",12)+1;
start=findToken(buffer,":",8)+1;
String tot=((buffer.substring(start,start+11))).trim();
total=(new Double(checkDouble(tot.substring(0,tot.length()-1)))).doubleValue();

returnStatus=getStatus(percentFree);

System.out.println(nf.format(total*(percentFree/100))+" "+tot.substring(tot.length()-1)+" ("+nf.format(percentFree)+"%) free of "+((buffer.substring(start,start+11))).trim()+" | ASP="+nf.format(percentUsed)+"%;87;92;0; ");
}
else if(ARGS.checkVariable==JOBS){
start=findToken(buffer,":",9)+1;
int jobs=(new Integer((buffer.substring(start,start+11)).trim())).intValue();

returnStatus=getStatus(jobs);

System.out.println(jobs+" jobs in system | jobs="+jobs+";;;0; ");
byhomer78, March 10, 2011
Hi,

i have the same problems as hlustik.
So i wanted to recompile the plugin but got the following problems:
javac check_as400_lang.java
/usr/lib/gcc/i586-suse-linux/4.5/../../../crt1.o: In function `_start':
/usr/src/packages/BUILD/glibc-2.11.2/csu/../sysdeps/i386/elf/start.S:115: undefined reference to `main'
collect2: ld returned 1 exit status


javac check_as400.java
check_as400.java:562: warning: The local variable newStart is never read
int index=0,start=-1,newStart=0;
^^^^^^^^
1 problem (1 warning)
/usr/lib/gcc/i586-suse-linux/4.5/../../../crt1.o: In function `_start':
/usr/src/packages/BUILD/glibc-2.11.2/csu/../sysdeps/i386/elf/start.S:115: undefined reference to `main'
/tmp/ccP8HXmU.o: In function `void check_as400::main(JArray*)':
ccJjSfTx.jar:(.text+0x28e6): undefined reference to `check_as400_cmd_vars::class$'
ccJjSfTx.jar:(.text+0x28f5): undefined reference to `check_as400_cmd_vars::check_as400_cmd_vars()'
ccJjSfTx.jar:(.text+0x2903): undefined reference to `check_as400_lang::class$'
ccJjSfTx.jar:(.text+0x2912): undefined reference to `check_as400_lang::check_as400_lang()'
/tmp/ccP8HXmU.o:(.data+0x104): undefined reference to `check_as400_cmd_vars::class$'
/tmp/ccP8HXmU.o:(.data+0x114): undefined reference to `check_as400_lang::class$'
collect2: ld returned 1 exit status
check_as400.java:562: warning: The local variable newStart is never read
int index=0,start=-1,newStart=0;
^^^^^^^^
1 problem (1 warning)


Did i forgot to install something?
thanks,
homer78