NagiosXI and Slack integration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
NinoBenamy
Posts: 5
Joined: Sun Jul 22, 2018 6:00 pm

NagiosXI and Slack integration

Post by NinoBenamy »

Hello,

I have integrated slack notification using the link below
https://assets.nagios.com/downloads/nag ... ios-XI.pdf

However, i would like to add the $HOSTNOTESURL$ as another field. But it doesnt seem to work

Code: Select all

./slack_nagios.pl -field slack_channel=#nagios -field HOSTALIAS="$HOSTNAME$" -field HOSTSTATE="$HOSTSTATE$" -field NOTESURL="$HOSTNOTESURL$"
I am only getting this message from slack. and not getting the notes_url

Host ‘Linux-Test-ninobenamy’ is UP:
SSH OK - OpenSSH_7.4 (protocol 2.0)


Thanks,
Nino
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXI and Slack integration

Post by scottwilkerson »

In order to change what Slack displays you would need to modify the Slack app...

Another way around this would be to pass this into the HOSTOUTPUT field like so

Code: Select all

$USER1$/slack_nagios.pl -field slack_channel="#hosts" -field 
HOSTALIAS="$HOSTNAME$" -field HOSTSTATE="$HOSTSTATE$" -field 
HOSTOUTPUT="$HOSTOUTPUT$ - URL: $HOSTNOTESURL$" -field NOTIFICATIONTYPE="$NOTIFICATIONTYPE$"
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
NinoBenamy
Posts: 5
Joined: Sun Jul 22, 2018 6:00 pm

Re: NagiosXI and Slack integration

Post by NinoBenamy »

Thank you. your suggestion works. :)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NagiosXI and Slack integration

Post by scottwilkerson »

NinoBenamy wrote:Thank you. your suggestion works. :)
great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked