Skip to content

A Short Tutorial With ZABBIX Running in Docker and Python

Notifications You must be signed in to change notification settings

noacktino/zabbix-docker-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zabbix-docker-python

A Short Tutorial With ZABBIX Running in Docker and Python

Dependencies

  1. Docker https://www.docker.com/
  2. ZABBIX https://www.zabbix.com/
  3. ZABBIX already provides docker images https://hub.docker.com/u/zabbix/

Running the Example

  1. You should start the Docker container running the following command:
    docker-compose -f docker-compose-local.yml up
    You can then access the ZABBIX Web Frontend (user: Admin pwd: zabbix) http://localhost:8081
  2. Make sure that the ZABBIX server entails the right configuration Server Configuration
    • You need to have the host configured (see ZABBIX docs)
      • Host name: my.local.sender
      • Groups: Templates/Applications
      • Agent interfaces: keep original configuration
    • You need to have at least the Trapper item configured (see ZABBIX docs)
      • Name: Trapper item
      • Type: Zabbix trapper
      • Type of information: Numeric unsigned
  3. (Optional) Create a python virtualenv
    virtualenv -p python3 ./venv
  4. Install the python requirements
    pip install -r requirements.txt
  5. Start the zabbix_client
    python zabbix_client/__init__.py
  6. You should then receive a message like this:
    {"processed": 1, "failed": 0, "total": 1, "time": "0.000140", "chunk": 1}
  7. In the ZABBIX Web Interface you can then see the latest events Server Configuration
  8. You can then play a bit with the sender and send different integer values and visualize them in a graph Server Configuration
  9. If you get {"processed": 0, "failed": 1, "total": 1, "time": "0.000140", "chunk": 1} check your server configuration!

Improvements

Maybe it's possible to provision the ZABBIX server in order to avoid manual configuration which is error prone. Therefore, the api could be used.

About

A Short Tutorial With ZABBIX Running in Docker and Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages