No Notifications for Specific Service Check

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
mmartin
Posts: 45
Joined: Fri Jul 15, 2011 12:45 pm

No Notifications for Specific Service Check

Post by mmartin »

Hello All,

Nagios Core Version 3.5.1

Could anyone take a look at my Config below and see any reason why Notifications would not be getting sent to me? No matter what current state the Service is in and I switch it to any other State, I still do not get any notifications. Watching the nagios log I can see no "SERVICE NOTIFICATION" messages for my Service Check defined below...

I am getting Notifications for other Services so Nagios is sending notifications in general, just not for this Service.

Service Config:

Code: Select all

### Host Definition:
define host {
	host_name               Test-Nagios
	alias                   Test-Nagios
	address                 127.0.0.1
	max_check_attempts      1
	check_interval          1000
	notification_period     24x7
	contacts                MyEmail
}

### Service Definition:
define service {
	name                      Test_Check-In
	host_name                 Test-Nagios
	service_description       Test_Check-In
	active_checks_enabled     0
	passive_checks_enabled    1
	check_period              24x7
	max_check_attempts        3
	retry_check_interval      2
	obsess_over_service       0
	check_freshness           0
	event_handler_enabled     1
	flap_detection_enabled    0
	process_perf_data         0
	check_command             Test_Check-In
	contacts                  MyEmail
	notifications_enabled     1
	notification_interval     30
	notification_period       24x7
	notification_options      w,u,c,r
}

### Command Definition:
define command {
	command_name           Test_Check-In
	command_line           $USER1$/Test_nagios
}
This check uses send_nsca to send a Passive check to Nagios for my Service.
Watching /var/log/messages I can see Nagios Processing my Passive Check, but its NOT sending out Notifications for it no matter what the Status is changing to.

For example, If the Service check defined above is currently in the OK state and I send it the following to get it into CRITICAL state, I see no Notification(s)...

Code: Select all

~> echo "Test-Nagios;Test_Check-In;2;CRITICAL: This is a test for CRITICAL State..." | $NAGIOSBIN/send_nsca -H 127.0.0.1 -p 5667 -to 10 -d ';' -c send_nsca.cfg
1 data packet(s) sent to host successfully.

########################## OUTPUT IN: /var/log/messages ##########################

~> tail -f /var/log/messages
Jan 15 14:54:45 nagios nsca[5899]: Connection from 127.0.0.1 port 55938
Jan 15 14:54:45 nagios nsca[5899]: Handling the connection...
Jan 15 14:54:46 nagios nsca[5899]: SERVICE CHECK -> Host Name: 'Test-Nagios', Service Description: 'Test_Check-In', Return Code: '0', Output: 'CRITICAL: This is a test for CRITICAL State...'
Jan 15 14:54:46 nagios nsca[5899]: End of connection...
Jan 15 14:54:46 nagios nagios: EXTERNAL COMMAND: PROCESS_SERVICE_CHECK_RESULT;Test-Nagios;Test_Check-In;2;CRITICAL: This is a test for CRITICAL State...
Jan 15 14:54:51 nagios nagios: PASSIVE SERVICE CHECK: Test-Nagios;Test_Check-In;0;OK: This is a TEST of the OK STATUS...
Jan 15 14:54:51 nagios nagios: SERVICE ALERT: Test-Nagios;Test_Check-In;OK;SOFT;2;OK: This is a TEST of the OK STATUS...
I have notifications enabled for this service and the Contact definition does exist because I am getting notifications for other services just not this one.

Anyone have any idea why I wouldn't be getting notifications for this Service?
Any thoughts or suggestions would be greatly appreciated!

Thanks in Advance,
Matt
mmartin
Posts: 45
Joined: Fri Jul 15, 2011 12:45 pm

Re: No Notifications for Specific Service Check

Post by mmartin »

....SOLVED....

Turned out the directory for "blosxom" (*i.e. for the Blosxom4Nagio Plugin) was full and could not write anymore files in it's "posts" directory.

Did not see this log message below until a recent service check that I sent. I did see that message below for other Service Checks but didn't think it was related to my Check since I didn't even see the "SERVICE NOTIFICATION" log msg which I saw for other services.
The error message said:

Code: Select all

Jan 15 17:34:14 nagios /var/log/nagios/blosxom/bin/blosxom-post[8904]: error * Cannot open output file '/var/log/nagios/blosxom/posts/01-15-2015-17:34:14-SERVICE-Test-Nagios-Test_Check-In-CRITICAL.txt': No space left on device - main::barf (/var/log/nagios/blosxom/bin/blosxom-post l. 54)
So I deleted everything from /opt/blosxom/posts and now Notifications for my service are coming through...

-Matt
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: No Notifications for Specific Service Check

Post by tmcdonald »

Glad to see it's working! I'll be closing this thread now, but feel free to open another if you need anything in the future.
Former Nagios employee
Locked