2

istat server monitoring via iphone

Posted by Gabriel on Nov 27, 2009 in iphone, linux, server admin

So last night I decided that with my shiny new iPhone I was gonna check out a few apps for monitoring servers, obviously running my own server and a few VMs on it monitoring it is very important (but until now has basically been me checking top/free etc when I remember and getting an email if any vm doesn’t respond for a preset time).
I knew the company that produced istat pro (a mac os widget for monitoring your local system) had something so I decided to give that a try, cunningly named istat. £0.60 spent at the app store and I was sorted, it was easy enough to set up monitoring my mac book from the iphone when on the same wifi (it does it via bonjour) but a little trickier to setup the port forwarding on my airport base station (yes I’m an extreme Apple user now, but not an evangelist of Apple so I get to avoid the fanboi name tag, at least that’s what I tell myself). After checking I could still monitor my mac book via 3G it was time to move on to the servers.
Now the company the produces the istat monitoring app and istat pro (islayer aka bjango) doesn’t officially have a daemon for running on *nix, but some kind soul had created one which bjango links to from their home page, called istatd (istats daemon, geddit?) which is available via google code.
So, ssh into my experimental vm (running ubuntu 8.04 lts) that I use to try new stuff out on,

wget http://istatd.googlecode.com/files/istatd-0.5.4.tar.gz
tar xvzf istatd-0.5.4.tar.gz
cd istatd-0.5.4
./configure

, ah, dependency, no problem

sudo aptitude install libxml2-dev
./configure

and it passes fine this time.

sudo make
sudo make install
and there we have it, all installed, the configure file by default goes in rather a bizarre place, so we do

sudo nano /usr/local/etc/istat.conf

and made it for my configuration look like this

#
# /etc/istat.conf: Configuration for iStat server
#

# network_addr 127.0.0.1
# network_port 5109
server_code 10293
# server_user istat
# server_group istat
# server_socket /tmp/istatd.sock
# server_pid /var/run/istat/istatd.pid
# cache_dir /var/cache/istat

# Note: Only support for one network interface, limited by client.
monitor_net ( eth1 )

# Array of disks to monitor. Specify mount path or device name.
monitor_disk ( / /home /usr /var /mnt/music )

# Set to 1 if you want to use mount path as label instead of the device name.
disk_mount_path_label 1

# Try to probe the filesystem for disk label, will override the mount path label.
disk_filesystem_label 1

# Set custom disk label. Will override all other labels.
# disk_rename_label /dev/sda1 "root"
# disk_rename_label /home "home"

# End of file

make sure you do this line so that you get a nice display of your mounted points
disk_mount_path_label 1

Now unfortunately there’s no standard init script for it, so atm it gets started with
sudo istatd &
though I’ll probably knock one together at some point and there we have it, all nicely done and monitoring the vm, it doesn’t monitor temps or fan speeds atm but hopefully sometime it will, here’s an image of it monitoring the vm this blog is on

istat monitoring istatd on 403.be

istat monitoring istatd on 403.be

I’m going to try installing it onto my SuSe vm this evening, so I’ll update this post with how that goes as well as any init script I come up with.

btw if you don’t know how to grab a screen shot of your iphone, hold the home key and press the sleep key at the top, a flash of white later and it’s saved on your film roll.

Tags: , , , , , , , ,

Copyright © 2010 Random Rantings of a Demented Mind All rights reserved. Theme by Laptop Geek.