Page 1 of 1

plugged in script stops checking at midnight til 10am

Posted: Thu Apr 21, 2011 8:38 am
by mervman
I just plugged in a shell script (placed it in check_commands.cfg for a group of servers) and put it in ~etc/services as well and set it for 24/7 and it does work fine but at the drop of midnight for consecutive days now, it just stops (i view the GUI and it just doesn't show the values anymore - it's a sar reading script thus shows each disk on the servers and their busy% every 5 mins) and also the script generates logs in the nagios server but also there it just show the last time it generated a log is 00:00 and then dead air and would come back to life at 10:00.

where is that configured? i've searched forums and all the *cfg files and every documentation and could not locate which gives that timeperiod to stop it from running the checks of that script?

help!

tnx in advance,
mervman

Re: plugged in script stops checking at midnight til 10am

Posted: Thu Apr 21, 2011 9:41 am
by mguthrie
Can you post the service config, and any template configs that this service is using?

Re: plugged in script stops checking at midnight til 10am

Posted: Thu Apr 21, 2011 9:55 am
by mervman
sure...

first, the group of hosts defined in ~etc/hostsgroups.cfg:


define hostgroup {
hostgroup_name Company-Mumu
alias Company Mumu cluster
members mumu5,mumu6,mumu7,mumu8
}

###############################################################################
#
# Host Group configuration file
#
# END OF FILE
#
###############################################################################




for the command specified ~etc/checkcommands.cfg:

define command {
command_name check_disk_sar
command_line /usr/local/nagios/libexec/check_disk_sar.sh 100 100 3 nagios $HOSTADDRESS$
}

and that is obviously there in ~libexec and it works from 10am-12mn


for the ~etc/services - i placed it as check_disk_sar.cfg :

$ more check_disk_sar.cfg
###############################################################################
#
# Service configuration file
#
# Created by: Nagios QL 2005 Version 1.00
# Date: 2009-06-29 16:57:20
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios QL will overwite all manual settings during the next update
#
###############################################################################


define service {
hostgroup_name Company-Mumu
service_description check_disk_sar
is_volatile 0
check_command check_disk_sar
max_check_attempts 2
normal_check_interval 5
retry_check_interval 1
active_checks_enabled 1
passive_checks_enabled 1
check_period 24x7
parallelize_check 1
obsess_over_service 1
check_freshness 0
event_handler notify-by-epager
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
contact_groups Webgroup,Unixteam
notification_interval 60
notification_period 24x7
notification_options c,r
notifications_enabled 1
register 1
}

###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################

just not sure why it stops working 12midnight and restarts at 10am ???