* Install Nagios
* Login as user nagios before install Webinject. Otherwise you’ll get a “Return code of 13 is out of bounds” error from Nagios. In that case do:
chown -R nagios:nagios webinject/
* Install Webinject
* Set reporttype to nagios in webinject/config.xml
<testcasefile>testcases.xml</testcasefile> <useragent>WebInject Application Tester</useragent> <timeout>10</timeout> <globaltimeout>20</globaltimeout> <reporttype>nagios</reporttype>
* Setup test cases in webinject/testcases.xml
* Define a webinject command in /usr/local/nagios/etc/objects/commands.cfg
# 'webinject' command definition
define command {
command_name webinject
command_line /usr/local/nagios/webinject/webinject.pl -c $ARG1$ $ARG2$
* Define a service in /usr/local/nagios/etc/objects/localhost.cfg
define service {
use generic-service
host_name localhost # Modify
service_description WebInject test of MyApplication
is_volatile 0
check_period 24x7
max_check_attempts 3
normal_check_interval 1
retry_check_interval 1
contact_groups admins # Modify
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
check_command webinject!config.xml!testcases.xml # Modify
}
* Restart Nagios