AS400 Nagios 插件 java.lang.NumberFormatException:对于输入字符串:“01 % S”
AS400 Nagios Plugin java.lang.NumberFormatException: For input string: "01 % S"
我正在使用 AS400 Nagios 插件来管理 AS400 服务器。对于一台服务器,我得到以下 return(异常):
java.lang.NumberFormatException: For input string: "01 % S"
完整 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)
命令:
./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)。因此,greps 所需信息的“:”符号没有正确匹配。
我正在使用 AS400 Nagios 插件来管理 AS400 服务器。对于一台服务器,我得到以下 return(异常):
java.lang.NumberFormatException: For input string: "01 % S"
完整 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)
命令:
./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)。因此,greps 所需信息的“:”符号没有正确匹配。