semvec/pypi-packages huggingface dataset:
icinga-slack-webhook 2.1.1
icinga-slack-webhook: A notifier from Icinga to Slack
License: MIT

icinga-slack-webhook
====================

A script to send notifications to Slack.com from Nagios or Icinga via the generic webhook integration

.. image:: https://travis-ci.org/alphagov/icinga_slack_webhook.png?branch=master
   :target: https://travis-ci.org/alphagov/icinga_slack_webhook

The `homepage is on Github <https://github.com/alphagov/icinga_slack_webhook>`_

Installation
------------

    $ pip install icinga-slack-webhook

Usage
-----

::

    usage: icinga_slack_webhook_notify [-h] -c CHANNEL -m MESSAGE [-u WEB_HOOK_URL | -p]
                                       [-A SERVICE_ACTION_URL] [-H HOST] [-d HOST_DISPLAY_NAME]
                                       [--host-state HOST_STATE]
                                       [-L {OK,WARNING,CRITICAL,UNKNOWN}] [-N SERVICE_NOTES_URL]
                                       [-S STATUS_CGI_URL] [-E EXTINFO_CGI_URL] [-U USERNAME]
                                       [-V]

    Send an Icinga Alert to Slack.com via a generic webhook integration

    optional arguments:
      -h, --help            show this help message and exit
      -c CHANNEL, --channel CHANNEL
                            The channel to send the message to
      -m MESSAGE, --message MESSAGE
                            The text of the message to send
      -u WEB_HOOK_URL, --web-hook-url WEB_HOOK_URL
                            The webhook URL for your integration
      -p, --print-payload   Rather than sending the payload to Slack, print it to STDOUT
      -A SERVICE_ACTION_URL, --service-action-url SERVICE_ACTION_URL
                            An optional action_url for this alert {default: None}
      -H HOST, --host HOST  An optional host the message relates to
      -d HOST_DISPLAY_NAME, --host-display-name HOST_DISPLAY_NAME
                            An optional display name for the host the message relates to
      --host-state HOST_STATE
                            An optional state the host is in, use this for host alerts
      -L {OK,WARNING,CRITICAL,UNKNOWN}, --level {OK,WARNING,CRITICAL,UNKNOWN}
                            An optional alert level {default: UNKNOWN}
      -N SERVICE_NOTES_URL, --service-notes-url SERVICE_NOTES_URL
                            An optional notes_url for this alert {default: None}
      -S STATUS_CGI_URL, --status-cgi-url STATUS_CGI_URL
                            The URL of status.cgi for your Nagios/Icinga instance {default:
                            https://nagios.example.com/cgi-bin/icinga/status.cgi}
      -E EXTINFO_CGI_URL, --extinfo-cgi-url EXTINFO_CGI_URL
                            The URL of extinfo.cgi for your Nagios/Icinga instance
      -U USERNAME, --username USERNAME
                            Username to send the message from {default: Icinga}
      -V, --version         Print version information
dash-okta-auth 0.0.1
Dash Okta Auth
License: MIT

# Dash Okta Auth

Dash Okta Auth is a simple library using Okta OAuth to authenticate and
view a [Dash](https://dash.plot.ly/) app.

This Library uses [Flask Dance](https://github.com/singingwolfboy/flask-dance)
and a modified version of Plotly's own [dash auth](https://github.com/plotly/dash-auth)
for authentication.

This Library is heavily inspired by [dash-google-oauth](https://github.com/lchapo/dash-google-auth) created by Lucas Chapin

## Basic Use

Authentication can be added to your Dash application using the `OktaOAuth`
class, i.e.

```python
from dash import Dash
from flask import Flask
from dash_okta_auth import OktaOAuth

server = Flask(__name__)
server.config.update({
  'OKTA_OAUTH_CLIENT_ID': ...,
  'OKTA_OAUTH_CLIENT_SECRET': ...,
})

app = Dash(__name__, server=server, url_base_pathname='/', auth='auth')

additional_scopes = [...]
auth = OktaOAuth(app, base_url='https://myoktadomain.okta-emea.com', additional_scopes)

# your Dash app here :)
...
```

## Example
Steps to try this out yourself:

1. Install the `dash-okta-auth` library using `pip`:

    ```bash
    $ pip install dash-okta-auth
    ```

2. Follow the [Flask Dance Guide](http://flask-dance.readthedocs.io/en/latest/quickstarts/okta.html)
   to create an app on the okta admin console

3. Make a copy of [app.py](https://github.com/lucaschapin/dash-okta-auth/blob/master/app.py)
   and set the variables (or set the corresponding environment variables):
    ```python
    server.config["OKTA_OAUTH_CLIENT_ID"] = ...
    server.config["OKTA_OAUTH_CLIENT_SECRET"] = ...
    ```
   with values from the Okta OAuth 2 application you should have set up earlier.
   If you've set these up properly, you can find them at
   `Applications > yourapp > General`
   under the section **Client Credentials**.

4. Run `python app.py` and open [localhost](http://localhost:8050/) in a
   browser window to try it out! If the app loads automatically without
   prompting a Okta login, that means you're already authenticated -- try
   using an inokta window in this case if you want to see the login
   experience for a new user.