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


Remember Me

Check_as400 Popular

Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Current Version
Last Release Date
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
  • Nagios XI
Nagios plugin to monitor IBM System i (AS/400)
Check_as400 Version: 1.4.3 <2016/05/18>
* Added ITALIAN language. (Thanks to Riccardo Morandotti) 2016/04/29
* Fixed CJS status.

Check_as400 Version: 1.4.2 <2015/10/22>
* Added SSL connection option.
* Fixed username display in Login ERROR message.
* Fixed Log in failure on 10 character username.

Check_as400 Version: 1.3.2 <2015/06/29>
* Modified Rocket iCluster checks to recognize Nagios user Not Authorized to iCluster

Check_as400 Version: 1.3.1 <2015/03/10>
* Modified check CJ for duplicate jobs, can specify job number for CRITICAL and WARNING values.

Check_as400 Version: 1.2.9 : <2015/02/11>
* Fixed check MSG for LANG FR/GE string index out of range error.
(Thanks to Frederic MOURAGUES)

Check_as400 Version: 1.2.8 : <2014/03/11>
* Added check for Number of file members.
(Thanks to Tim Vandegrift)

Check_as400 Version: : <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
* For languages other than English , change system library list to ENGLISH.
*Use SSL connection
Must add CE to JAVA, EX:
keytool -import -trustcacerts -keystore /usr/lib/jvm/java-1.7.0-openjdk- -storepass changeit -noprompt -alias xxxx_ce -file /xx/xxx/XXXX.cer
Reviews (13)
bygmrocha, October 11, 2016
Narcan, the plugin not cover all version of I/OS... I´ve to 2480 (PT/BRasil). Sometimes the WRKSYSSTS change a little bit, if a PTF is applied or not. In your case, there is a field ou there isn´t a field before Disk Usage (like db capability). And the plugin is getting something about ELAPSED TIME ... there is a count in .java that represent the number of ":" found... you have to increase one or two to get the information you need.

11/10/16 17:05:37
% CPU used . . . . . . . : 0,1 Auxiliary storage:
Elapsed time . . . . . . : 00:00:01 System ASP . . . . . . : 846,7 G
Jobs in system . . . . . : 368 % system ASP used . . : 64,8842
% perm addresses . . . . : 0,048 Total . . . . . . . . : 846,7 G
in CLI: ./check_as400 -H XX.XX.XX.XX -u XXXXX -p XXXX -v US -w 10 -c 5
give me this output:
Exception in thread "main" java.lang.NumberFormatException: For input string: "00:0"
at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
at sun.misc.FloatingDecimal.parseDouble(Unknown Source)
at java.lang.Double.parseDouble(Unknown Source)
at java.lang.Double.(Unknown Source)
at check_as400.parseWrkSysSts(
at check_as400.parse(
at check_as400.main(
Hi Denise,

I had same trouble when i check job, i look at the source of the plugin "" and i debug the source. I use french language for the plugin not try in English, but if you modify
the line 946 (function ParseChkJobsts)
String status=(buffer.substring(start+53,start+60)).trim(); by
String status=(buffer.substring(start+53,start+59)).trim();
Plugins Work
You have to recompile after modification
I think same trouble apply to CJS.
Very good plugin, was able to make it work with an old os400, now we have updated our hardware/firmware and actually nagios give us "(Service check timed out after 90.01 seconds)"

I remember that on some older version I had to edit the token in check_as400.class

If I execute the check in CLI I have correct results but I have to press CTRL+C to close it.

This is what I have in debug mod :
CRITICAL - 888 active jobs in system | jobs=888;80.0;90.0;0;
Logging out...
sending F3...
waiting for token ===>...
token received.
requesting signoff...
waiting for token System . . . . ....

Have you a solution ?
Owner's reply

* 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(QSYS/QDSIGNON)

change this line

public String LOGIN_SCREEN="System . . . . .";

"System . . . . ." to fit your sigon menu

and recompile it.

I really need this plugin to check if a job is always active and his state TIMW, but i have the same probleme since 8 month and i cant resolve it:

# /usr/local/nagios/libexec/check_as400 -H X.X.X.X -v CJS EASYCOM FAX2
job(EASYCOM/FAX2) status(TIMW
# /usr/local/nagios/libexec/check_as400 -H X.X.X.X -v CJ FAX2
CRITICAL - job(FAX2) status([7;6H 1.)
# /usr/local/nagios/libexec/check_as400 -H X.X.X.X -v CJS EASYCOM FAX2 status TIMW
# /usr/local/nagios/libexec/check_as400 -H X.X.X.X -v CJS EASYCOM FAX2 status (TIMW
bash: syntax error near unexpected token `('
# /usr/local/nagios/libexec/check_as400 -H X.X.X.X -v CJS EASYCOM FAX2 status "(TIMW"

As you can see, CJ return a strange code and CJS return the state with one parenthesis...

Note: As400 is in french language so I have recompile the plugin with the correct language

Any help would be very appreciate! Thanks
byclementc, November 17, 2014
This is a very good plugin, it's work very well.
I have a question, can I put a screen number, because on one of our AS400 we stop QINTER and for connecting, we have to force screen number for security reason.
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;

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


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){
int jobs=(new Integer((buffer.substring(start,start+11)).trim())).intValue();


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

i have the same problems as hlustik.
So i wanted to recompile the plugin but got the following problems:
/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 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 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?
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(
at java.lang.Integer.parseInt(
at java.lang.Integer.(
at check_as400.parseWrkSysSts(
at check_as400.parse(
at check_as400.main(

2) check_as400_msg qsysopr

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

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");
catch (UnsupportedEncodingException localUnsupportedEncodingException) {

return 1;