Conversation
|
Hi Firewire2002, |
|
Done and fixed the typo in Prometheus link description. |
|
Thanks for your work. |
|
I'm a bit late to the part, but here I go:
That was on purpose. The idea was to send all metrics in a single connection, and then extract data using preprocessing and dependant items. It does exactly what I described above. |
|
Yes that's also a nice way. But a single string isn't the best solution for such case. JSON would be the better way to transfer data in one shot. Much easier for parsing than a string. Btw, my script uses also only one connection. zabbix_sender is able to send multiple items. I didn't benchmark it, but I think the difference between both variants isn't very large. If you send a master item, the Zabbix Server has to parse and split it up into dependent items. Regex is very expensive. |
|
Most certainly, JSON would be preferred, I just have an aversion to using it in bash scripts 😅 With one trapper item you only need to have one 'nodata' based trigger, which is always nice - preprocessing can be distributed across proxies, trigger evaluation cannot. I like how you handled the sender configuration ans PSK. Nicely done.
True that. I should never read code on a smartphone... |
The old script uses only one text item for all metrics in Zabbix. So it was impossible to generate graphs or statistics with it.
Now each value has it's own Zabbix item. :)