|
ok.. now i'm getting frustrated.
messages coming into syslog and nagios.cmd
ie: syslog Sep 19 10:13:05 ubuntu710s nsca[20559]: Handling the connection... Sep 19 10:13:06 ubuntu710s nsca[20559]: SERVICE CHECK -> Host Name: 'jsb-pc2', Service Description: 'EventLog Agent', Return Code: '2', Output: 'HEARTBEAT [CRIT #2]: Service halting' Sep 19 10:13:06 ubuntu710s nsca[20559]: End of connection... Sep 19 10:13:11 ubuntu710s nsca[20560]: Handling the connection... Sep 19 10:13:12 ubuntu710s nsca[20560]: SERVICE CHECK -> Host Name: 'jsb-pc2', Service Description: 'EventLog Agent', Return Code: '1', Output: 'HEARTBEAT [WARN #1]: Service starting' Sep 19 10:13:12 ubuntu710s nsca[20560]: End of connection... Sep 19 10:13:49 ubuntu710s nsca[20579]: Handling the connection... Sep 19 10:13:49 ubuntu710s nsca[20579]: SERVICE CHECK -> Host Name: 'jsb-pc2', Service Description: 'Application EventLog', Return Code: '2', Output: 'Application [error] [NagiosEventLog Test #0]: Test message '
ie nagios.cmd [1221833629] PROCESS_SERVICE_CHECK_RESULT;jsb-pc2;Application EventLog;2;Application [error] [NagiosEventLog Test #0]: Test message
nagios.cmd is getting executed. re: stopped apache server and it came thru nagios.cmd and changed status of screen.
It seems to be a filter/condition check on the nagios server side is the problem.
questions: 1. how does the check_dummy!0! command work if alerts are coming in a 1=warnings or 2=criticals
eg:define service{ service_description EventLog active_checks_enabled 0 passive_checks_enabled 1 flap_detection_enabled 0 register 0 is_volatile 0 check_period 24x7 max_check_attempts 1 normal_check_interval 5 retry_check_interval 1 check_freshness 1 freshness_threshold 1800 check_command check_dummy!0!No messages in last 30mins contact_groups YOUR_CONTACT_GROUP notification_interval 120 notification_period 24x7 notification_options w,u,c,r stalking_options w,c,u name EventLog register 0 }
define service{ use EventLog service_description Application EventLog host_name jsb-pc2 } define service{ use EventLog service_description System EventLog host_name jsb-pc2 } define service{ use EventLog service_description Security EventLog host_name jsb-pc2 }
2. It seems as if the time the message gets into nagios.cmd and the time the status updates on the screen is quite long. is there any way to may the status update on trhe screen faster?
3. the ony message i see is the No messages in the last 30min. how will the alert change this message? nagios.cmd
4. I have the defined service " Eventlog" in my templates.cfg file and the
define service{ use EventLog service_description Application EventLog host_name jsb-pc2 } define service{ use EventLog service_description System EventLog host_name jsb-pc2 } define service{ use EventLog service_description Security EventLog host_name jsb-pc2 }
in my windows.cfg file. Do they need to be in the same file, or does it really matter?
# EXTERNAL COMMAND OPTION # This option allows you to specify whether or not Nagios should check # for external commands (in the command file defined below). By default # Nagios will *not* check for external commands, just to be on the # cautious side. If you want to be able to use the CGI command interface # you will have to enable this. # Values: 0 = disable commands, 1 = enable commands
check_external_commands=1
# EXTERNAL COMMAND CHECK INTERVAL # This is the interval at which Nagios should check for external commands. # This value works of the interval_length you specify later. If you leave # that at its default value of 60 (seconds), a value of 1 here will cause # Nagios to check for external commands every minute. If you specify a # number followed by an "s" (i.e. 15s), this will be interpreted to mean # actual seconds rather than a multiple of the interval_length variable. # Note: In addition to reading the external command file at regularly # scheduled intervals, Nagios will also check for external commands after # event handlers are executed. # NOTE: Setting this value to -1 causes Nagios to check the external # command file as often as possible.
command_check_interval=15s #command_check_interval=-1
# EXTERNAL COMMAND FILE # This is the file that Nagios checks for external command requests. # It is also where the command CGI will write commands that are submitted # by users, so it must be writeable by the user that the web server # is running as (usually 'nobody'). Permissions should be set at the # directory level instead of on the file, as the file is deleted every # time its contents are processed.
command_file=/usr/local/nagios/var/rw/nagios.cmd
|