Page 2 of 2

Re: Configure Nagios to receive host information via NSCA

Posted: Wed Oct 28, 2015 8:29 am
by nerdgz
Hi Everyone,

I seems that i had something wrong on the configuration of the services... Now nsca is sending actual passive data from Nagios-Sub-server to the Nagios Master.


This is my actual service configuration:

Code: Select all

define service{
    name                            generic-sap-service-test           ; The name of this service template
        passive_checks_enabled          1
    active_checks_enabled           0
        check_freshness                                 1
        freshness_threshold                             93600
    check_command                                       return-stale
    check_interval                  30
    retry_interval                  10
        max_check_attempts              10
        check_period                    24x7
        notification_period             24x7
        notification_interval           120
    register                        0                       ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
        contact_groups                                  dummy_admins
}

This is the old configuration ( one or more of this option are wrong for passive checks...)

Code: Select all

define service{     name generic-sap-service
					passive_checks_enabled 1 ; Passive service checks are enabled/accepted
					parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
					notifications_enabled 1 ; Service notifications are enabled
					event_handler_enabled 1 ; Service event handler is enabled
					flap_detection_enabled 1 ; Flap detection is enabled
					failure_prediction_enabled 1 ; Failure prediction is enabled
					;action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$
					notes_url /dokuwiki/nagios.php?host=$HOSTNAME$&srv=$SERVICEDESC$
					#notes_url /nagiosbp/cgi-bin/whereUsed.cgi?host=$HOSTNAME$&service=$SERVICEDESC$
					process_perf_data 1 ; Process performance data
					retain_status_information 1 ; Retain status information across program restarts
					retain_nonstatus_information 1 ; Retain non-status information across program restarts
					notification_interval 0 ; Only send notifications on status change by default.
					# is_volatile 0
					check_period 24x7
					check_interval 5
					retry_interval 5
					max_check_attempts 3
					active_checks_enabled 0
					parallelize_check 1
					is_volatile 1
					obsess_over_service 0
					check_command return-stale ; Report staleness
					check_freshness 1 ; Check service 'freshness'
					freshness_threshold 4800 ; How fresh must the check be?
					notification_period 24x7
					notification_options w,u,c,r,f,s
					contact_groups admins
					register 0
					}

Re: Configure Nagios to receive host information via NSCA

Posted: Wed Oct 28, 2015 3:33 pm
by rkennedy
Just to clarify - you wanted the information sent from the sub-server to the master, and that is working now right?

Do you need anymore assistance or can I close this thread?

Re: Configure Nagios to receive host information via NSCA

Posted: Wed Oct 28, 2015 3:35 pm
by ssax
The register 0 is saying that it's just a service template, if you set it to register 1 then it will show up as a service.