Nagios Contact

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
btayl
Posts: 131
Joined: Mon Aug 24, 2020 8:51 am

Nagios Contact

Post by btayl »

I should bet able to create a contact and send an alert to it correct.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Nagios Contact

Post 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
btayl
Posts: 131
Joined: Mon Aug 24, 2020 8:51 am

Re: Nagios Contact

Post by btayl »

Vinh it looks like I should beable to but it never send an alert off of just a contact.
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Nagios Contact

Post by vtrac »

Hi,
Did you add the that contact to the "Contact Template"?
Th1.png

Regards,
Vinh
You do not have the required permissions to view the files attached to this post.
btayl
Posts: 131
Joined: Mon Aug 24, 2020 8:51 am

Re: Nagios Contact

Post by btayl »

Does it mater xi_contact_generic or generic _contact
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Nagios Contact

Post 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
btayl
Posts: 131
Joined: Mon Aug 24, 2020 8:51 am

Re: Nagios Contact

Post 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 ?
User avatar
vtrac
Posts: 903
Joined: Tue Oct 27, 2020 1:35 pm

Re: Nagios Contact

Post 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
btayl
Posts: 131
Joined: Mon Aug 24, 2020 8:51 am

Re: Nagios Contact

Post by btayl »

Vinh you can close the Ticket
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Contact

Post by scottwilkerson »

btayl wrote:Vinh you can close the Ticket
Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked