Monitoring with cucumber-nagios

I’m afraid the notes here are a bit sparse, mostly because my brain was full at this point, and partly because I’m not the ideal audience for a lot of what’s cool here - a lot of this is capabilities in the big bloated monitoring tools I get foisted on me, so there’s not much to play with for me. If you have ultra basic (or no) monitoring tools, or no brain fade, you should check this out.

Cucumber is a domain-specific language.

Works with mechanize library; cf webrat.

What happens if you combine all of these things with nagios?

You can write generic tests in a more-or-less human readable language to generate tests.

cucumber-nagios is a gem.

$ cucumber-nagios-gen project miniconf
$ cd miniconf
$ gem bundle
$ ./bin/cucumber-nagios-gen feature sysadmin.miniconf.org

Creates a simple skeleton. Then you edit the feature files with plan English-ish syntax and go.

e.g

Scenario: 
    Submitting with valid infos
    Given I am on the contact page
    When I fill in "Your Name" with "Foo"
    And I fill in "Your Message" with "What's up?"
    And I press "Send"
    Then I should see "Thanks for your feedback!"

Will run a test. it’s that simple. It’s a wrapper. By default it exits with status 2 (critical) instead of 1 (warning), although I guess you could modify that.

puppet == build tool;

cucumber == testing tool.

make && make test, as it were - you can automate the answer to the question “is the server ready yet?”.

No good for AJAX, because mechanise only understands the DOM. For now.

Neat, being heavily hacked on. Many people are looking to extend it.

Natural language expression is cool, and is very handy if you don’t have a solution already. From my perspective the ease of use and expressing conditions are the biggest plusses.

The other aspect, which was perhaps understaded, was build automation assurance. Can I prve the server was set up the way it should be? here’s one way; that was kind of uncovered during the talk, but a little Googling around suggests people are hot on that, and I can see the appeal.

Share