Hi
I'm trying to understand how LLD works.
(zabbix v4.2.8)
I'll create UserParameter:
Bash script /usr/local/bin/test.discovery contains:
When i ask from agent with
Result will be:
So far, so good. Now i create template with 2 item prototypes:

Everything seems to be OK, and after i assign template to host, items will be discovered and data starts to come in:

Now i'll create third item prototype in template:

And after that discovery rule gives me an error:

So, now, template contains item prototype which macro name that does not exist on agent side.
Why does it give me error? I mean, should it be the whole point on "discovery" for some items to be discovered and some not?
Is'nt it so that template can contain mote item prototypes than agent data?
I'm trying to understand how LLD works.
(zabbix v4.2.8)
I'll create UserParameter:
Code:
UserParameter=test.discovery[*],/usr/local/bin/test.discovery '$1'
Code:
#!/bin/bash
if [ -z "${1}" ] ; then
echo '{"data":[{"{#UNIXTIME}":"System UNIX time","{#NANOSEC}":"System nanoseconds"}]}'
elif [ "${1}" = "System UNIX time" ] ; then
/bin/date +%s
elif [ "${1}" = "System nanoseconds" ] ; then
/bin/date +%N
fi
sudo -uzabbix zabbix_agentd -t test.discovery
Code:
test.discovery [t|{"data":[{"{#UNIXTIME}":"System UNIX time","{#NANOSEC}":"System nanoseconds"}]}]
Everything seems to be OK, and after i assign template to host, items will be discovered and data starts to come in:
Now i'll create third item prototype in template:
And after that discovery rule gives me an error:
So, now, template contains item prototype which macro name that does not exist on agent side.
Why does it give me error? I mean, should it be the whole point on "discovery" for some items to be discovered and some not?
Is'nt it so that template can contain mote item prototypes than agent data?