Skip to content

How to configure Zabbix to work with Ludolph

Daniel Kontšek edited this page Sep 18, 2017 · 9 revisions

First, make sure you have got your Ludolph bot up and running


Zabbix configuration

  1. Create a new zabbix user dedicated for Ludolph in Administration -> Users -> Create user

    • Unfortunately the user has to be a Zabbix Super Admin (i.e. to be able to control maintenance periods)
    • The user can and should have disabled access to the frontend
  2. Create new media type in Administration -> Media types -> Create media type

    • Name: Ludolph
    • Type: Script
    • Script name: ludolph.sh
  3. Create ludolph.sh alert script in your AlertScriptsPath with following content

    #!/bin/sh
    
    JID=${1}
    shift
    MSG=$(echo ${@} | sed 's/|\?\*UNKNOWN\*|\?//g')
    
    curl -s -m 5 -o /dev/null -d "jid=${JID}&msg=${MSG}" http://127.0.0.1:8922/alert
    • Update 127.0.0.1:8922 to reflect Ludolph web server configuration
    • Set execute bit on the script: chmod +x <AlertScriptsPath>/ludolph.sh
  4. Add Ludolph media to your user in Administration -> Users with Send to variable set to your jabber ID

  5. Add/Modify Zabbix actions in Configuration -> Actions

Ludolph configuration

  1. Check the web server configuration in /etc/ludolph.cfg

    [webserver]
    host = 127.0.0.1
    port = 8922
  2. Uncoment the zabbix plugin configuration in /etc/ludolph.cfg and configure the zabbix server and zabbix user credentials

    [zabbix]
    # Zabbix server URI
    server = https://zabbix.example.com/zabbix
    
    # Zabbix credentials
    username = ludolph
    password = ludolph_zabbix_password
  3. Restart Ludolph

    service ludolph restart
    • In case of problems, check the logfile