ESP32 Zabbix Controller

Moderators: grovkillen, Stuntteam, TD-er

Message
Author
pp1wvc
Normal user
Posts: 38
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: ESP32 Zabbix Controller

#51 Post by pp1wvc » 14 Mar 2023, 11:33

TD-er wrote: 14 Mar 2023, 10:50 I don't see how creating a new one is better than just fixing what's apparently broken.

Just a few pointers for you to test/check as I don't have a Zabbix server/service running here.

- Check the timeout in the controller and set it to as high as possible to make sure this isn't a timeout issue. (e.g. 1000 msec)
- Test with both waiting for a reply and ignoring it in both the controller settings as well as in the tools->Advanced settings on "SendToHTTP"
- Try adding some debug code to see why making the connection fails. (e.g. http error code could help here)
Making the controller optional like you did with ili9486e and ili9488 in _P095_ILI9341 , can be good, even for space reasons, it's a suggestion.
Did you notice how identical they are in the code posted regarding the zabbix controller?
Any suggestions for creating a controller template for espeasy?

jimmys01
Normal user
Posts: 24
Joined: 07 Jan 2019, 22:37

Re: ESP32 Zabbix Controller

#52 Post by jimmys01 » 15 Mar 2023, 19:05

I wrote the Zabbix plugin. I tried my best to document the procedure to set it up to the source code... I know not the best I could do , but it was the fastest I could do it in my limited time.

I have deployed like 200+ nodes and report to zabbix just fine. I dont know if the ESP32 is your problem...

Let me know if i can assist

pp1wvc
Normal user
Posts: 38
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: ESP32 Zabbix Controller

#53 Post by pp1wvc » 16 Mar 2023, 01:48

jimmys01 wrote: 15 Mar 2023, 19:05 I wrote the Zabbix plugin. I tried my best to document the procedure to set it up to the source code... I know not the best I could do , but it was the fastest I could do it in my limited time.

I have deployed like 200+ nodes and report to zabbix just fine. I dont know if the ESP32 is your problem...

Let me know if i can assist
jimmy 01 Thank you for answering me. I decided to try a few more times and fix the problem I had with your Zabbix plugin, and follow TD-er's advice, and it's working now with the newer versions of zabbix, but I'm redoing some notes including photographs of what I did to make it work. post here to help everyone. :)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP32 Zabbix Controller

#54 Post by TD-er » 16 Mar 2023, 08:30

And maybe you can also make a pull request for the changes.

martin88
New user
Posts: 1
Joined: 02 Aug 2023, 21:13

Re: ESP32 Zabbix Controller

#55 Post by martin88 » 02 Aug 2023, 21:17

pp1wvc wrote: 16 Mar 2023, 01:48
jimmys01 wrote: 15 Mar 2023, 19:05 I wrote the Zabbix plugin. I tried my best to document the procedure to set it up to the source code... I know not the best I could do , but it was the fastest I could do it in my limited time.

I have deployed like 200+ nodes and report to zabbix just fine. I dont know if the ESP32 is your problem...

Let me know if i can assist
jimmy 01 Thank you for answering me. I decided to try a few more times and fix the problem I had with your Zabbix plugin, and follow TD-er's advice, and it's working now with the newer versions of zabbix, but I'm redoing some notes including photographs of what I did to make it work. post here to help everyone. :)
Hello! How did you do to make it work on newer versions of Zabbix? I cant make it work.
Thank you!

pp1wvc
Normal user
Posts: 38
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: ESP32 Zabbix Controller

#56 Post by pp1wvc » 09 Sep 2023, 02:51

Hello Martin88, I hope you are doing well.
What was preventing the operation has to do with problems involving network latency, but over time I understood that the best way to use this controller is with ethernet.
To help I need your logs, any version of zabbix works perfectly.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP32 Zabbix Controller

#57 Post by TD-er » 09 Sep 2023, 10:24

Hmm timeout issues sound a bit strange.
Why should it matter whether you're using Ethernet or WiFi?

Can you try running a ping from any host to the ESP continuously when running the ESP on WiFi to check if that makes a difference?

pp1wvc
Normal user
Posts: 38
Joined: 06 Jan 2023, 12:02
Location: Brazil

Re: ESP32 Zabbix Controller

#58 Post by pp1wvc » 09 Sep 2023, 14:11

Using the Esp32 in a noisy environment at a congested 2.4GHZ frequency, the connection is lost, generating a read and write error in zabbix, the AP is not close to the Esp32 causing even more inconvenience, my biggest challenge was in the connection between the Esp32 and the AP at 2.4GHZ. As soon as I switched to ethernet it worked perfectly.
Esp32 should think about 5GHZ for connectivity. :D

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: ESP32 Zabbix Controller

