Giter VIP home page Giter VIP logo

beacon_notify's Introduction

F5 Beacon Notification

This is an example of using the results of a F5 Beacon API call to general alerts and notifications. The repo builds a docker container that can be run to handle the polling and sending of notifications. It utilizes Apprise for sending the notifications. This allows you to update the configuration to send the alerts to any integrations supposed by Apprise.

Workflow

  • The container will poll the F5 Beacon API on an interval set in the beacon_config.yaml file.
  • When an application is in a state included in the alert_state parameter within the beacon_config.yaml file, it will take action.
  • The container will then send notficiations to the destinations listed in the config.yaml file. This file controls the settings for Apprise.
  • If an app is in an alert_state, it will not notify again until the repeatMessage timer has been met that is set within the beacon_config.yaml file. Once that timer is met, it will be considered a new alert again.

Example

  1. Clone the repo and change to the directory

  2. Update the beacon_config.yaml file to match the settings you would like to use.

    • apps: which applications you would like to notify for.
    • checkInterval: How often should it check Beacon for status
    • repeatMessage: How long it should wait before re-sending if the status has not changed.
    • alert_states: which states you would like notifications for (currently only Critical and Warning are supported).
    • clear_states: which states would like to cause a reset in timing for repeatMessage. (Currently only Health is supported)
  3. Update the urls in config.yaml with the destinations you would like notifications sent to. Please note the Apprise docs for available options. The example includes a template for msteams.

  4. Build the container

    docker build -t beacon_notify .

  5. Run the docker container and pass Beacon credentials as environment variables:

    docker run -d -v $(pwd):/usr/src/app -e BEACON_UN='<email>' -e BEACON_PW='<password>' -e BEACON_ACCT='<account>' beacon_notify

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.