iStat on pfSense and server monitoring

One of my most favourite apps for my iPhone is iStat. It lets me monitor all my *nix servers in a beautiful interface. For my Linux clients, all I had to do was download the client, extract and compile. And since my router is running pfSense (FreeBSD 7.2) I thought I might as well get iStat on there.

 

Apparently, the developers edition of pfSense has all the goodies to compile stuff. Without even thinking of cross compiling, I quickly set up a VM of FreeBSD 7.1 (I know little to nothing of FreeBSD so I opted to get something near 7.2) and started to compile it. I had to get libxml2 first though and for FreeBSD 7. Anyway, logged into pfSense via SSH, fetch'd libxml2 and installed it. Now, since my router had nothing to compile packages with, I built iStat in the FreeBSD virtual machine and transfered the resulting mess to pfSense via SFTP. Now, since I couldn't have run make install in pfSense, I had to create /usr/local/etc/istat.conf and filled it in with the configuration file from another Linux client. I also edited the configuration file to fit the network interface (xl0 instead of eth0).

Looking back, I probably could have done things a little different. Either way, I got the job done. Now I'm happy that I can monitor my entire network with one app. I recommend for those that are in need of a functional server monitor to check out iStat for the iPhone. Be warned that iStat only supports one interface so far.

 

Since I have one Windows server I like to monitor that too. And for that, I have WinAdmin for remote RDP (great app) and Weave, which is almost a Windows version of iStat (but not). Awesome monitoring gauges in there. And, since it uses push notifications, it can alert me when the CPU usage is above 92% for example.

Another great agent-less monitoring app is Net Status. It simply pings the most comment ports on your IP of choice.

Also, see the attachment for the agent compiled on FreeBSD (i386). I can't guarantee that this will work for you.

 

Monitor your Linux boxen with iStat for the iPhone

So I came upon an app the other day while browsing on my iPhone. iStat. It monitors your uptime, network I/O, RAM usage, etc.. There was another app that just needed SSH access but that was another $2. Anyways, iStat has a Mac OS X, Linux, FreeBSD and Solaris port of the agent. Just simply install the agent on your boxen and done!

 

It's pretty simple to get it working, I'll go over the steps that I used on Lenny.

Grab the latest release here (at this time, 0.5.4), and extract it somewhere. For me to get it working in Debian, I had to install the libxml2-dev package first. Go ahead and type 

./configure


 

Then

make && make install

I found it's easier to get a script to start it up which you can later get to run on boot. Download this file, save it something as 'istatd.sh' and chmod it to 0755 (or 0777 if that doesn't work). I received an error about a user on using the script, but the agent still runs. Go ahead and run './istatd.sh start' .
 

Start up iStat on your iPod Touch/iPhone and add the server running the agent. That's it! If you're monitoring something Mac, you're going to get more detailed information than other OS's.  This app is well worth the $0.99 I spent on it.

 

Feel free to comment if you need help and/or have suggestions.