javaexceptionibm-midrangenagiosnetwork-monitoring

AS400 Nagios Plugin java.lang.NumberFormatException: For input string: "01 % S"


I am using the AS400 Nagios Plugin in order to manage AS400 servers. For one server I get the following return (Exception):

java.lang.NumberFormatException: For input string: "01      % S"

Full return:

Exception in thread "main" java.lang.NumberFormatException: For input string: "01      % S"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:492)
        at java.lang.Integer.<init>(Integer.java:677)
        at check_as400.parseWrkSysSts(check_as400.java:1048)
        at check_as400.parse(check_as400.java:626)
        at check_as400.main(check_as400.java:470)

Command:

./check_as400 -H xxx.xxx.xxx.xxx -v JOBS -w 21000 -c 23000

I already found a similar problem and solution in the Nagios Exchange Forum but without access or knowledge regarding AS400 I do not have any idea what to do:

https://exchange.nagios.org/directory/Plugins/Hardware/Server-Hardware/IBM/Check_as400/details (see Owner's reply).

Any idea how to solve this problem?

Thank you in advance

EDIT: Additional output with the -d Option

Establishing connection to server...done.
Logging in...
  waiting for screen...
    waiting for token IBM CORP...
    token received.
  sending login information for QPGMR...
  waiting for login to process...
    waiting for token ===>...
      responding to allocated to another job message...
    token received.
Login completed.
Sending command (0)...
    waiting for token ===>...
    token received.
Command sent.
Parsing results...
Exception in thread "main" java.lang.NumberFormatException: For input st                                                                                                                                                                     ring: "01      % S"
        at java.lang.NumberFormatException.forInputString(NumberFormatEx                                                                                                                                                                     ception.java:65)
        at java.lang.Integer.parseInt(Integer.java:492)
        at java.lang.Integer.<init>(Integer.java:677)
        at check_as400.parseWrkSysSts(check_as400.java:1048)
        at check_as400.parse(check_as400.java:626)
        at check_as400.main(check_as400.java:470)

Solution

  • Thanks to @WillRyan: The Problem is that the server which causes the exceptions had an older version of AS400 (< V6R1). Therefor the ":"-signs which greps the wanted information did not correctly match.