System Monitoring with Nagios – Part 2 of 4

nagios I have decided to write a three part article on the benefits of using Nagios. The first article focused on why I chose Nagios/what it offers. This second article will focus on installing Nagios on Mac OS X. The third article will focus on configuring Nagios. The fourth article will focus on improving the Nagios interface and further customizing it.

Downloading Nagios 1.2 (and other files)

At the time of this article, the stable release of Nagios is 1.2. There is a beta out for version 2 (2.0b4), but I decided to use the stable release. There are two few files you will need to download to properly install Nagios: the core distributionand the plugins. I also would recommend looking at the Nagios Exchange for extras, and of course xicons for some good looking replacement icons.

Installing Nagios 1.2

I used a few good web site tutorials on how to install Nagios, so no need to rewrite it. I will pass on the resources I used and, of course, make some random comments.

My random comments

  • After the install, you are left with several conf files that need to be renamed. Make sure you save yourself some time by using sed to rename the muliple files all at once:
    for i in *cfg-sample; do mv $i `echo $i | sed -e s/cfg-sample/cfg/`; done;
  • Do not forget about installing the plugins, make sure you install them after you build and install the core distribution.
  • Consider using SSL on the server you are running Nagios so your password is not sent in the clear
  • Be prepared to spend a good amount of time on configuring the many conf files

In part 3 of 3 of my Nagios articles, I will go over my conf files and try and explain as much as possible so your Nagios configuration will go a little more smootly than mine did my first time around.

System Monitoring with Nagios – Part 1 of 4

nagios I have decided to write a three part article on the benefits of using Nagios. This first article will focus on why I chose Nagios/what it offers. The second article will focus on installing Nagios on Mac OS X. The third article will focus on configuring Nagios. The fourth article will focus on improving the Nagios interface and further customizing it.

If you manage a network with multiple servers or perhaps even just one server that runs multiple services (HTTP, SMTP, SMB, AFP, FTP, etc) and are looking for a network monitoring utility, look no further. Coming from a Mac OS background, I have used my share of monitoring utilities, and I am most impressed with Nagios.
In summary, Nagios monitors services or servers for failures/warnings so you, the Sys Admin, can take care of any problems as soon as they arise. You can set up Nagios to email you, page you, IM you, etc as soon as a problem is found with any of your servers.

