Hi All,
i found a cool tutorial on the web:
http://nagios.sourceforge.net/downlo...NSCA_Setup.pdf
i have compiled the NSCA plugin i have installed xinetd and the i followed step by step.
so, after i tested the NSCA config i have had problem with nagios.
>Configuring Nagios
>If everything is running smoothly so far, the final step would be to create the service to process your
>passive checks in Nagios. I will show how to create a standard passive check service, but as with
>everything in Nagios, it should be customized for your own needs.
>We are going to use the check_dummy as our check_command in the service we must define that
>command as well. Open up Nagios config file containing your check commands, if you are using
>minimal.cfg, this will be in here. Enter the following lines in the commands section:
define command{
command_name check_dummy
command_line $USER1$/check_dummy $ARG1$
}
done in /usr/local/nagios/etc/objects/commands.cfg
>Next, we will create a service template for the passive checks. Enter the following lines at the bottom
>of the services section:
# Define a passive check template
define service{
use generic-service
name passive_service
active_checks_enabled 0
passive_checks_enabled 1 # We want only passive checking
flap_detection_enabled 0
register 0 # This is a template, not a real service
is_volatile 0
check_period 24x7
max_check_attempts 1
normal_check_interval 5
retry_check_interval 1
check_freshness 0
check_command check_dummy!0
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
stalking_options w,c,u
}
done in /usr/local/nagios/etc/objects/switch.cfg
>After, we can create actual services to match our service checks being passed by NSCA. Keep in mind that the
>service_description must match the svc_description received in the nsca packet, in our above example using >send_nsca, the svc-description was “TestMessage”. I will continue building a service check using that example:
define service{
use passive_service
service_description TestMessage
host_name localhost
}
done in /usr/local/nagios/etc/objects/switch.cfg
>Restart the Nagios daemon so that it loads the updates in your config file. If you have installed Nagios as a service >you
>can use:
>service nagios restart
WARNING!
Warning: Duplicate definition found for service 'passive_service' (config file '/usr/local/nagios/etc/objects/switch.cfg', starting on line 113)
Error: Could not add object property in file '/usr/local/nagios/etc/objects/switch.cfg' on line 115.
Error processing object config files!
following the line....
define service{
use generic-service
name passive_service <- ****line 115****
active_checks_enabled 0
passive_checks_enabled 1 # We want only passive checking
flap_detection_enabled 0
register 0 # This is a template, not a real service
is_volatile 0
check_period 24x7
max_check_attempts 1
normal_check_interval 5
retry_check_interval 1
check_freshness 0
check_command check_dummy!0
notification_interval 120
notification_period 24x7
notification_options w,u,c,r
stalking_options w,c,u
}
# PASSIVE CHECK SERVICE FROM NSCA
define service{
use passive_service
service_description TestMessage
host_name localhost
}
In the official documentation i didn't find nothing about "use generic service", maybe it is the incorrect config of this attribute the problem?
Can someone help me?
thanx in advance
Massimo
passive check (NSCA)
Re: passive check (NSCA)
if you look in templates.cfg you will find a template called generic-service which is one of the default objects in the nagios example configs... so just call the template something else... passive-generic-service or nsca-generic-service.