Skip to content

Nagios configuration

davidsf edited this page Sep 13, 2010 · 3 revisions

Nagios configuration

The files of cucumber-nagios I will store it at /usr/local/cucumber/, so I run:

cd /usr/local/cucumber/
cucumber-nagios-gen project mytests
cd myweb
gem bundle
cucumber-nagios-gen feature myweb home

In order to setup nagios for checking a “service” with cucumber-nagios, you must setup a command and a service in nagios config files:

define command {
command_name check_my_homepage
command_line /usr/local/cucumber/mytests/bin/cucumber-nagios /usr/local/cucumber/mytests/features/myweb/home.feature
}

define service {
host_name myhost
service_description Home page
check_command check_my_homepage
use generic-service
notification_interval 0
}

One caveat is that nagios will fail with an error that no have permission to write webrat.log. After some research, the file that is trying to write is /webrat.log (in the root filesystem, not in the nagios user home), so you must create it and chown to nagios user:


touch /webrat.log

chown nagios /webrat.log