Skip to content

niceshops/zabbix-ampel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zabbix Traffic Light

Ampel

Setup

  1. Buy a USB traffic light - in our case we used this one

  2. Install a host-system to trigger the traffic-light - in our case we needed an x86-bit linux/raspbian as the cli-binary only supported that architecture

  3. Make sure you can trigger its lights manually using the shell

  4. Make sure the host-system can access the Zabbix Server web-interface (firewalling)

  5. Create an API user

    • See: Zabbix Docs
    • You may need to create a custom user-role: Zabbix Docs
    • Groups: Readers
    • Permissions:
      • User-type: User
      • Permissions: Read access on groups you want to 'display'
  6. Copy the script to the host-system and update/modify the variables as needed:

    • API_URL, API_USER, API_PWD
    • AMPEL_CMD => path to your executable
    • CHOICES => map the zabbix trigger priority to commands
  7. Install the requirements

    python3 -m pip install pyzabbix
  8. Add a service to run the script

    cp ampel.service /etc/systemd/system/
    systemctl daemon-reload
    systemctl enable ampel.service
    systemctl start ampel.service
    systemctl status ampel.service