A Nagios plugin to send notifications to MS teams
These perl modules need to be installed.
- HTTP::Request
- LWP::UserAgent
- LWP::Protocol::https
- JSON
--webhook
is required option.
--nagios_url
to add a link in the notification.
export NAGIOS_HOSTALIAS="hoge101" NAGIOS_SERVICEDESC="http" NAGIOS_SERVICESTATE="WARNING" NAGIOS_SERVICEOUTPUT="test output"
./nagios-msteams.pl --webhook 'https://your incoming webhook url'
Proxy environment variables can be specified using lowercase environment variables ending in "*_proxy".
export http_proxy="http://proxy.example.com/"
export no_proxy="localhost"
- place the script in nagios plugin directory
chmod +x <path to Nagios plugin>/nagios-msteams.pl
- configure commands, contacts