Pages

Tuesday, June 26, 2012

Nagios with Webinject

Install all Perl packages.

Quote
Install "XML::Simple"
Install "Crypt::SSLeay"
Install "Error" pacakge

Install WebInject

Quote
wget http://downloads.sourceforge.net/webinject/webinject-1.41.src.tar.gz

ownership

change the ownership of web-inject folder

Quote
sudo chown nagios:nagios webinject


Setup test cases in webinject/testcases.xml

Define a webinject command in /usr/local/nagios/etc/objects/commands.cfg

Quote
# '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

Quote
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
}

No comments:

Post a Comment