Monitoring Archive

http://www.syslogserver.com/syslogagent.html

Nice.  Handy tool I can see a few uses for.

Be the first to comment

Extending LVM for LXC

Posted May 1, 2013 By Landis V

I finally got back to experimenting with LXC recently.  There have either been some improvements, or I’ve given it sufficient time to sink in, because it’s pretty much a cinch now (at least as long as you’re not trying to bridge the network, but that’s another story).

I’ve managed to set up a fairly lightweight VirtualBox host running Ubuntu with an Ubuntu container for use as a monitoring server.  Unfortunately my planning was a little shortsighted when I initially set the system up, and I left myself short on space.  With the help of the following sites, I was able to extend my logical volume using the LVM tools and (hopefully, I haven’t checked yet!) clear an ugly splat on my monitoring display.

http://www.howtogeek.com/howto/40702/how-to-manage-and-use-lvm-logical-volume-management-in-ubuntu/
http://sujithemmanuel.blogspot.com/2007/04/how-to-add-disk-to-lvm.html
http://www.turnkeylinux.org/blog/extending-lvm

With the help of the man page for lvextend I was able to determine the appropriate command to resize the logical volume to the total free space in the volume group with ‘lvextend -l+100%FREE /dev/vol-group-name/root’.

All together, here’s the summary of what I did.
Added a VDI disk in VirtualBox
fdisk /dev/sdb
Partitioned as needed, per first link.
pvcreate /dev/sdb1
vgextend vol-group-name /dev/sdb1
lvextend -l+100%FREE /dev/vol-group-name/root
resize2fs /dev/vol-group-name/root
Confirmed that the added space was apparent to the kernel.
df -h
Finally, I restarted my monitoring container.
lxc-start -d -n monitor-01
And confirmed that the free space was also apparent within the container.
df -h

After checking the basics, I confirmed that everything looks clean and clear in the monitoring system. Now I’m on to the task of figuring out how best to monitor some new equipment.

Be the first to comment

Android Phone as an IP Camera

Posted January 19, 2013 By Landis V

My wife mentioned a listing on one of the Facebook exchange groups that have become popular lately, and it got me thinking about a topic I’ve considered before, but in a new way.

A similar model of Levana monitor from Amazon.

The listing was for a Levana Era baby monitor (similar to the one pictured at left), which does appear to be well received and fairly feature rich, and which we will probably end up purchasing as well, because my projects always tend to exist in a state of perpetual beta! As I was reading about the features and functionality of the Levana product, I had the same thought I always have when looking at cameras – it would be great if this was an IP device I could simply view from my Android.  This inevitably led to searching for established hacks on the Levana, and as typically happens, determining that it would probably be cheaper to just purchase a regular IP camera for use on the network (which we will also probably do at some point in the future), searching the Android market for apps related to video monitoring, running across the IP Webcam app, and the recollection that we have a Samsung Acclaim laying around with a broken screen, just waiting to be given a purpose and to have new life breathed into it. After locating the phone, the first step was to “root” it.  This step is probably not essential for the basic webcam functionality and can be skipped if you don’t require the remote access, firewalling, or logging I plan to implement in subsequent steps.  For the Acclaim, I used the intercept-root application available at http://intercept-root.googlecode.com/files/interceptRoot.apk.  If you enable installation from unknown sources (Settings -> Applications -> Unknown sources), you can download directly to your phone using the browser and install in two clicks once the download is complete.  The exploit took after running twice, and I had a rooted device. Part of the reason I hadn’t yet repurposed this device was the presence of SMS/MMS messages that we wanted to save.  A little searching led me to SMS Backup + in the market, which turned out to be an amazingly slick little app that I set up to back up my own SMS, MMS, and call records as well.  I did encounter one error while running the backup on the Acclaim, but simply hitting the Stop button in the application caused it to clear and continue with the backup process. Once message backup was complete, I performed a factory reset on the phone to remove all unneeded applications and data.  The phone rebooted with factory default configuration, and I set it in airplane mode and configured my wireless network settings.  I reinstalled the root application (optional, and not absolutely necessary as the phone retains root through the reset).  Because I use two factor authentication with my Google account, I needed to set up a single-use password under my Google account just for this phone.  The Market application automatically updated to the Play Store, and I installed Titanium Backup to allow the removal of a few items I didn’t really need.  At this point I noticed that my e-mail and contacts had sync’ed to the phone, which I didn’t really want or need, so I went ahead and disabled automatic synchronization.  In hindsight I should have set up the account and disabled synchronization right away, but I’m not significantly concerned about it for the time being; I have considered removing the GMail application from the device, but I’m not yet sure if I will end up needing it for any type of alerting/notification from the camera. Since the phone was up on my wifi connection at this time, I also added a static DHCP reservation for it on my wireless router.  This procedure varies by router model, but is generally fairly well documented with a little searching.  I wanted to have an SSH server installed on the phone so I have a way to access it without having to physically hold it in my hand, as well as to provide an option for tunneling video from the camera across a secure connection.  This is also overkill in most environments, but is an option if you choose to do so.  I ended up using SSHDroid as an SSH server after initially wasting several hours trying to get DropBear to start.  Interestingly enough there were some additional benefits to SSHDroid that I wasn’t expecting (like bash command completion and automatic color directory listings), so it was definitely worthwhile.  Just wish I had done it sooner.

I’ve had this post sitting as a draft for a while, and I think in the interest of perhaps having it be helpful to someone I’ll go ahead and get it posted.  Not a lot of meat to it, mostly just notes my setup steps.  The IPCam application definitely does as it says, though I have to admit that I haven’t played around with the camera as much as I originally thought I might.  But I can definitely see setting it up on my normal phone and my wife’s, perhaps in conjunction with making an infrared LED flashlight, and using it to keep an eye on the girls in the camper if we want to sit outside while they are sleeping.

Be the first to comment

http://stackoverflow.com/questions/11124572/what-is-the-windows-equivalent-of-the-command-dates

The VBScript at the bottom of this article has proven functional for me on XP.  I haven’t tried any of the other suggestions at this time.

Be the first to comment

Sensu, a monitoring framework – PorterTech

Posted June 5, 2012 By Landis V

http://portertech.ca/2011/11/01/sensu-a-monitoring-framework/

Think I’ve had this page open for a while now, and I can’t remember whether I had linked to it previously or not… so I guess I’ll go ahead and do it so I don’t lose it.  Interesting solution for truly large scale monitoring.  I need to spend some time with some of the MQ apps, I can see a lot of things they would be  useful for…

Be the first to comment