Why Nagios?

  • Nagios is open source and O’Reilly ranks it as the #2 open source packages for System Administrators
  • Nagios has a web interface. Regardless of your location, you can always check your network’s health as long as you have access to a web browser.
  • Not only can you monitor network services (HTTP, FTP, etc), you can also monitor host resources (disk and memory usage, processes, log files, etc. Nagios will also monitor environmental factors too (temperature).
  • Reporting. You can easily create reports on trends, availability, alerts, notifications via the web interface
  • Plugins. You can easily develop your own host and service checks if Nagios does not have exactly what you need
  • Schedule downtime. We all have to upgrade our servers or restart them at some point. Nagios allows you to easily define “downtime” so you are not notified during scheduled maintenance.
  • You can use the web interface to acknowledge any problems (so you can stop getting notified over and over again until the problem is resolved).
  • Redundant and failover network monitoring. Great, you have monitor your network and servers from within your own network, but what happens when that goes down? Multiple installs (master and slave) of Nagios can be configured to communicate with each other so if one network cannot be contacted, the other Nagios install will take over.

The list goes on and on. Check back for part 2…the install.

podcasts, nano, emacs, vps, and magnetic poetry.

  • podcasts: I am a workaholic. I stop to take the dog out, eat, and watch Guiding Light. My grandmother listened to it on the radio. My mother watched it on the TV, and now, I can make the next jump in technology…CBS is now offering each episode as a podcast.
  • iPod nano: Good work Apple. This new iPod is a great display of your amazing design.
  • emacs: Today I officially made the move to emacs for my new text editor of choice. I have been trying to make the move since last spring…and the day is finally here. Pico and nano were fun, but time to move on.
  • vps: Damn it is cool to have your own personal UNIX server. I have had a lot of fun setting up Apache, MySQL, Exim, BIND, etc….and soon to be Q3A Server.
  • magnetic poetry: Everyone needs a break. Try relaxing with some magnetic poetry.

how to easily disable SSH for an individual user.

If you ever use Mac OS X client as a file server, or any type of server where you want some users to have access to SSH and others not, you can easily make it happen by using our old friend NetInfo Manager Applications > Utilities > NetInfo Manager. You can, very quickly, make sure that pesky user does not have shell access by defining the shell for the user as /bin/false. Sure there are other command line ways to do it, but come on, any chance to work with NetInfo Manager…you are going to take it!


installing Solaris 10, part 2.

Well. Now that I have Soalris 10 installed (failure on disk 2 and disk 3), I have been trying to learn the ins and outs of the system. I have been struggling with trying to get Java Desktop System 3 to start up. I can work in Common Desktop Environment without any technical problems, but who wants to work in that? Since I had some failures with disks 2 and 3 with several attempts, I am going to try and do the install using NFS via my Mac Mini to try and eliminate any possible CD issues. At this point, I am warn out. Just when I think I have a solution, I run into another problem, but I am last install will pay off. I now, after spending hours at and reading a lot in the Sun forums, have a better idea about my partition needs as well as now knowing the install inside and out. (So I guess not all is lost) This has been quite the learning process, but I still have confidence that all this hard work will pay off. If nothing else, I now also know CDE. More to come.
[tags]Solaris 10, Sun[/tags]

installing Solaris 10, part 1.

I had decided last month to get a Sun machine so I could check out Solaris 10 (and Solaris in general). Why Solaris? Why not! Sun has been a leader in creating rock solid, high performance hardware and software, and now they have released Solaris for free. Time to check it out. I downloaded the four CD images from Sun’s web site (nice job with the redesign Sun!) and thought the process would be realitively fast and painless. Then reality sunk in. New hardware (Sun Ultra 10) and a new OS (Solaris 10) caused me some stress. Everything seemed to take longer than expected. Some of my roadblocks:

  • I wanted to start from scratch with a clean drive, but I did not know how to reformat. Research was done.
  • During my reformatting research, I realized that Sun requires a different partition scheme, so I followed what Sun recommended.
  • While trying to figure out the partition scheme, I realized I needed to get a bigger drive in my Ultra 10. (8 gig drive in there now) When I finally got around to installing the system, I had to cut a lot out.
  • I have never purchased/formatted a drive for a Sun machine, I had to do research to make sure I could use the 20 gig IDE drive I have laying around
  • I was not familiar with the Sun support section, so I had to learn how to get around that on top of everything else.
  • The CD install was amazing slow.

What I have learned so far: I am a terminator. Five hours into this process I was still determined to get everything running. I also realized that A is extremely patient with all my computer equipment all over the house. Thanks! I also realized that this whole process, frustration and all has been and will be a great experience for me to go through, and I look forward to actually using Solaris this weekend once I get the other drive in place. I will have more to report this weekend when I re-install the system with the bigger drive.
[tags]Solaris 10, Sun[/tags]

and the winner is: Sun Ultra 10.

Time to learn Solaris, yeah. Time to get a PC, no. 😉 I finally got a Sun Ultra 10 lined up for me, and should hav eit some time next week. I am not looking for speed or anything much, just something to play around with, learn Solaris, and get serious about high availabilty servers. If all goes well, I will have a Sun Blade 1500 someday. On another note, Fedora FC3 is working out well, and I am enjoying learning the ins and outs of it.

Fedora FC3

Now that I am no longer doing any Linux/UNIX training, I thought it would be best to have a Linux machine running so I can stay on top of what I learned. After trying out Mandrake Linux (now Mandiva), considering Yellow Dog, etc, I decided to give Fedora FC3 a try. Why? Well, there is a lot of movement with Red Hat Linux, and I decided to go with something that was built by the same community. I wanted to get familar with a widely used flavor of Linux. Yeah, I would get better performance with Yellow Dog if I ran it on my G5, but I wanted to make sure I chose something that I could use on various platforms…and get active in the development community, or at least the listservs.

I grabbed the images, read some information on installing it for PPC, and took off with it. I decided to install Fedora via FTP which worked like a charm. (I used this method with NetBSD way back in 2000). I had some problems getting the X environment up and working, but now I am rocking and rolling. I am impressed to see that so many applications come with the basic install. During my second install, I decided to do a custom install to see all of the options, and again I was very impressed. Good work developers. Perhaps I will post more later.


PS. Get well soon Susan!

solaris and an umbrella.

Here I am…thinking (dreaming) about replacing my Apple G4 Cube with a sweet Sun Solaris set up, since all my web development work at home is done with text editors and It is definitely time to learn Solaris, but I do not want to put out the $$ for Sun hardware (and yet I do not want to buy PC hardware either). Ken turned me on to Shuttle hardware which is a SFF (small form factor) maker, and their hardware looks pretty decent…and is something I am not used to…it is cheap. I built a complete computer for under $700 (I have a hardrive for it already) which Ken assures me would be a killer game machine if I actually put W on it. Yeah that’s right, I will not spell it out 😉 . This is very tempting for me (a cheap solution running Solaris), but now it is time to make sure everything will work nicely with Solaris. I will say I am very happy with Apple for making hardware purchasing so easy, but it is really quite wild to me to have so many options. Choose your poison I suppose. Back to Sun’s web site to check out the forums.
PS, while searching for “SN95G5, Solaris” I came up with something crazy (the umrella part of the post). Can’t get too much mroe random than that.
[tags]Solaris 10, Sun[/tags]

linux/unix admin certified!

Finally…I finished up my last two Perl projects, and now am officially certified by the University of Illinois and O’Reilly as a Linux/UNIX Administrator. A big thanks to Ben for putting up with me and my frustration with Perl…which I kind of like now 😉 .
A few UNIX hints for today:

  • Did you ever want to know how much free disk space you have on your *NIX server/desktop? Use the command df. I usually use df -h to get a more friendly output.
  • Perhaps you want to display disk usage statistics. Use the command du. I use the command du -h to once again get a more friendly output. * -c will show you the total disk space used, while another favorite of mine: du -d [0-9] (ex. du -d 1 to see disk space used one directory level in). This is helpful if you do not want to see all your directories listed.
  • Read the man pages!