Dear Sir and Madam,
Is there any way to use slack of nagios log server alerting notification?
thanks
nagios log server alerting notification use slack
Re: nagios log server alerting notification use slack
Nothing developed by us, but there is an 'execute script' alerting options if you'd like to create a customer alert that interfaces with the slack api:
https://api.slack.com/
https://api.slack.com/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: nagios log server alerting notification use slack
I'd suggest sending alerts from NLS to Nagios XI (or Core) and from there to slack
a central point of administration and monitoring is essential to a healthy system admin
plus alert management in NLS is pretty much non existent (its really good at sending but not so good at handling), using core or XI to handle the alerts gives you the ability to really handle how alerts are managed
but if you want if I was to send alerts straight from NLS
I'd do it this way ....
I'd use the "official" nagios core integration from slack which you enable from here https://my.slack.com/services/new/nagios (follow their directions to get your token)
then script for your NLS server can be grabbed from here https://raw.githubusercontent.com/tinys ... /nagios.pl
i did
then you will need to edit the script (/usr/bin/slack.pl) to supply your token and domain
find the lines that start like this
fill in your slack domain and your slack token that you would have generated if you followed the directions that the slack integration provided
if you are using the nagios supplied NLS VM you will need to install a couple of perl modules
and I setup the notification within NLS like this
with the arguments set to
and I test it
and I get
but I'd never do this I'd simply setup a service that received passive checks in Nagios Core and have NLS send the alert using NRDP to that service and have core handle the alerting and acknowledgements of the alerts
a central point of administration and monitoring is essential to a healthy system admin
plus alert management in NLS is pretty much non existent (its really good at sending but not so good at handling), using core or XI to handle the alerts gives you the ability to really handle how alerts are managed
but if you want if I was to send alerts straight from NLS
I'd do it this way ....
I'd use the "official" nagios core integration from slack which you enable from here https://my.slack.com/services/new/nagios (follow their directions to get your token)
then script for your NLS server can be grabbed from here https://raw.githubusercontent.com/tinys ... /nagios.pl
i did
Code: Select all
cd /usr/bin
wget https://raw.githubusercontent.com/tinyspeck/services-examples/master/nagios.pl -O slack.pl
chomd 555 slack.pl
find the lines that start like this
Code: Select all
my $opt_domain =
my $opt_token =
if you are using the nagios supplied NLS VM you will need to install a couple of perl modules
Code: Select all
yum install perl-libwww-perl perl-LWP-Protocol-https Code: Select all
-field slack_channel=#NLS -field HOSTALIAS="NLS" -field SERVICEDESC="Apache404" -field SERVICESTATE="%status%" -field SERVICEOUTPUT="%output%"and I get
Code: Select all
NLS/Apache404 is ok:
\'OK: 0 matching entries found \|logs=0\;555\;1000\'
but I'd never do this I'd simply setup a service that received passive checks in Nagios Core and have NLS send the alert using NRDP to that service and have core handle the alerting and acknowledgements of the alerts
You do not have the required permissions to view the files attached to this post.
Looking forward to seeing you all at #NagiosCon2019?
-Dedicated Lover of Nconf,PNP4Nagios and Nagvis
-Dedicated Lover of Nconf,PNP4Nagios and Nagvis
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact: