An original, simple and effective Zabbix Agent for monitoring IoT devices. Tested with Zabbix 7.4.
- Auto-registration in the Zabbix server (using an auto-registration action).
- Simple and familiar setup plus loop design pattern.
- Easy to create and send passive item data to Zabbix.
- Does not perform active checks.
- PlatformIO support not added or tested (yet).
- Navigate: Data collection >> Host groups
- Choose Create host group.
- Name the new group arduino-ex.
- Choose Add.
- Navigate: Data collection >> Templates.
- Choose Import.
- Browse and select the file extras/arduino-ex-template.yaml.
- Choose Import.
- Review the template and choose Import again.
- Navigate: Data collection >> Alerts >> Actions >> Autoregistration actions.
- Choose Create action.
- Name: Create Arduino host.
- Conditions, Add: Host metadata contains arduino-ex, choose Add.
- Operations, Operations, Add: Add host, choose Add.
- Add: Add to host group, arduino-ex, choose Add.
- Add: _Link template, arduino-ex, choose Add.
- Choose Add to add the new action.
- Change the file examples/autoreg/exconfig.h to configure your WiFi and your Zabbix server.
- Upload the sketch.
- Wait a minute or two.
- In Zabbix, navigate: Monitoring >> Hosts.
- Your host should have been created automatically with a name such as esp32c3-ABCDEF.
- You will also notice problems being raised for this host. This is due to no passive checks having a response. We will fix that in the next example.
- Change the file examples/passivechecks/exconfig.h to configure your WiFi and your Zabbix server.
- Upload the sketch to the same board as earlier.
- In Zabbix, navigate: Monitoring >> Hosts.
- Choose the correct host, e.g. esp32c3-ABCDEF, then choose Latest data option from the pop-up.
- In about a minute you should see item data being populated in Zabbix.
- Try shutting down the Arduino or restarting it. You will see problems being raised in Zabbix.
- Change the file examples/fullagent/exconfig.h to configure your WiFi and your Zabbix server.
- Upload the sketch.
- Wait a minute or two.
- The Arduino will appear in the Zabbix server host list, e.g. esp32c3-ABCDEF, and items will be populated.
- If the host is deleted in Zabbix then it will automatically re-register.
- Normal Arduino code can be added to
setup()andloop()as normal. The agent will run quietly in the background.