AS400 Nagios插件java.lang.NumberFormatException:对于输入字符串:“01%S”

时间:2015-12-16 13:10:13

标签: java exception ibm-midrange nagios network-monitoring

我正在使用AS400 Nagios插件来管理AS400服务器。对于一台服务器,我得到以下返回(例外):

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

完全退货:

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)

命令:

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

我已经在Nagios Exchange论坛中发现了类似的问题和解决方案但是没有关于AS400的访问或知识我不知道该怎么做:

https://exchange.nagios.org/directory/Plugins/Hardware/Server-Hardware/IBM/Check_as400/details(见所有者的回复)。

知道如何解决这个问题吗?

提前谢谢

编辑:使用-d选项

的其他输出
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)

1 个答案:

答案 0 :(得分:0)

感谢@WillRyan:问题是导致异常的服务器具有旧版本的AS400(&lt; V6R1)。因此,“:” - 符合所需信息的标志没有正确匹配。