Update: iStat on pfSense

 

pfSense 2.x runs on FreeBSD 8, instead of the previous 7. I wanted to get istatd working on my router, so I fetch'd libxml2 from here and the istatd binary (version 0.5.7) compiled against FreeBSD 7 from my previous blog post, here. For this to work, you'll also need the iOS app. When running istatd, it complained about some libraries. I simply created symlinks from the old library to the new one and everything worked fine, see below.

ln -s /lib/libz.so.5 /lib/libz.so.4
ln -s /lib/libkvm.so.5 /lib/libkvm.so.4

You can get a template for the configuration file here and put it in a nice place, like /etc/istat.conf 

Create your user, group and socket file and you're good to go:

pw user add -n istat
pw useradd istat -G istat
touch /tmp/istatd.sock

Then, you can run the istatd daemon with just

istatd -d -c /etc/istat.conf

 Now, you'll be able to monitor your pfSense box with iStat!

 

 

 

 

 

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.