Giter Site home page Giter Site logo

zabbix-webhook-notification's Introduction

This repo has been archived.

zabbix-webhook-notification

Uses the webhook feature in Zabbix 4.4 to send alerts to MS Teams.

Credit

Usage

Under Administration->Media Types create a new webhook media type.

Parameters

  • title -> {ALERT.SUBJECT}
  • text -> {ALERT.MESSAGE}
  • WebHookURL -> Your webhook url for the teams (or other service) channel
  • SeverityNumber -> {TRIGGER.NSEVERITY}
  • SeverityName -> {TRIGGER.SEVERITY}
  • Status -> {TRIGGER.STATUS}

Script

Copy the contents of msteams.js or other script and paste into the script editor.

If you don't like the existing colors I recomend this site. https://www.spycolor.com/

zabbix-webhook-notification's People

Contributors

tupcakes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

zabbix-webhook-notification's Issues

not working curlhttprequest with office.outlook.com URL

Hi! Very appreciate your work and light style of script (no .sh scripts needed), but I can't get it work through web frontend.
image
it's a general error, not concerned with the real problem.
I'm behind a proxy (cntlm pass through all requests), but from the same server from bash: ||| curl -H "Content-Type: application/json" -d "{"text": "Hello World"}" https://outlook.office.com/webhook/obfuscated ||| works correctly.
I've checked all logs and settings, the only trace I could find was in zabbix log (added to js some trace output - but I'm not a JS coder, just copied it from web):
"failed: Error: cannot get URL: Timeout was reached."
I believe there's something with the tls handshake or cert verification, because from the same server I've got to work JS alert with api.telegram.org - sends flawlessly (it's in russian, https://blog.programs74.ru/how-to-send-message-from-zabbix-to-telegram-via-webhook/ ). Teams webhook doesn't.
Maybe you'll have some ideas or experience how to get around certificate verification with outlook.com site?
I'm not familiar with js, so I've only tried to add cacert.pem to php.ini and use some
curl_setopt($ch, CURLOPT_CAINFO, '/path/cacert.pem');
and even
curl_setopt($ch,CURLOPT_SSL_VERIFYPEER, false)
none helped.

Thanks in advance!

Zabbix server 4.4.4, apache 2.4.6-90, php 7.2.26 / CentOS 7 Linux 3.10.0-1062.9.1.el7.x86_64

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.