2.0rc1 contact definition docco V.S. daemon inconsistency
Marc Powell
marc at ena.com
Fri Jan 6 22:20:16 CET 2006
Ethan --
I've encountered an inconsistency between the documented requirements
for a contact definition and what the daemon is insisting upon and I'm
not sure which is correct. I expect that the documented requirements are
what are desired but...
http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#contact
I tried adding a contact as follows --
define contact {
contact_name test
alias Marc
service_notification_period none
host_notification_period none
service_notification_options n
host_notification_options n
}
But verification complained as follows --
"Error: Contact name, alias, or email address and pager number are NULL
Error: Could not register contact (config file
'/usr/local/nagios-2.0/etc/ena_config/contacts.cfg', starting on line
136)"
Adding an email token and verifying again yields --
"Error: Contact 'test' has no service notification commands defined!
Error: Contact 'test' has no host notification commands defined!"
I ended up with --
define contact {
contact_name test
alias Marc
service_notification_period none
host_notification_period none
service_notification_options n
host_notification_options n
email foo at example.f
service_notification_commands service-notify-by-email
host_notification_commands host-notify-by-email
}
email, service_notification_commands and host_notification_commands are
documented as being optional and that would make sense for a view-only
user.
I've looked at the code but I don't feel comfortable submitting a patch
(I can read and mostly understand C but not program in it). It looks
like the tests for email are at 2107 and 2132 of common/objects.c and
the tests for service_notificaiton_commands and host_notification
commands are at 2077 and 2102 of base/config.c respectfully.
Thanks,
--
Marc
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
More information about the Developers
mailing list