我使用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)
感谢@WillRyan:问题是导致异常的服务器有一个旧版本的AS400(<V6R1)。因此,发送所需信息的":"符号不正确匹配。