Walrus - Checks

[Login] Change #3 by OpenID IdentityMark Smith at 2008-07-24 01:07:15.

Checks

[ Back to Top ]

The basic idea of a check is performing some sort of introspection on something that the Walrus system is keeping track of. Here are some examples of what we're talking about, what a check could be:

  • Ping
    • Determines if a machine is responding to pings on its primary IP address.
  • SSH Available
    • TCP check on port 22, look for SSH banner.
  • HTTP 200
    • GET request on port 80 to specific URI, look at response code.
  • Package Installed: foo
    • Checks if the 'foo' package is installed.

Obviously, there can be any number of checks. The idea of the Walrus plugin architecture is to allow us to define all sorts of checks that can be run. If you want a new check type, you can just define a plugin, and have it pushed out to the Walrus cloud. Then you can start using that check everywhere.

Checks are used to key other parts of the system. For example, you can key the monitoring system off of checks. The configuration management system. Even the inventory system can key up actions based on checks.

Check Rules

When writing a check, keep in mind the cardinal rule: checks must be non-invasive and not change things. This isn't quantum physics, our checks don't change the state of the system. Since a check could be run multiple times for a number of reasons, this is required.

Checks should also be lightweight. They should be as simple as possible while still being able to accomplish their job.

Checks should be small. This is different than lightweight in that here we're talking about what they accomplish. Stick to small tasks that users can glue together as needed.

Checks should be source-agnostic if possible. Since we expect Walrus to run on large environments, it will need to split checks up among machines in the clouds. Ideally this is an automated process, so you can't guarantee that the check is running from your master Walrus box.

== Writing Checks

Implementing a check is a simple task. They are written in Perl as a Walrus plugin. You can look at the example plugins to see how checks are implemented, if you want.

Yes, this documentation needs to be filled out...

[Login] Change #3 by OpenID IdentityMark Smith at 2008-07-24 01:07:15.