#59 Post by Ath » 09 Sep 2023, 14:48

pp1wvc wrote: 09 Sep 2023, 14:11 Using the Esp32 in a noisy environment at a congested 2.4GHZ frequency, the connection is lost, generating a read and write error in zabbix, the AP is not close to the Esp32 causing even more inconvenience, my biggest challenge was in the connection between the Esp32 and the AP at 2.4GHZ. As soon as I switched to ethernet it worked perfectly.
Esp32 should think about 5GHZ for connectivity. :D
Ethernet is a fine solution, but for WiFi-only devices, you can also enable the "Force WiFi B/G:" and "Periodical send Gratuitous ARP:" settings in Tools/Advanced. And experiment with enabling the "Force WiFi No Sleep:" setting.

5GHz will eventually run into the same congestion issues when more devices move to that frequency. AFAIK, there currently aren't any 5GHz ESP devices. I have more confidence in a mesh solution, like offered by the ESP-Now/ESPEasy-Now feature, preliminary available via PR #3301, though it needs a 'chain' or 'swarm' of devices between the AP and the furthest away ESPEasy device, but 1 extra device in between could be enough. While there is a (or maybe more) test-site running on this code, the PR still has some fine-tuning to be done, though.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP32 Zabbix Controller

#60 Post by TD-er » 09 Sep 2023, 16:00

5 GHz for IoT is completely useless IMHO.
Problems with range are a lot worse compared to 2.4GHz and most access points are quite critical regarding the minimum required link quality.

Also I got the impression (no measurements done though) that 5 GHz WiFi requires more energy compared to 2.4GHz.

jimmys01
Normal user
Posts: 24
Joined: 07 Jan 2019, 22:37

Re: ESP32 Zabbix Controller

#61 Post by jimmys01 » 09 Sep 2023, 20:34

Just posting here in red the values that correspond to the correct config items in zabbix.
Attachments
zabbix.png
zabbix.png (68.54 KiB) Viewed 7243 times

zaidpirwani
New user
Posts: 3
Joined: 30 Dec 2023, 21:17

Re: ESP32 Zabbix Controller

#62 Post by zaidpirwani » 31 Dec 2023, 07:39

Hello all, this is my first post - found out about ESPEasy just a couple days back.

this is a very informative post on Zabbix and ESPEasy - I would like to give an update here and sort of summarise as I think overtime the post has gone from here to there.

ESP Easy has a Zabbix Controller - the controller WORKS - it is available in COLLECTION

You have to add a new hsot to zabbix and then add items with Zabbix Trapper - the values should be defined as shown in screenshots by jimmys01
Zabbix Hos Hostname == ESPEasy HostName, make sure to append number -n if you have that enabled
Zabbix Item Key == Name of the Value in Devices

The issue comes when using NEWer Zabbix - I tested with v6.0, v6.2 and v6.4 - the controller data is IGNORED by Zabbix as it does not contain HEADER Data - and maybe also the format is somewhat wrong - as per forum posts, it works on older Zabbix v4 and so on (but i dont have those to test)

I am using ESP8266, havent done any testing with ESP32 - the github link (https://github.com/leruetkins/ESP32ZabbixSender) provided by pp1wvc works, I modified it to work with ESP8266 - I think this needs to be integrated into the ESPEasy Controller as well.

I will try to setup a dev environment and figure out how to contribute with this change - i am good with code but ESPEasy is all new for me.

For now, my task is done using the github code - no esp easy controller thoguh, I am just running that on its own - but in future, I will be needing all the benefits and functions that come with ESP Easy.

Thanks for reading and if you have any guideline for me on my next step to add code and contribute, please let me know - if someone has already fixed it, SUPER - though I couldnt find it.

Also, yes, need to make sure that there is a switcher in the controller to allow for different versions of Zabbix Server, as mentioned by TD-er in his reply.

jimmys01
Normal user
Posts: 24
Joined: 07 Jan 2019, 22:37

Re: ESP32 Zabbix Controller

#63 Post by jimmys01 » 12 Jan 2024, 14:13

zaidpirwani wrote: 31 Dec 2023, 07:39 The issue comes when using NEWer Zabbix - I tested with v6.0, v6.2 and v6.4 - the controller data is IGNORED by Zabbix as it does not contain HEADER Data - and maybe also the format is somewhat wrong - as per forum posts, it works on older Zabbix v4 and so on (but i dont have those to test)
Can you please alaborate? I use it all the time, with deployments from 5.4 to 6.4, but with esp8266.
Perhaps its the esp32 thats causing the issues, sonce otherwise the code works

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 33 guests