Metadata-Version: 2.4
Name: argus_notification_msteams
Version: 1.0.0
Summary: Allow argus-server to send notifications to MS Teams
Author-email: Hanne Moa <hanne.moa@sikt.no>
Maintainer-email: Hanne Moa <hanne.moa@sikt.no>
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Django
Classifier: Framework :: Django :: 3.2
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Monitoring
Requires-Dist: argus-server>=1.14.0
Requires-Dist: apprise>=1.9.6
Requires-Dist: tox ; extra == "test"
Requires-Dist: coverage ; extra == "test"
Project-URL: Home, https://github.com/Uninett/argus_notification_msteams
Project-URL: Source, https://github.com/Uninett/argus_notification_msteams
Provides-Extra: test

argus_notification_msteams
==========================

This is a plugin to send notifications to MSTeams from
`Argus <https://github.com/Uninett/argus-server>`_

Different levels of incidents have hard-coded icon colors, based on those used in the Argus frontend.

Version 0.5.1 and older can be used by argus-server version 1.9.x to 1.13.x.

Django settings
---------------

Add ``argus_notification_msteams.MSTeamsNotification`` to ``MEDIA_PLUGINS``::

    MEDIA_PLUGINS = [
        ..
        "argus_notification_msteams.MSTeamsNotification",
    ]

The plugin uses the setting ``NOTIFICATION_SUBJECT_PREFIX``.

Configuration
-------------

Create a workflow inside MS Teams to send webhook alerts to a chat or channel.
This lets you use "Copy webhook link" to get a long url that needs to be
stored in the ``settings``-field.

You can test without invoking the frontend by adding the webhook manually in
Django admin.

POST-ing to the API:

/api/v2/notificationprofiles/destinations/, POSTed body::

    {
      "media": "msteams",
      "label": "whatever",
      "settings": {
        "webhook": "https://msteams.domain/some-very-long-webhook-specific-path"
      }
    }

GET-ing from the API:

/api/v2/notificationprofiles/destinations/{id}/, received result::

  {
    "pk": 0,
    "media": {
      "slug": "msteams",
      "name": "MS Teams"
    },
    "label": "whatever",
    "suggested_label": "whatever",
    "settings": {
      "webhook": "https://msteams.domain/some-very-long-webhook-specific-path"
    }
  }

