Posts Tagged ‘JS12’

Revisiting Nagios to monitor IBM i

It’s been a while since I played with Nagios but my son had recently shown me the Cacti plugin that works with Nagios and it was cool enough that I decided to get Nagios up and running again.

I have an SLES 11 SP1 PPC64 Linux installation that is running on my JS12 blade under VIOS (that is a mouthful!) and although I intend to run Asterisk on the JS12, I have plenty of running room for Nagios as well so I went ahead and installed Nagios. The Quickstart guide was the easiest for me.  It recommended using wget to pull the files and everything went smoothly from there. The biggest requirements are to make sure you have php and java installed but most servers these days would have those common applications already installed.

Right after I got it installed I realized I had a hosed up PHP5 installation that I had never really addressed.  I also had a devil of a time getting the KDE desktop running, all of which came back to haunt me.  I traced the PHP5 problem to a mod_php5.so module that wasn’t flagged as executable and finally got the basic Nagios web app running under Apache. The desktop is still a little squirrely but it works well enough to move around.

The next thing to do was to install the client apps for the IBM i.  I remember being *very* confused about how to get all of this working on the i before.  The confusion comes from where to install the files Nagios needs in order to run the scripts for the i.  Long ago I thought they went on the i (NO!  Nothing is installed on the i) and the instructions from the ancient version of the as400NagioPlugin were a little lean and unclear as well.  You can find the as400NagiosPlugin at the sourceforge.net site.

The simple instruction is that everything hangs out in the nagios folder in Linux, which in my case is /usr/local/nagios.  On the  Linux box where Nagios is installed, untar the file to a convenient place and then run the ./install script.  It will prompt you for your Nagios installation folder and also for your Java executable location. You will need to do a quick hack of the .as400 file in the libexec folder of nagios to change the userid and password to log on to the IBM i (remember that the “.” makes it hidden).  In the current version of as400NagiosPlugin the checkcommands.cfg file is supposed to go in the /etc folder.  What I did is rename the file to ibmicommands.cfg and dropped it into the /usr/local/nagios/etc/objects folder.  I also hacked the templates.cfg file to add a ibmi-server type just in case you want to have some server specific settings just for your i. I also added an ibmi-server (copy of the local-service service) just in case you want to tweak your IBM i settings.

The actual services that will run and check in with the i are in services.example which I changed to ibmi.cfg and put in the /usr/local/nagios/etc/objects folder.

I don’t know if this is a recent Nagios change or not but the final step in all this is to change the nagios.cfg to add the ibmicommands.cfg  and ibmi.cfg file references to the files referenced in nagios.cfg. I placed the ibmicommands.cfg reference just after the commands.cfg line e.g.

cfg_file=/usr/local/nagios/etc/objects/commands.cfg

cfg_file=/usr/local/nagios/etc/objects/ibmicommands.cfg

I added the ibmi.cfg reference in the section just after the entry for Linux servers:

# Definitions for monitoring an IBM i machine

cfg_file=/usr/local/nagios/etc/objects/ibmi.cfg

I have zipped up the relevant files as examples.  Remember that nagios.cfg goes in the etc folder in the nagios folder and the ibmicommands.cfg, ibmi.cfg and templates.cfg files go in the etc/objects folder in the nagios folder. Make sure you change the IP of the IBMihost in the ibmi.cfg.  Also, and this is very important, telnet uses unencrypted text to communicate to the server so the user ID and password are being sent unencrypted.  I hope to fix this by adding the tn5250j jar to the mix and using the 5250 protocol bean to communicate with the i  using SSL.

You can find the configuration files I used (hacked)  here.

The next “to-do’s” on the list are to add some more Java methods that implement service checking on the i.  I’d like to monitor the web servers I run and things like JDBC connections, etc.  I also want to get Cacti installed and running. I also want to add the SSL option using tn5250j.  Of course I’ll post back here as I make more progress.

It has been nice to revisit Nagios now that I clearly understand how the client agents work with the servers that they monitor.  Still some more work to do to make this a bit more secure and robust, but this was quick, easy and adds the IBM i to the servers I can monitor with Nagios.

1 Comment »

A little Linux success

After ranting about how difficult it was to install Linux on the blade (vs IBM i), I was hoping I’d get some quick resolution.  However, the scenario ended up like this:

The VIOS folks tossed it over the wall to the Linux folks.

The Linux folks determined that I did NOT have a support agreement for Linux on the blade.  They closed the call.

I reopened the call, arguing that the problem manifested itself when using the terminal window to install Linux but the terminal window, being a part of VIOS (IVM) would be part of a supported product.

Silence.

I then, through trial and error, determined it to be a Firefox issue.  I *could* install with IE8 but not with FF.  I reported this back to IBM expecting that they would proceed with determining the cause of the incompatibility and get it fixed.  Au Contraire!  Browser incompatibilities are not part of the mission of IBM support so they closed the call.

