I often work and tweak things to get them going on OSX (not server) and then forget how I did it. Then I’ll end up wiping the machine and have to everything over and spending a ton of time on it. I should have documented getting nagios going properly and ndoutils and nagvis, but i didn’t.
But here is what I did to get the plugin check_ndo.pl working on OSX. At least part of it any way I crashed and lost some of the notes. check_ndo does exactly what its it checks to make sure that ndoutils is writing to the mysql database as expected and if not alerts you.
One weird thing that it took me lots of poking around with was why the plugin wouldn’t work from the command line. The first problem was that it was using the default perl install and not the perl install from Macports. Also it was looking in the default for linux location for the utils.pm file not the default for OSX nagios via macports.
Here is how I did it.
First edit the check_ndo.pl file. $sudo vi /opt/local/libexec/nagios/check_ndo.pl
change the use lib line to:
use lib “/opt/local/libexec/nagios”;
Next to make things easier i create a command in the commands.cfg
$sudo vi /opt/local/etc/nagios/objects/commands.cfg
I add the following:
command_line /opt/local/bin/perl /opt/local/libexec/nagios/check_ndo.pl -H $HOSTNAME$ -P 3306 -d $ARG1$ -u $ARG2$ -p $ARG3$ -i $ARG4$ -t 300
Next I added it to my localhost config, but it can be added anywhere:
$sudo vi /opt/local/etc/nagios/objects/localhost.cfg
# Service to check that ndoutils is working
Hopefully this will help me remember this in the future and anyone else who tries it.
I recently replaced the hard drive in my G5 Mac (PPC) and reinstalled the latest version of OSX. Which didn’t solve my problems, but thats a differnt topic.
Anyway I was running Nagios to monitor my home network. I do this for 2 reasons. 1 is that its just a lot of fun and 2 is that I use Nagios at work and like to play around with things at home at night before possibly putting it in production.
I recently decided that I wanted to give NagVis a try. First up was installing Nagios. The last time I did this was from source, but this time I decided to try from MacPorts, since I think it would be much faster. If I remember correctly it took lots of tweaking to get it going on OSX. The MacPorts install went perfectly. Next up was getting NDOutils loaded. This had to be done from source and after a bit of tweaking I got it working great with Nagios. NDOutils is one of the things that need to be in place before Nagvis. Next up were several modules that were needed that are not compiled into the default PHP version that is on OSX. After several hours I got all those compiled and installed. Finally was getting Nagvis going.
Well it works, sorta. The interface does come up and i can do the demo maps, but can’t create my own maps. I get odd errors and they may say something one time and something different the next time. And the apache log files may show different errors as well. No amount of searching and tweaking has gotten it working. I estimate that all together I’ve spent about 10 hours over several nights with no good results. If you have this working on OSX (not server) I would love to know how you did it.
On a side note, while searching for answers online, I actually found that Bing was more helpful than google on a lot of things I was looking for. I know, it doesn’t feel right typing that…
I finally got it all working. Took a lot more tweaking but finally its done.
The Omni Group has release several of there apps as freeware, check out the announcement and download. I have purchased some of there products, I love omnioutliner.
It’s been a while since I’ve really posted much here. I suspect that the main reason is Twitter and Tumbler is where i’ve been putting the fragments of my online lifestyle lately.
So let me see if I can summarize whats been going on lately.
HDTV is in the house. Down on the farm we use over the air to get our TV. No big deal really we don’t watch that much TV anyway. We get 2 and sometimes 3 channels on a good day. I setup one of the analog converter boxes to a TV top HD antenna and we don’t get one channel that we do watch but we now pick up one channel that we didn’t have. The quality difference is like night and day. I have also hooked the box up to the big antenna that we have with about the same results, still missing that one channel that we would like. I’m thinking I may have to get a different big antenna and a booster for it we are about 1 mile out of the range that it shows so maybe that will help. I still have to get the Tivo2 setup with IR to control it, so we don’t miss those Saturday morning cartoons the boy likes.
The boy has discovered that he really likes the old games that I once played. Like the old NES, SNES and NES64 stuff. Basically anything Mario he loves to play. So instead of hooking up all those consoles, which I still have and dragging out the boxes and boxes of games that I still have, we’ve been doing a lot of emulation stuff. First off I have all the OSX emulators running for each of the platforms. It’s surprising how much better is is at these games then I remember being and he is only 4 🙂
I love modifying anything that I have to make it do more. So I’ve hacked my PSP to allow it to run emulators to play these games also. The boy also wanted to watch his movies and stuff on his DS so I worked on that and got moonshell going so now it plays homebrew, movies and music. Next up is the Wii, It’s been hacked to use homebrew and emulators also, I just can’t help myself sometimes.
All this indoor winter fun is just about to come to an end, the days are getting warmer and the major garden work will probably start this weekend.
Well 2009 is here, seems like the year went by so fast. It’s time to get busy around the farm and I have a few interesting work projects coming up.
Happy New Year everyone!
Seem like just last week we were worried about Hurricane Gustav, well this week we had Ike. Ike actually made it up as a hurricane. First off the family is all fine and no damage to our houses. Although there are many, many people who can say that tonight and our prayers go out to them. We are without power (from the power company anyway) just like everybody else and I expect that to continue for a while.
Around the farm we have a lot of trees and stuff down. i had to drag one with the truck and cut another one up with the chainsaw just to get down the road. I saw a lot of downed trees and such today but I don’t think that anyone around here was injured or suffered any major damage. Of course I haven’t been in contact with everyone but i did man my scanner most of the day listing to the county road department and police and fire. Finally i was able to get on the laptop and dialup to see what was going on in the rest of the places.
Now the second thing thats been on my mind is the bank branches and how things are with them. All but our operations center and one branch with an automatic generator are down. There is even a report that one of the branches, the southernmost one has roof damage or no roof at all. I know there is a little damage externally at the branch I work out of, but nothing major. I guess Monday morning will be a little crazy.
Tracking IKE and thinking about DR.
Like many people we were pretty concerned about Hurricane Gustav. Initial reports said it would still be a hurricane when it reach east Texas. Luckily for us it lost most of its force before it got to us. We did get a lot of wind but it looks like the only really damage was some roofing of the old barn blew off and a door broke. So we are thankful that it wasn’t worse. The rain wasn’t as bad as predicted, we got less than 2″.
One thing that we did do was a lot of prep work and while most of the things I did weren’t needed, I’m glad we were ready just in case.
I’ve been need a few FPS games to play lately. Satellite gameplay is no fun. So I’ve been searching for some free ones for OSX. The one in the image is called Warsow.
I did have a few problems. I’m pretty sure that it’s related to the package, but none of the maps will let you play with bots, it gives you a no nav map error, I think this is only on the Mac version. To solve this you just need to do the following:
1. Go into devmap mode, this is done by pressing the ~ when you have the game loaded up and type: devmap mapname.
2. Type: makenodes
This can take several minutes. Once all the link messages stop going by its done.
3. Type: savenodes
This took several minutes on mine and eventually it disconnected. Once I reconnected bots were working just fine.
While the bots seem to be a little non aggressive from a distance, once in range there aim is deadly.