https://github.com/gabrielrf/mqtt2zabbix
MQTT to Zabbix
https://github.com/gabrielrf/mqtt2zabbix
mqtt mqtt-client zabbix zabbix-server
Last synced: about 2 months ago
JSON representation
MQTT to Zabbix
- Host: GitHub
- URL: https://github.com/gabrielrf/mqtt2zabbix
- Owner: GabrielRF
- License: gpl-3.0
- Created: 2019-08-27T17:27:27.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-12-16T20:46:15.000Z (over 5 years ago)
- Last Synced: 2025-02-27T05:52:51.865Z (over 1 year ago)
- Topics: mqtt, mqtt-client, zabbix, zabbix-server
- Language: Python
- Homepage:
- Size: 161 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MQTT2Zabbix
A simple, yet functional, way to integrate devices that support MQTT to your Zabbix Server.
## MQTT Broker
First, make sure you have a MQTT Broker running. [Mosquitto](https://mosquitto.org/) is recommended.
## MQTT to Zabbix
Open `Mqtt2Zabbix.py` and set the variables:
```
ZabbixServer: Zabbix server ip
ZabbixPort: Zabbix server port, default 10050
MqttServer: MQTT server ip
MqttPort: MQTT server port, default 1883
MqttUser: MQTT user
MqttPassword: MQTT password
MqttClient: MQTT client id, must be unique
```
Run `Mqtt2Zabbix` as you prefer. This script is responsible for receiving mqtt data and sending it to Zabbix server, so make sure it is running all the time.
It's recommended to run it as a service. If this is your preference, `pythonmqtt.service` is an example of configuration.
## Zabbix
Then, make sure your Zabbix server is listening port 10050 and reachable by the broker.

Finally, add an item to your Zabbix with `Zabbix trapper` as its type.

## MQTT Client
Set your client to `publish` to the broker IP having the topic as `host_name.item_key`. The message sent will be the data collected by the Zabbix Server.