I did pick up this tidbit though, and I document it here so I can find it again: You can start the terminal for a given partition in VIOS by issuing the mkvt -ID X command  from the command line where X is the number of the partition.  To exit the partition terminal use the key combination ENTER, ~, . (period).   Whether the VIOS terminal is running in the “Remote Control” window from the AMM or from Telnet or SSH, the commands work.  So now I have a workaround.

I was able to finally get the SLES 11 Linux (PPC64)  partition running and accessible from VNC using a technique found at the Novell site where I posted. Read it all the way through.  The solution is posted at the end of the link in the post: http://forums.novell.com/novell-product-support-forums/suse-linux-enterprise-server-sles/sles-configure-administer/373530-sles-11-vnc-issue-no-desktop-just-gray.html

So that gets Linux (SLES 11 PPC64)  running again.  Now if I can get WAS 7 going on my i, the software application installation challenges for the week are done.

Comments Off on A little Linux success

The easiest partition on a JS12 blade (is NOT Linux)

A few months back I participated in the IBM i 7.1 beta program and I absolutely marveled at how ridiculously simple it was to install i5/OS on a new partition.  Create the partition, activate it, use Operations Console to connect, bada bing!  start feeding the beast with DVD’s and …done.  It maybe took two hours start to finish.

Having experienced a quick and easy install with a “difficult” operating system, I decided to try something easy.  A well supported, well known, easy to install Linux distro.  Since Suse Linux Enterprise Server is supported in the Power PC 64 bit world, I downloaded SLES 11 and pulled up the install instructions and have now spent two days trying to get the distro to install.  I have posted to a few forums but apparently Linux on Power, particularly on a JS12 blade running VIOS and the IVM to install the OS is a bit of a mystery.

The maddening part is that I have done this somewhat successfully before but I am not making much progress at the moment. The issue is getting a terminal window to display so that I can begin the install process. The JS12 implementation guide says to start a Remote control session using the AMM (easy to do) and then activate the defined partition in the IVM (also easy to do), and use the IVM option to “Open a Terminal Window” (another easy step). So far so good. The part that doesn’t seem to be working is the “terminal window” popup in the IVM that is supposed to appear to authenticate only appears for a second or two and then it disappears without an opportunity to log in. The AMM Remote Control terminal window changes from displaying the VIOS console to a blank screen. Seems to me that in my last successful attempt at installing Linux using the IVM I saw all the installation prompts in the remote console of the AMM but I can’t be sure.

The missing terminal window is a show stopper since there is no way to install the OS headless.  In fact, the original install of SLES11 was deleted because I couldn’t get the GUI to ever run, even after installing the OS in text mode (which is no easy feat).

Ah! Would it were that Linux was as easy to install as i5/OS!  Whenever I DO get it installed, I will post the “trick” here (whatever it is) so at least I can find it again…

Comments Off on The easiest partition on a JS12 blade (is NOT Linux)

The end of the rainbow

Somewhere over the rainbow, bluebirds fly…

Yes! The JS12 is still rockin and rolling so we are finally out of the woods and can once again rely on the trusty i to keep going and going.  There are still a couple of mysteries to solve: The bang! light on the SAS Connectivity Module when the tape drive is plugged in (it works though) and the mysterious “Message ID . . . . . . :   CPF9E7F” i5/OS usage limit exceeded message.  — Current processor usage across all active i5/OS partitions is 2.00  — Current processor usage for the local partition is 1.00.

Since I only have a single processor allocated to the i partition and and only one i partition configured, IBM and myself haven’t been able to figure out why i5/OS is still reporting 2 processors active for i5/OS.  PTF to come, no doubt.

Looking into some Ruby 1.9 issues and some other odds and ends while still trying to make ends meet by consulting.  At least I have a machine I can work with and I can, once again, pull the plug on the 270.

Hope to report on some CRUD frameworks in an upcoming post.  Busy as ever, but more productive now that I am not burning up time trying to keep the JS12 running…

Comments Off on The end of the rainbow

Out of the woods

The blade has now been running 5 days without a hitch so I am thinking that I have finally gotten a stable JS12.  The i partition has been running successfully and I just installed SLES 11 last night.  I am still working through some issues with *that*: It appears to have some issues with graphics so I haven’t been able to start VNC successfully yet.  But, by and large, the blade appears to be rockin and rollin now.

I want to play a bot more now.  I need to get back to my JRuby projects and get a JRuby application running on this Power 6 box and, with the Linux partition available, I’d like to try a PPC64 compile of Asterisk.  If I can consolidate more servers, I’d be able to justify having this big space heater in my basement.

More to come.  Stay tuned!

Comments Off on Out of the woods

WP Login