{"id":18623597,"url":"https://github.com/codica2/notification-zabbix-bot","last_synced_at":"2025-11-03T18:30:26.413Z","repository":{"id":98303332,"uuid":"383466069","full_name":"codica2/notification-zabbix-bot","owner":"codica2","description":"Zabbix bot for notification in slack!","archived":false,"fork":false,"pushed_at":"2022-08-31T08:57:26.000Z","size":69,"stargazers_count":0,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-27T05:24:52.638Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codica2.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-06T12:46:36.000Z","updated_at":"2021-07-06T12:49:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"32c55953-0d6f-40ef-aadc-63fcb1844c95","html_url":"https://github.com/codica2/notification-zabbix-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codica2%2Fnotification-zabbix-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codica2%2Fnotification-zabbix-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codica2%2Fnotification-zabbix-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codica2%2Fnotification-zabbix-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codica2","download_url":"https://codeload.github.com/codica2/notification-zabbix-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239418574,"owners_count":19635208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T04:25:15.686Z","updated_at":"2025-11-03T18:30:26.374Z","avatar_url":"https://github.com/codica2.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zabbix bot for notification in slack!\n\n![](zabbix-bot.png)\n\n---\n\n### Configuration\n-------------\n\nThis guide describes how to integrate your Zabbix 5.4 and higher installation with Slack using the Zabbix webhook feature. This guide will provide instructions on setting up a media type, a user and an action in Zabbix.\n\n### Setting up a Slack bot\n\n1. On the page [Your Apps](https://api.slack.com/apps) press **Create New App** and specify its name and workspace.\n\n2. In the **Add features and functionality** section, select **Bots** and press **Review Scopes to Add**.\n\n3. In the **Scopes** section, find **Scopes**, press **Add an OAuth Scope** and add `chat:write`, `im:write` and `groups:write` scopes.\n\n4. Press **Install to Workspace** on the top of the page.\n\n5. Now you have bot token, but you only need to use **Bot User OAuth Access Token**.\n\n### Zabbix Webhook configuration\n\n**Create a global macro**\n\n1. Before setting up the **Webhook**, you need to setup the global macro `{$ZABBIX.URL}`, which must contain the **URL** to the **Zabbix frontend**.\n\n2. In the **Administration** \u003e **Media** types section, import the [slack-notification.js](slack-notification.js).\n\n3. Open the added **Slack** media type and set **bot_token** to the previously created token.\n\n- You can also choose between two notification modes:\n  - alarm (default)\n    - Update messages will be attached as replies to Slack message thread\n    - Recovery message from Zabbix will update initial message\n      ```**Note**: alarm mode works correctly only if you send messages to only one channel because the webhook uses non-unique event tags for storing data about created threads, and we cannot perform multiple threads updating.```\n  - event\n    - Recovery and update messages from Zabbix will be posted as new messages.\n\n4. Click the **Update** button to save the **Webhook** settings.\n\n5. To receive notifications in **Slack**, you need to create a **Zabbix user** and add **Media** with the **Slack** type.\n\nAdd new **Parameters:**\n\n- `down_site_url` `{TRIGGER.URL}`\n- `duration` `{EVENT.DURATION}`\n- `event_ack_stauts` `{EVENT.ACK.STATUS}`\n- `event_name` `{EVENT.NAME}`\n- `event_update_message` `{EVENT.UPDATE.MASSAGE}`\n- `host_ip` `{HOST.IP}`\n- `host_web` `{TRIGGER.NAME}`\n\nThe **Send to** field can contain several variants of values:\n\n- Channel name in `#channel_name` format\n- User name in `@slack_user` format for direct messages\n- Identifier (for example: `GQMNQ5G5R`)\n\n6. You must add your bot to the target channel\n\n7. Add **Macros** in Zabbix\n\n- **Administration** \u003e **General** \u003e **Macros**\n  - `{$SLACKTOKEN}` `Your Slack Tocken`\n  - `{$SNMP_COMMUNITY}` `public`\n  - `{$ZABBIX.URL}` `Your Zabbix URL`\n\nFor more information, use the [Zabbix](https://www.zabbix.com/documentation/6.0/manual/config/notifications) and [Slack API](https://api.slack.com/) documentations.\n\n### Supported Versions\n`Zabbix 5.4`\n\n## License\nSlack Notification is Copyright © 2015-2021 Codica. It is released under the [MIT License](https://opensource.org/licenses/MIT).\n\n## About Codica\n\n[![Codica logo](https://www.codica.com/assets/images/logo/logo.svg)](https://www.codica.com)\n\nWe love open source software! See [our other projects](https://github.com/codica2) or [hire us](https://www.codica.com/) to design, develop, and grow your product.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodica2%2Fnotification-zabbix-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodica2%2Fnotification-zabbix-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodica2%2Fnotification-zabbix-bot/lists"}