nagios slack plugin #1

Supports: xenial bionic
Add to new model

Description

Send Nagios notifications to Slack with this plugin.


nagios-slack plugin

GitHub Action CI badge
License: GPL v3

This subordinate charm enables Nagios to send notifications to Slack.
The charm is intended to be used with the nagios charm.

Usage

The charm creates a new Nagios contact definition called slack.
This contact should be added to the default Nagios contact group.
Here is an example to get going:

juju deploy cs:~huntdatacenter/nagios-slack-plugin
juju deploy nagios
juju add-relation nagios:juju-info nagios-slack-plugin:juju-info
juju config nagios contactgroup-members="root,slack"
juju config nagios-slack-plugin slack_webhook_url="https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"

Development

Here are some helpful commands to get started with development and testing:

$ make help
lint                 Run linter
build                Build charm
deploy               Deploy charm
upgrade              Upgrade charm
force-upgrade        Force upgrade charm
test-xenial-bundle   Test Xenial bundle
test-bionic-bundle   Test Bionic bundle
push                 Push charm to stable channel
clean                Clean .tox and build
help                 Show this help

Further information

Links

Attribution

This project is based on modifications of the following projects:

License

Copyright (C) 2017 Runlevel Consulting Ltd.

Copyright (C) 2018-2019 Øystein Baarnes

Copyright (C) 2020 Norges teknisk-naturvitenskapelige universitet

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see https://www.gnu.org/licenses/.


Configuration

contact_name
(string) The Nagios contact name.
slack
host_notification_options
(string) The Nagios host_notification_options.
d,r
host_notification_period
(string) The Nagios host_notification_period.
24x7
service_notification_options
(string) The Nagios service_notification_options.
w,u,c,r
service_notification_period
(string) The Nagios service_notification_period.
24x7
slack_webhook_url
(string) The Slack Webhook URL for the plugin. This configuration option must be set.