If the passive checks being received from NCPA are every 300 seconds (5 minutes) your freshness threshold is also 300.
It might be better to increase the freshness threshold to say 600 as I can see that there may be some scheduling overlap.
Problem recieving passive checks
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
Re: Problem recieving passive checks
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
jmasquelet
- Posts: 15
- Joined: Wed Mar 04, 2015 6:37 am
Re: Problem recieving passive checks
so, i think i've done some advance
maybe it's ok that files in checkresults are results and thats the reason they dont stay in that directory? and nagios work with this results and moving them to others files?
i've change my service description to "memoria" so its more easy to search in files.
when ncpa sends messages to my nagios server it put the messages on checkresults directory.
when execute grep -r memoria /usr/local/nagios
first is the log who is telling me that "memoria" don't receivie any passive_check so it will execute dummy check
/usr/local/nagios/var/nagios.log:[1455761533] Warning: The results of service 'memoria' on host '192.168.56.1' are stale by 0d 0h 1m 0s (threshold=0d 0h 8m 0s). I'm forcing an immediate check of the service.
again log showing dummy check
/usr/local/nagios/var/nagios.log:[1455761533] SERVICE ALERT: 192.168.56.1;memoria;CRITICAL;SOFT;1;CRITICAL: CRITICAL: No se han recibido resultados en tiempo
/usr/local/nagios/var/objects.precache: service_description memoria
/usr/local/nagios/var/objects.cache: service_description memoria
both files shows
/usr/local/nagios/var/status.dat: service_description=memoria
/usr/local/nagios/var/nagios.tmpHxiQfe: service_description=memoria
No such file or directory
/usr/local/nagios/etc/objects/mipc.cfg: service_description memoria
define service{
use generic-service
host_name 192.168.56.1
service_description memoria
check_command sin_resultados
passive_checks_enabled 1
active_checks_enabled 0
check_freshness 2
freshness_threshold 480
is_volatile 1
parallelize_check 1
obsess_over_service 0
}
i don't unerstand exactly how this work but it didn't look like there is anything wrong...
and if i submit a passive check results from the nagios cgi it works ok.
[root@localhost nagios]# grep -r test_check_result /usr/local/nagios
/usr/local/nagios/var/nagios.log:[1455762716] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;192.168.56.1;memoria;0;test_check_result|
/usr/local/nagios/var/nagios.log:[1455762716] PASSIVE SERVICE CHECK: 192.168.56.1;memoria;0;test_check_result
/usr/local/nagios/var/status.dat: plugin_output=test_check_result
but i don't get the same result when search for the passive check sended from ncpa
read in some forum that status.dat must be nagios:apache (actually nagios:nagios) but don't known where configure that since status.dat is removed when nagios restarted so i've added user apache to group nagios but still can't receive passive check.
maybe it's ok that files in checkresults are results and thats the reason they dont stay in that directory? and nagios work with this results and moving them to others files?
i've change my service description to "memoria" so its more easy to search in files.
when ncpa sends messages to my nagios server it put the messages on checkresults directory.
when execute grep -r memoria /usr/local/nagios
first is the log who is telling me that "memoria" don't receivie any passive_check so it will execute dummy check
/usr/local/nagios/var/nagios.log:[1455761533] Warning: The results of service 'memoria' on host '192.168.56.1' are stale by 0d 0h 1m 0s (threshold=0d 0h 8m 0s). I'm forcing an immediate check of the service.
again log showing dummy check
/usr/local/nagios/var/nagios.log:[1455761533] SERVICE ALERT: 192.168.56.1;memoria;CRITICAL;SOFT;1;CRITICAL: CRITICAL: No se han recibido resultados en tiempo
/usr/local/nagios/var/objects.precache: service_description memoria
/usr/local/nagios/var/objects.cache: service_description memoria
both files shows
Code: Select all
define service {
host_name 192.168.56.1
service_description memoria
check_period 24x7
check_command sin_resultados
contact_groups admins
notification_period 24x7
initial_state o
importance 0
check_interval 10.000000
retry_interval 2.000000
max_check_attempts 3
is_volatile 1
parallelize_check 1
active_checks_enabled 0
passive_checks_enabled 1
obsess 0
event_handler_enabled 1
low_flap_threshold 0.000000
high_flap_threshold 0.000000
flap_detection_enabled 1
flap_detection_options a
freshness_threshold 480
check_freshness 1
notification_options r,w,u,c
notifications_enabled 1
notification_interval 60.000000
first_notification_delay 0.000000
stalking_options n
process_perf_data 1
notes_url /webcip/doc/doc.php?title=$HOSTNAME$_$SERVICEDESC$
retain_status_information 1
retain_nonstatus_information 1
}
Code: Select all
servicestatus {
host_name=192.168.56.1
service_description=memoria
modified_attributes=0
check_command=sin_resultados
check_period=24x7
notification_period=24x7
check_interval=10.000000
retry_interval=2.000000
event_handler=
has_been_checked=1
should_be_scheduled=0
check_execution_time=0.002
check_latency=0.070
check_type=0
current_state=2
last_hard_state=0
last_event_id=0
current_event_id=107
current_problem_id=37
last_problem_id=0
current_attempt=1
max_attempts=3
state_type=0
last_state_change=1455761533
last_hard_state_change=1455761533
last_time_ok=1455761533
last_time_warning=0
last_time_unknown=0
last_time_critical=0
plugin_output=CRITICAL: CRITICAL: No se han recibido resultados en tiempo
long_plugin_output=
performance_data=
last_check=1455761533
next_check=1455761653
check_options=0
current_notification_number=0
current_notification_id=0
last_notification=0
next_notification=0
no_more_notifications=0
notifications_enabled=1
active_checks_enabled=0
passive_checks_enabled=1
event_handler_enabled=1
problem_has_been_acknowledged=0
acknowledgement_type=0
flap_detection_enabled=1
process_performance_data=1
obsess=0
last_update=1455762012
is_flapping=0
percent_state_change=0.00
scheduled_downtime_depth=0
}
No such file or directory
/usr/local/nagios/etc/objects/mipc.cfg: service_description memoria
define service{
use generic-service
host_name 192.168.56.1
service_description memoria
check_command sin_resultados
passive_checks_enabled 1
active_checks_enabled 0
check_freshness 2
freshness_threshold 480
is_volatile 1
parallelize_check 1
obsess_over_service 0
}
i don't unerstand exactly how this work but it didn't look like there is anything wrong...
and if i submit a passive check results from the nagios cgi it works ok.
[root@localhost nagios]# grep -r test_check_result /usr/local/nagios
/usr/local/nagios/var/nagios.log:[1455762716] EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;192.168.56.1;memoria;0;test_check_result|
/usr/local/nagios/var/nagios.log:[1455762716] PASSIVE SERVICE CHECK: 192.168.56.1;memoria;0;test_check_result
/usr/local/nagios/var/status.dat: plugin_output=test_check_result
but i don't get the same result when search for the passive check sended from ncpa
read in some forum that status.dat must be nagios:apache (actually nagios:nagios) but don't known where configure that since status.dat is removed when nagios restarted so i've added user apache to group nagios but still can't receive passive check.
-
jmasquelet
- Posts: 15
- Joined: Wed Mar 04, 2015 6:37 am
Re: Problem recieving passive checks
Box293 wrote:If the passive checks being received from NCPA are every 300 seconds (5 minutes) your freshness threshold is also 300.
It might be better to increase the freshness threshold to say 600 as I can see that there may be some scheduling overlap.
thanks. change it but still the same
-
jmasquelet
- Posts: 15
- Joined: Wed Mar 04, 2015 6:37 am
Problem solved!
The problem, as usual, was the lack of reading the documentation. In this case, the simple and short documentation of /usr/local/nrdp/server/config.inc.php, the part that says :
// the name of the system group that has write permissions to the external command file
// this group is also used to set file permissions when writing bulk commands or passive check results
// NOTE: both the Apache and Nagios users must be a member of this group
$cfg["nagios_command_group"]="nagcmd";
i've added nagios user to nagcmd group and passive checks start working !!!
I'm really grateful to you. you have made me think and run many tests that allowed me to learn and know more about nagios
I'm really grateful with you guys. You've made me think a lot and run a lots of test that allowed me to learn and know more about Nagios.
Thanks!
oh, and sorry for my terrible english x)
// the name of the system group that has write permissions to the external command file
// this group is also used to set file permissions when writing bulk commands or passive check results
// NOTE: both the Apache and Nagios users must be a member of this group
$cfg["nagios_command_group"]="nagcmd";
i've added nagios user to nagcmd group and passive checks start working !!!
I'm really grateful to you. you have made me think and run many tests that allowed me to learn and know more about nagios
I'm really grateful with you guys. You've made me think a lot and run a lots of test that allowed me to learn and know more about Nagios.
Thanks!
oh, and sorry for my terrible english x)
Re: Problem recieving passive checks
We're glad to help! Thanks for sharing your answer as well.
I'll go ahead and close this thread out now, but feel free to open a new one if you ever need assistance in the future.
I'll go ahead and close this thread out now, but feel free to open a new one if you ever need assistance in the future.
Former Nagios Employee