Problems with "check_as400"

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rbaholding
Posts: 30
Joined: Tue Dec 11, 2012 10:06 am

Problems with "check_as400"

Post by rbaholding »

Hi!
I want to control my server AS 400 (it's all in Spanish) and followed the following steps:

tar-xzvf as400NagiosPlugin-018.tgz
cd as400NagiosPlugin
mkdir /usr/local/nagios/libexec/check_as400
cp *. class /usr/local/nagios/libexec/check_as400/
check_as400 cp /usr/local/nagios/libexec/check_as400/

Then create a hidden file that contains the user name and password for the AS/400 user.

cd /usr/local/nagios/libexec/check_as400/
vim .as400
USER=as400_account
PASS=as400_password

chown -R nagios.nagios /usr/local/nagios/libexec/check_as400/
chmod 700 /usr/local/nagios/libexec/check_as400/.as400

I edit the file "check_as400" and write the path Nagios, Java and plugins:

vim /usr/local/nagios/libexec/check_as400/check_as400

USER=`cat /usr/local/nagios/libexec/check_as400/.as400 | grep -e USER | cut -d = -f 2`
PASS=`cat /usr/local/nagios/libexec/check_as400.as400 | grep -e PASS | cut -d = -f 2`
/usr/bin/java -cp /usr/local/nagios/libexec/check_as400 check_as400 -u $USER -p $PASS $*

I do a test from SSH: ./check_as400 -H myserver -u xxxxx -p xxxxx -v LOGIN. The result is: "OK - Login completed successfully" but does logoff. Why?
1.jpg
If I do a test from the web interface, the output comes out empty and if I make an application changes, this error appears:
2.jpg
3.JPG
I've seen at the following URL: "http://exchange.nagios.org/directory/Pl ... 00/details" to do the following steps:
Login AS/400 Nagios check ID
CHGUSRPRF USRPRF(NAGIOS) DSPSGNINF(*NO) ---> Result is correct.
CHGSYSLIBL LIB(QSYS2984) OPTION(*ADD) ---> Result is incorrect. QSYS2984 Library not found.

I do not know follow....

Thanks in advance.
Regards.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems with "check_as400"

Post by scottwilkerson »

run

Code: Select all

chmod +x /usr/local/nagios/libexec/check_as400
This should get rid of the 126 error you are seeing for the configured service

The "test command" button may have some difficulty with certain commands as it tries to escape special chars but this doesn't always work propperly
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rbaholding
Posts: 30
Joined: Tue Dec 11, 2012 10:06 am

Re: Problems with "check_as400"

Post by rbaholding »

Change the permissions that you told me, but now I get the following message: "(Service Check Timed Out)".

I modified the file nagios.cfg the following command: service_check_timeout = 600. But still I kept failing.

We can not have my AS400 server is all in Spanish?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Problems with "check_as400"

Post by scottwilkerson »

If your username or password have special chars in them you may need to put quotes around them in XI
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
rbaholding
Posts: 30
Joined: Tue Dec 11, 2012 10:06 am

Re: Problems with "check_as400"

Post by rbaholding »

My username and password is case-sensitive letters and numbers
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Problems with "check_as400"

Post by abrist »

Could you try running the check from the command line again, this time as the user "nagios"?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
rbaholding
Posts: 30
Joined: Tue Dec 11, 2012 10:06 am

Re: Problems with "check_as400"

Post by rbaholding »

Sorry for the delay in answering ....

I tried to run from a command line. The answer is: "OK - Login completed successfully" but I get the prompt to continue writing.
Captura.JPG
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Problems with "check_as400"

Post by lmiltchev »

I am not familiar with this plugin, nor I can test it in our environment, but just a "wild guess"... Did you follow all of the instructions listed under the "Install Note":
* For languages other than English , change system library list to ENGLISH.
http://exchange.nagios.org/directory/Pl ... 00/details
Be sure to check out our Knowledgebase for helpful articles and solutions!
rbaholding
Posts: 30
Joined: Tue Dec 11, 2012 10:06 am

Re: Problems with "check_as400"

Post by rbaholding »

In the end I ended up running ..... I found a check_as400_lang.java Spanish, v0.20 compiled and it worked correctly.
Locked