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/ ... ml#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 [email protected]
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.=20
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 post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]