Showing posts with label software. Show all posts
Showing posts with label software. Show all posts

Saturday, February 21, 2009

Hyperic First Impressions

As someone who is in charge of a large network of different applications and hosts, I spend a decent portion of the day wondering if our software is working correctly. Some of our software is off-the-shelf, but much of it is application-specific custom built software. To further complicate things, much of this software interacts with other software and services. Staying "aware" in this type of large heterogeneous environment is serious work and in the past we've developed custom apps to monitor other custom apps. Clearly there must be a better way.

BEEP!
Check out this unrelated picture I added to spice things up!

Enter Hyperic.

I learned about Hyperic through this pretty interesting round-up. For those of you who aren't familiar with it, Hyperic is an open source, java-based monitoring platform. My first thought was that Hyperic kind of looks like Cacti (a rolled up fancy version of MRTG). In fact, it's quite a bit different.

Agent Based

The first big difference you notice between a grapher (like Cacti) and Hyperic is that Hyperic has an agent application. This caused me some initial alarm. I worry about having to install an agent on a bunch of boxes in the field. I also worry about the resources consumed by the agent. Fortunately it's pretty simple to install (just a directory containing a JRE and the software). The agent is also really smart at monitoring it's own processor utilization, so you can keep tabs on how much work the it's actually doing.

My agent-related fears assuaged I started setting up a small Hyperic pilot test. Server installation was pretty easy on Linux. For the pilot I decided to use the built-in DBMS (Postgres) rather than setting up an out-board MySQL database. The server started up easily and self configured itself. After setting up a few credentialed users I started installing agents.

Understanding Hyperic

When your first agent connects to Hyperic you start to learn about the system. Hyperic is pretty opaque at first. A new user is immediately confronted with the notions of Platforms, Servers, Services and more. The key to wrapping your head around Hyperic is understanding that a physical server is not a "Server" in Hyperic. It's a "Platform". This is important. It's called a platform because it can run multiple servers (FTP, HTTP, SQL, etc). A server process can then host multiple services. For example: IIS can serve multiple web sites (vhosts). Understanding this hierarchy is key to understanding the way that Hyperic monitors your environment.

So having now added our first platform we start to get a feel for the power that Hyperic brings to the table. Hyperic begins auto-discovering servers on each platform it's installed on. So on my first box it discovered IIS, .Net 2.0 and MySQL. It immediately provided detailed monitoring capabilities. When I say detailed I don't mean: How many MySQL processes are runnng? I mean: How many rows are in table X in database B?

Hyperic immediately provides granular monitoring of installed services.

RAR! I am pile of servers! HEAR ME ROAR!
Check out this other unrelated picture I added to show some contrast to the first unrelated picture!

It doesn't stop with "installed" services either. The next week I added a new service on the machine. Within hours, Hyperic had discovered the new server and made it available for monitoring.

Auto-discovery is all well and good, but it doesn't help us monitor those oddball custom applications. How do we find out if our FTP Uploader application is behind on it's transfers? Well Hyperic provides us two easy mechanisms to do this. The first is at the SQL level: I can have Hyperic monitor the result of an SQL query via the database server's agent. The other option I have is to go to the FTP Uploader's platform and modify it's "inventory" manually. I can tell it about the input queue directory and have Hyperic monitor the number of files inside.

Alerting

Which brings us to alerting. Hyperic has pretty cool system for defining alerting criteria. Anyone who's managed a real time environment knows that false positives are a real problem. To prevent this Hyperic has threshold-based alerting. This allows you to say: Only alert me if the disk is full for more than 1 hour in a 12 hour period. This functionality prevents regular fluctuations from causing spurious alerts.

Once an alert is triggered Hyperic follows user-defined "escalation trees". An escalation tree is designed to gradually increase the loudness of your systems desperate cries for help. For example: suppose a process, for which I'm responsible, begins to choke. An escalation tree might send me an email. But since it's 2am on a Tuesday I'm hardly checking my email. This process is important though, so after waiting a predetermined time, Hyperic decides to send me a text message. Normally that's the kind of alert that I respond to, but on this particular Tuesday night I'm sleeping one off, so I forget to charge my iPhone. Hyperic decides that I'm clearly not the right man for the job and can thereafter begin alerting other people or group mailing lists. All of this is readily configureably and pretty cool stuff. It tracks all sorts of data under the hood as well (IE: who fixed what, when and how).

Open Source

