hengyunabc / zabbix-sender

java zabbix-sender

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use this project to create trapper lld

zbence opened this issue · comments

Hi, thank you for this awesome project it's working well for me if I want to send simple trapper messages to the zabbix server.

Can I use this project for creating a trapper lld and item prototypes with macros?

I just ask this because I deal with dynamic number of items and I don't want to create with hand.

I want to send something like this:
{ "request": "sender data", "data": [{ "host": "LLD_TEST", "key": "DISCOVERY_KEY", "value": [{ "{#ITEM}": "200" }, { "{#ITEM}": "100" }] }] }

But I got an error in the server side: Value should be a json object. So I checked what the api sends to the server and I see that the json parsed as String not as a collection of json object.

Edit:

I checked the logs and the server receives a String:
{ "request": "sender data", "data": [{ "host": "LLD_TEST", "key": "DISCOVERY_KEY", "value": "[{ \"{#ITEM}\": \"200\" }, { \"{#ITEM}\": \"100\" }]" }] }
The value field is basicly a string not a json

I saw there is an example in the test package how to create lld rule with this api.