MC Press Online Forum
Welcome, Guest
Please Login or Register.    Lost Password?
Re:TechTip: Monitoring Your System i5 with Nagios (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:TechTip: Monitoring Your System i5 with Nagios
#120898
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
Hi Mr Max <p>I've read the documentation on the installation of Nagios (http://nagios.sourceforge.net/docs/2_0/installing.html). It said we need to create user. Can we use CRTUSRPRF to create the users as mentioned in the docs? <p>Request for your guidance.. <p>Thanks and regards <BR>
Araman.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120899
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
Hi Mr Max <p>It seems that it require a C compiler. <BR>
Will the license program 5722WDS (Compiler - ILE C) be enough for the compilation?. Any other alternative? Please find below figure for the attempt. <p>Thanks and regards <BR>
ARaman. <p><!--mccodelink_begin--> <BR>
<!-- do not remove --> <BR>
<hr width=50 align=left><small><a href='http://www.mcpressonline.com/mc/showcode@@.6b4f0b67/1' target='_blank'>Code</a></small> <BR>
<!--mccodelink_end-->
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120900
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
Hi, <p>I don't mean to question your tactics, but is there any particular reason why you're installing Nagios on the host from which you want to monitor? <p>The general rule for monitoring and network monitoring is to install the monitoring program on a specific machine. This ensures that there is a separate machine to do just that specific task and nothing else. <p>For instance, what happens if your i5 goes down? How would you know? Nagios wouldn't be working on the host because the host could be down. <p>Typically what I do is install Nagios on a physical separate older box. I run Nagios on RHEL (or CentOS) because there are RPM packages already created so I don't have to compile code. I then check all my business critical machines from the Nagios box. Then I backup all of my configurations on my Nagios instance, /etc/nagios. This ensures that I can get an instance up and running quickly in case the Nagios host goes down. I know if my Nagios instance isn't running because I am always logged into the web interface while at work. <p>The Nagios AS400 Plugin is installed on the same RHEL machine as the actual Nagios program, as I mentioned in the tip, which requires Java. You actually have nothing to install on the i5. The only thing on the i5 that you needed to worry about was to create a user as per the plugin author's guidelines included in the readme files after you unzip the plugin. <p>Again, I don't mean to question you, but I think that you'd be better off installing Nagios on a host completely outside of any business critical servers or machines. Not that business critical machines fall apart that often, but none the less, you get a physical separate sense of monitoring this way. You can also then setup Nagios redundancy between machines if you so desired. <p>Regards, <BR>
Max
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120901
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
Is that so.. <p>It shows that I didn't read your articles carefully.. <BR>
I was only getting excited to get it up and running. <BR>
Never heard of CentOS before though.. <BR>
Now I understand.. I will try to set up a stand alone box and install in it.. <BR>
OK.. Thanks for highlighting it for me.. <BR>
Will try your approach.. <p>Thanks.. <BR>
Araman
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120902
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
CentOS is just a community based and driven version of Red Hat Enterprise Linux. It's just my preferred Linux OS, you can use any Linux OS you like or are comfortable with. <p>The Nagios project has just launched a new community wiki page. You'll find tons of documentation there, and specifically OS specific installation instructions for getting things going. <p><a href="http://www.nagioscommunity.org/wiki/index.php/Main_Page">http://www.nagioscommunity.org/wiki/index.php/Main_Page</a> <p><a href="http://www.nagioscommunity.org/wiki/index.php/Howtos">http://www.nagioscommunity.org/wiki/index.php/Howtos</a>:specific <p>Good luck! <p>Max
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120903
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
Thanks Mr Max.. <p>I'll go with CentOS, since it proven to be working in your environment. <BR>
I'll download both the linux distro and nagios and get on with the installation. <BR>
Thanks for the guide.. <p>Regards <p>Araman
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120904
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
Hi Mr Max <p>It's me again. <BR>
I've successfully <BR>
1) Installed nagios 2.8on Centos 4.4. <BR>
2) Installed JDK 1.5.0_09. <BR>
3) Setup the web interface of nagios (http://localhost/nagios/ <BR>
4) Each module is viewable on the browser after disabled the selinux <BR>
&nbsp;&nbsp;&nbsp;Even the CentOS resources is being shown. <p>My problem is : <BR>
I've installed the as400 plugins. Changed the check_as400. <BR>
Modify/add the service.cfg, command.cfg, nagios.cfg. <BR>
But still having problem making the plugins talking to my AS400. (please see my screenshot). <p>Hope you could help me out of this headache (I'm actually having it now!!)... <p>Thanks <BR>
Araman. <p><!--mccodelink_begin--> <BR>
<!-- do not remove --> <BR>
<hr width=50 align=left><small><a href='http://www.mcpressonline.com/mc/showcode@@.6b4f0b67/6' target='_blank'>Code</a></small> <BR>
<!--mccodelink_end-->
File Attachment:
File Name: 6b4f1eef_Screenshot.png
File Size: 24
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120905
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
There's a few things I'd check: <p>1) Did you follow the guidelines that the author of of the Check AS400 plugin mentions about creating a user on the 400? After you unzip the package, it's in INSTALL.txt <p>AS400 Nagios Plugin - Installation instructions <BR>
---------------------------------------------------- <p>Preinstall notes <BR>
------------------- <li> Make sure you modify the JAVA_START path in the check_as400 script.<p><li> Security Note: Realize that this plugin communicates to the AS400 via telnet, which is easy to sniff and capture user names and passwords. Use a generic user with restrictive rights for the plugin. The user needs access to wrksyssts, wrkoutq, wrkactjob, dspjob, dspsbsd and dspmsg.<p>2) Make sure that you're permissions are good on executables in the plugins directory. <p>3) Make sure your Java path is set. At the command line, type java -version or "which java" <p>A 127 out bounds usually has to do with the path and permissions to which you're trying to launch. <p><a href="http://nagios.org/faqs/viewfaq.php?faq_id=17">http://nagios.org/faqs/viewfaq.php?faq_id=17</a> <p>Off the top of my head, I'd say it's your path to Java. You have to change it in the check_as400 script: <p>/usr/java/sdk/bin/java -cp /usr/lib/nagios/plugins/libexec check_as400 -u $USER -p $PASS $* <p>Obviously this is my path, your path may very, but I see you just have java without the path in your check_as400 script. Just another thought. <p>Good luck.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120906
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
Hi Mr Max <p>After changing the check_as400 JAVA_PATH to : <p>/usr/java/jdk1.5.0_09/bin/java -cp /usr/lib/nagios/plugins check_as400 -u $USER -p $PASS $* <p>I got below screenshot. <BR>
With a fimiliar java message pattern.. <p>"Usage: check_as400 -H host -u user -p pass [-v var] [-w warn] [-c critical] "... <BR>
Meaning java check_as400 does not get the correct parameter passing... Am I right?.. (Shows the same message when I do "java check_as400".. without the parameter) <p>I guess its something to do with the command.cfg or the service.cfg now... (or other configs?) <p>Thanks! <p>Araman
File Attachment:
File Name: 6b4f1fc7_Screenshot.png
File Size: 24
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120907
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
Hi Mr Max <p>After gone through a page : <p><a href="http://www.openfree.org/pet/index.php/Nagios_Network_Monitor_-_Installation_and_configuration">http://www.openfree.org/pet/index.php/Nagios_Network_Monitor_-_Installation_and_configuration</a> <p>I noticed there is a way I can call the plugins from a console and get the info immediately without the web interface. <BR>
But since we are issuing User ID and password that needs to be saved in .as400 file, and we run the script in check_as400. Is there a way that I can confirm that the check_as400 script itself is working? <BR>
I've run the: <p>/usr/lib/nagios/plugins/check_as400 -H <hostIP> -v LOGIN <p>I received "CRITICAL - Login ERROR, Invalid password <BR>
" <p>(I logged in in my AS400 and see there is an invalid attempt!) <p>But my user ID and password is correct!.. <p>When I try: <p>java check_as400 -H <hostIP> -u <myuserid> -p <mypass> -v LOGIN <p>Error comes out.. <p>Is there any way...? <p>Thanks <BR>
Araman
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120908
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
Again, check your permissions on .as400, check_as400 and check_as400.class. They should be owned by Nagios. <p>chown -R nagios.nagios /usr/lib/nagios/plugins/check_as400 <BR>
chmod 700 /usr/lib/nagios/plugins/check_as400/.as400 <p>You need to specify the password on the command line if you want to test it manually. You're showing me: <p>/usr/lib/nagios/plugins/check_as400 -H <hostIP> -v LOGIN <p>But you're not manually typing in the password, you're relying on .as400 to supply that, and if your path is wrong and it can't find it, then yes it will error out. Run: <p>/usr/lib/nagios/plugins/check_as400 -H HOST -p PASSWORD -v LOGIN <p>If it spews back that it's an invalid login, then I'd say it's your 400 configuration. It it doesn't and it logs you in, then you need to verify your paths again for everything. This is why in the TechTip I showed to create a check_as400 direcory in /usr/lib/nagios/, then place all check_as400 items in there. <p>Aside from this, I can't assist you much more. Double check everything, and make sure paths are all consistent, and then check permissions on everything. <p>You're almost there.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120909
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
Sorry Mr Max <BR>
One last question... <p>When you say <p>"If it spews back that it's an invalid login, then I'd say it's your 400 configuration" <p>which "400" do you mean? The ".as400" or my AS400 server configuration?.. <p>After I run <p>/usr/lib/nagios/plugins/check_as400 -H HOST -p PASSWORD -v LOGIN <p>I still got => <BR>
CRITICAL - Login ERROR, Invalid password <p>even when my password is correct!!. <p>Please.. <p>Thanks.. <p>Araman. <p><li>* Will place all the check_as400 items in the check_as400 folder and try again with the new path config tomorrow.. need to go back now..
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120910
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
Hi Mr Max <p>I still not able to make the plugins function properly. <BR>
But I'm slowly beginning to understand the plugins behavior. <BR>
I think I manage to let the plugins talk to the AS400. The AS400 ID I've created is NAGIOS. <BR>
When NAGIOS server started, I can see a job QPADEVxxx under QINTER (user NAGIOS) in the AS400. <BR>
THe strange thing is, the job only lasts for 1 minutes before ended by itself. It will start again the next 30 second after it ends. <BR>
Is the plugins supposed to behave this way? Are there any settings in the AS400 that I've missed out? <BR>
Below attachment shows the joblog of how the job being ended. I got these log every time the NAGIOS telnet job under QINTER ended <p>Please show me the way.. <p>THanks <p>Araman
File Attachment:
File Name: 6b4f21dc_ESPLF.TXT
File Size: 24
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120911
R.Daugherty (User)
Posts: -2
graphgraph
User Offline Click here to see the profile of this user
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago Karma: 0  
Hi Araman, I looked at your job log and the CPF5140 is a session timeout. <p> My first guess is that the Nagios Login service alone enabled is not enough to keep the session alive. Going by what Max writes in the article, I would activate at least the Ping service in the configuration file where you activated Login, and others you plan to use. <p> In looking at the information on telnet to the AS/400, I never did see a default 1 minute timeout. From Joe Hertvik's "Admin Alert: Readers' Insights on Inactive Jobs and QSTRUPJD Job Logs" <a href="http://www.itjungle.com/tfh/tfh100702-story05.html">http://www.itjungle.com/tfh/tfh100702-story05.html</a> and others I see a default 10 minute timeout that would detect dead telnet sessions and end the job. <p> If yours was set down to 60 from the default 600 then that would be an explanation, but that's also a stretch that the Nagios AS400 plugin looks dead to the AS400 with just the Login service enabled, and that's assuming that's all you have enabled. Lots of stretches there to explain it. <p> Worse would be IBM's note that it's usually caused by network communication problems. I'm assuming some back and forth to be able to login so assuming that basic to and from communications is working for the successful logins. <p> Here's the very helpful IBM Telnet Session Drop Checklist <a href="http://www-1.ibm.com/support/docview.wss?uid=nas1a53b17cf8d5ed7c386256cf3006ba9d2">http://www-1.ibm.com/support/docview.wss?uid=nas1a53b17cf8d5ed7c386256cf3006ba9d2</a> <p> Hope just enabling the Nagios Ping and other services you want to use is all it takes. :) <p> rd
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120912
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
Hi RD.. <p>I actually "manage to run" the plugins. But in a very strange way. <p>Scenario 1: <p>I tried to run the check_as400 script manually. <p>1) I stop the nagios service (service nagios stop) <p>2) I recreate the AS400 user ID (delete and create again) <p>3) I run the check_as400 -d -H <HOSTIP> -v LOGIN <p>4) I got "OK - Login completed successfully" !!! <p>5) When I try to run again (3).. it hanged at "waiting for token..." <p>Findings => It only works one time!? (after recreate the ID) <p>Scenario 2 <p>I try to run the web interface (acces nagios from <a href="http://localhost/nagios)">http://localhost/nagios)</a> <p>1) I stop the nagios service (service nagios stop) <p>2) I recreate the AS400 user ID (delete and create again) <p>3) I start the nagios service (service nagios start) <p>4) Only one AS400 service is shows OK status (either one of the AS400 services except for ping, which always OK) (*Screenshot) <BR>
=> Status information value stays the same (no changes after few refresh.. the status value is only retrieved one time!!) <p>5) After few refresh, all the AS400 plugins services goes CRITICAL.. <p>6) If I would repeat step 1) to 3) the other AS400 service will take turn to be OK.. (??!!)... until it eventually turn to CRITICAL later.. <p>Findings=> It only work one time!!.. <p>Assumption: Somehow some memory or buffer is not being released.. <p>Overall : I still cannot make the plugins to work properly. <p>Anyone have any ideas? <p>Thanks <p>Araman. <p><!--mccodelink_begin--> <BR>
<!-- do not remove --> <BR>
<hr width=50 align=left><small><a href='http://www.mcpressonline.com/mc/showcode@@.6b4f0b67/14' target='_blank'>Code</a></small> <BR>
<!--mccodelink_end-->
File Attachment:
File Name: 6b4f2215_Screenshot.png
File Size: 24
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120913
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
As Ralph mentioned, investigate the Ping service. I mentioned this once before, but you have to give the Nagios user access to certain things as the plugin README file suggested. Start opening up your Nagios user by granting rights until it works, and then you can start backing off what the user can and can't do. This doesn't sound like a Nagios problem. The Nagios plugin is passing off the paramters just fine. <p>The reason Nagios shows that it works once is because it does, and then after that, all services are dependent on LOGIN, which I mentioned before. If you can't LOGIN, then all the services can't be checked anymore so they go critical. This is typical. After you get it working, I mention in the article exploring the use of Nagios service dependencies, so you won't be bothered by all services, and only be notified of LOGIN if it fails. That's later though. <p>Looks like you got the Nagios stuff working correctly, though, so start with tweaking your AS400 Nagios user. Again, the author suggests a basic user access to the following rights. Troubleshoot with what Ralph gave you, and then keep tweaking your Nagios user. <p>README/INSTALLING <p>Security Note: Realize that this plugin communicates to the AS400 via telnet, which is easy to sniff and capture user names and passwords. Use a generic user with restrictive rights for the plugin. The user needs access to wrksyssts, wrkoutq, wrkactjob, dspjob, dspsbsd and dspmsg.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120914
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
Thank you Mr Max , RD <p>The Nagios is running properly now.. <p>My linux expert friend comes to the rescue.. <BR>
He look at my debug attempt (where it hangs) and I explains a few anomalies.. <p> ./check_as400 -D -H <HOSTIP> -v SBS QINTER <p>Then ask me to change the settings in the AS400 user profile. <BR>
The problem lies at (Display sign-on information (DSPSGNINF)) <BR>
Changed it to *NO. ... then the command run smoothly. <p>Thank you Mr Max, RD, for helping me along the way <p>Your guys are the best!! <p>Screenshot (nevermind about the fax services.. We do not have it running in our iSeries.. I just want to see how it works.)
File Attachment:
File Name: 6b4f2303_Screenshot.png
File Size: 24
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120915
R.Daugherty (User)
Posts: -2
graphgraph
User Offline Click here to see the profile of this user
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago Karma: 0  
and thanks to our Linux expert friend, too. :) <p> I see from the screenshot that the Nagios people have done a fine job on this open source project. Kudos to them. <p> rd
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120916
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 8 Months ago  
Excellent! Have fun playing with the other gazillion things Nagios can do. :) <p>Max
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120917
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 6 Months ago  
Greetings again Mr Max <p>After successfully bringing up Nagios, I tried to get it to display performance graph (CPU & Storage).So I google around..and ended up with Oreon.So I've begun the quest to get the Oreon up and running. <BR>
Well, after more than 1 month, I manage to get it up and running. I even got the graph to display (after some tedious search and bringing up all the modules (perfparse, mysql, ods .. etc) that it requires). <BR>
I actually edited the check_as400 code to enable it to display graph in Oreon. <BR>
But I ended up with incomplete functions in Oreon which I am still trying to make it work. THis is frustrating.. <BR>
In my opinion, the reporting part of Oreon is not as complete and "matured" as compared to Nagios. It is confusing to troubleshoot. <BR>
The Nagios box also need to run additional services.. <BR>
Unexpectedly, I come across nagiostat after the Oreon graph success (huh!!).. Ironically, it require to change service_perfdata_command to its own nagiostat command. So, it is either Oreon or Nagiostat. <p>Should I continue the quest for Oreon to be fully functional? <BR>
Have you ever get the graph working in Nagios alone? <p>What do you think Sir? <p>Rgds <p>Araman
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120918
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 6 Months ago  
To be honest I don't worry about graphing in Nagios, and I've never used Oreon before, other than hearing about. You might want to look at MRTG for this purpose since it's documented on the Nagios site. <p><a href="http://nagios.sourceforge.net/docs/3_0/mrtggraphs.html">http://nagios.sourceforge.net/docs/3_0/mrtggraphs.html</a> <p>I don't usually worry too much about graphical things with Nagios, because I just want it for reporting to me whether hosts and services are up and down. <p>I do monitor a few graphs across MRTG and SNMP to watch traffic in and out on a few servers, but for one, that's not what you are referring to, and two, it's using MRTG on Linux, again nothing to do with Nagios performance data. <p>The link I passed on is about as much help as I can offer on this topic. MRTG's website is full of information as well, but again, I don't know how easy it is to use it for Nagios perf data. <p><a href="http://oss.oetiker.ch/mrtg/">http://oss.oetiker.ch/mrtg/</a> <p>Please take the time to search Nagios documentation and their wiki site. Most information can be obtained from the new docs and community website that was launched a month or two ago. <p><a href="http://www.nagioscommunity.org/wiki">http://www.nagioscommunity.org/wiki</a>
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120919
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 6 Months ago  
You are right.. <BR>
The main purpose of this solution is to monitor & notify us the availability of the host/service. <BR>
Other additional functions are bonus for reporting. <BR>
It's already functioning as what is expected. <p>Thanks for additional info on MRTG.Will check on it. <p>Thanks for helping me this far.. <p>Regards <BR>
Araman.
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#120920
Guest.Visitor (Visitor)

Birthdate:
TechTip: Monitoring Your System i5 with Nagios 1 Year, 6 Months ago  
You're most welcome. There are a lot of other reporting tools available, I'm sure, for Nagios. But from what little experience I have with MRTG, I recommend it because it doesn't require a database backend to use. Search <a href="http://www.nagiosexchange.org">http://www.nagiosexchange.org</a> for "reports" or "reporting" and you might find something already easily interfaced as well. NagiosExchange is a wonderful community driven site for plugins and packages to use with Nagios. <p>I'm glad you got things going, and thanks for reading! :)
 
Report to moderator   Logged Logged