I just installed nagios core 4.4.5 on a ubuntu machine 19.10 lts.
The thing I am trying to achieve should be easy but I'm having an hard time finding out how to do it in nagios.
I have a printer connected via wifi and I want to receive an email when the printer can not be pinged from nagios.
If the printer can be pinged again I want to receive another email telling me that the issue is no longer present.
The email should be sent through an exchange server.
I think that such a task should be explained somewhere in the documentation.
The example file /usr/local/nagios/etc/objects/commands.cfg is not helping
Code: Select all
define command {
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDAT$
}
define command {
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time$
}
how do I make nagios send email through exchange?