Hyperic is available in two varieties: An open source version called Hyperic HQ, and a closed source version called Hyperic HQ Enterprise. The enterprise version of the software has a number of cool features that could make my life a bit easier, but when I spoke to a sales representative the price proved to be prohibitively expensive in my environment. They seem to charge a per-server-monitored subscription fee. Unfortunately, for the price they ballpark-quoted me, I could hire a full time engineer who's job is solely to manage the open source version of the software.

Don't get me wrong though, the enterprise version has some very cool functionality (like the ability for the server to automatically react to certain conditions and send commands). But unfortunately Hyperic seems to charge on an all-or-nothing pricing model, so if I wanted to use advanced features on a small subset of my hardware I'd end up having to create two parallel installations or pay full price for every server I monitor.

What's next

Well these are all my "first impressions" so over the next couple of months, as I get more involved using Hyperic I'm going to need to get a grip on how much monitoring is appropriate. I have hundreds of servers that could benefit from this type of monitoring but that might create a load situation on the Hyperic server. Furthermore, there is so much data that we can keep track of - some of it incredibly useful. And some of it is... er... not-so-much. I hope that someone is keeping track of the "Number of Deleted Recurring Appointments" in exchange. There is clearly a trade off between performance of the Hyperic server and awareness of the environment. This is true at the network level as well: What if a significant portion of my bandwidth turns out to be monitoring-related messages?

The other factor is that the more systems we begin to monitor using Hyperic, the more Hyperic itself becomes a critical element in our infrastructure. We begin to need to keep tabs on Hyperic itself. This also means that we need to be methodical in our setting up and deleting of alerts. I suspect this will require some level of automation.

To me, this is all very interesting and exciting. To everyone else, my apologies.

Monday, February 18, 2008

Managed mobility

Have you ever been to dinner with someone who's cell phone would simply not stop making noises the entire night? If you have, you might have been sitting across the table from me.

I get a lot of text messages. Last month, I received about 8,000 of them.

Thats 8,000 little 'beeps'. Not to mention the countless number of emails that I get both at the office and on my Gmail account creating another 1,000 little 'boops'. Thats a lot of noise to go walking around with.

Now by this point, you're probably thinking: "Okay, he can't possibly be that popular. After all, he's a software guy with a blog." Well, you're right. I am not that popular. The vast majority (about 98%) of those text messages are from automated monitoring applications trying to keep me abreast of what's going on at the office.

This situation has two inherent problems:
  1. I get so many alerts that I don't even try to keep up with them all
  2. I have no good way to distinguish between text messages from people and robots
The first problem is interesting to consider, and only slightly less easy to fix. Anyone who's ever worked in a real time environment knows the importance of automated monitoring software. Software which will pro actively let you know when trouble occurs. Without monitoring software we'd only know about problems when a user told us. Obviously no one wants to do business like that.

The problem with automated monitoring software is, that unless its properly tuned, you can end up in a situation where you have a really crummy signal to noise ratio. It's very important to spend time thinking about what things you want to be alerted about otherwise you just end up ignoring the system.

In our situation we never spent the time to correctly tune our alerting system. As a result I would constantly be getting text messages. Maybe I'd get one or two every five minutes. And by and large I didn't read them - even though some of them were probably important.

So why didn't I just turn off the system? Well, my brain started to become a pretty efficient filtering system. I got to the point where I would tune out the text messages unless they started coming in quickly. What's more, my brain seemed able to do this automatically as well. I could sleep through the individual text messages easily, but I would usually wake up when they started coming in more quickly.

The second problem, that of distinguishing alert messages from human-sent text messages, was one that begged for a software remedy. Not wanting to reinvent the wheel, I went in search of such a product.

Watchflag has changed my relationship with my cellphone. Watchflag is a rules based message alerting system for portable devices running Windows Mobile 5 or Windows Mobile 6. In my case I run Watchflag on a Samsung Blackjack2. My cell phone now vibrates and lights up when I get a human text message. Computer-based text messages just get the little ICQ "uh-oh" noise.

The other cool thing about Watchflag is that it is apparently written by actual human beings. When I recently had a problem with a new version, I emailed support and got in touch with one of the developers who fixed the problem and sent me a new version. Additionally, at the moment, Watchflag is being developed very actively. In the past week it feels like we've had 3 or 4 new versions. To some people that can seem like a drag, but since every upgrade brings new features, to me it's like a fun little present!

Lastly Watchflag is inexpensive. At the moment it is only $15 (half-off) and seems to feature free version upgrades. If you use a Windows Mobile based phone I highly recommend it.