GithubHelp home page GithubHelp logo

elonen / slack-zabbix-action-bot Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 17 KB

Simple interactive Slack bot for Zabbix. Activate maintenance periods and list issues.

License: MIT License

Shell 6.22% Python 93.78%

slack-zabbix-action-bot's Introduction

Slack Zabbix Action Bot

A simple, interactive Slack bot integrating with the Zabbix monitoring system. List active problems and activate maintenance periods using socket mode and Zabbix jsonrpc API. For real-time notifications, use incoming webhooks. Runs as a systemd service.

Usage

  1. Create Slack app, install to workspace using the manifest below:

    display_information:
    name: Zabbix bot
    description: Sysops Zabbix monitoring bot
    background_color: "#7a1600"
    features:
    bot_user:
        display_name: Zabbix
        always_online: false
    oauth_config:
    scopes:
        bot:
        - app_mentions:read
        - chat:write
        - chat:write.customize
        - commands
        - im:write
        - incoming-webhook
        - reactions:write
        - reactions:read
    settings:
    event_subscriptions:
        bot_events:
        - app_mention
    interactivity:
        is_enabled: true
    org_deploy_enabled: false
    socket_mode_enabled: true
    token_rotation_enabled: false
  2. Create Zabbix user with API token. Needs permissions to update maintenance periods and list active problems.

  3. Configure bot in config.ini (Slack app token, Zabbix API URL/token, bot mention name and allowed channel IDs).

  4. Install with install.sh or manually.

  5. Test bot with commands (e.g. @zabbix_bot list).

The bot can be installed as a systemd service using the install.sh script.

Bot Commands

  • list or problems: List active problems
  • mute or maintenance: Show a form to activate a maintenance period

Trigger command by mentioning the bot with a keyword: @zabbix mute. Shows usage if no keyword is given.

License

Copyright 2023 by Jarno Elonen.

Licensed under the MIT License.

slack-zabbix-action-bot's People

Contributors

elonen avatar

Watchers

 avatar  avatar

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.