Page 1 of 1

Nagios Contact

Posted: Wed Mar 31, 2021 3:02 pm
by btayl
I should bet able to create a contact and send an alert to it correct.

Re: Nagios Contact

Posted: Wed Mar 31, 2021 4:17 pm
by vtrac
Hi,
Here's the KB article for understanding Nagios XI users and contacts:
https://assets.nagios.com/downloads/nag ... ntacts.pdf


Regards,
Vinh

Re: Nagios Contact

Posted: Wed Mar 31, 2021 7:56 pm
by btayl
Vinh it looks like I should beable to but it never send an alert off of just a contact.

Re: Nagios Contact

Posted: Thu Apr 01, 2021 11:33 am
by vtrac
Hi,
Did you add the that contact to the "Contact Template"?
Th1.png

Regards,
Vinh

Re: Nagios Contact

Posted: Thu Apr 01, 2021 1:55 pm
by btayl
Does it mater xi_contact_generic or generic _contact

Re: Nagios Contact

Posted: Thu Apr 01, 2021 3:53 pm
by vtrac
Hi,
I looked and "generic_contact" used "/bin/mail" (example below):

Code: Select all

/usr/bin/printf "%b" "***** Nagios Monitor XI Alert *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
"xi_contact_generic" used "php" (example below):

Code: Select all

/usr/bin/php /usr/local/nagiosxi/scripts/handle_nagioscore_notification.php --notification-type=host --contact="$CONTACTNAME$" --contactemail="$CONTACTEMAIL$" --type=$NOTIFICATIONTYPE$ --escalated="$NOTIFICATIONISESCALATED$" --author="$NOTIFICATIONAUTHOR$" --comments="$NOTIFICATIONCOMMENT$" --host="$HOSTNAME$" --hostaddress="$HOSTADDRESS$" --hostalias="$HOSTALIAS$" --hostdisplayname="$HOSTDISPLAYNAME$" --hoststate=$HOSTSTATE$ --hoststateid=$HOSTSTATEID$ --lasthoststate=$LASTHOSTSTATE$ --lasthoststateid=$LASTHOSTSTATEID$ --hoststatetype=$HOSTSTATETYPE$ --currentattempt=$HOSTATTEMPT$ --maxattempts=$MAXHOSTATTEMPTS$ --hosteventid=$HOSTEVENTID$ --hostproblemid=$HOSTPROBLEMID$ --hostoutput="$HOSTOUTPUT$" --longhostoutput="$LONGHOSTOUTPUT$" --datetime="$LONGDATETIME$"

Regards,
Vinh

Re: Nagios Contact

Posted: Sat Apr 03, 2021 5:14 am
by btayl
So I tried both and the "generic_contact" worked but" xi_contact_generic" did not is their any thing I need to do to get it to work ?

Re: Nagios Contact

Posted: Mon Apr 05, 2021 9:51 am
by vtrac
Hi,
I think "generic_contact" is your only choice for "contact" users.

You could also try create these as normal XI users with the following options:

Code: Select all

- Enable Notifications
- Can see all hosts and services
- Read-only access
- Under "Core Config Manager access:", select "Limited"  with "Contacts" box checked for "Alerting Permissions"
Please NOTE that if you create these as XI users, those users will be allowed to log into XI.


Regards,
Vinh

Re: Nagios Contact

Posted: Fri Apr 09, 2021 8:23 am
by btayl
Vinh you can close the Ticket

Re: Nagios Contact

Posted: Fri Apr 09, 2021 8:46 am
by scottwilkerson
btayl wrote:Vinh you can close the Ticket
Locking thread