Hello everyone! I have a problem with creating items and template with these items for right dialog between zabbix-server and zabbix-agent.
On agent site i have an application which writes some data about some servers in sqlite DB, and I have added two special python scripts which i want to look through this DB and from which i want to send data to zabbix-server. First script (script1.py) takes no argument, that's why i have added it in UserParameter simple like: "UserParameter=agent.script1,../../../script1.py", but it returns a set of string values (some server's names), which it finds in DB. The second script (script2.py) takes one argument(one server name) and returns the status(numbers:0,1 or 2) of this server, that's why i have added it in UserParameter as: "UserParameter=agent.script2[*],../../../script2.py $1".
I should say that i have added these two strings only on agent site in agent config file(am i right or not i don't know).
And the main question for me is: how should i create new items for these scripts and then add these items to new created template for the purpose of configurating new host(with zabbix-agent, my scripts and DB with data about some servers) in Web-page of zabbix-server and adding this new-created template to this new-configurated host?
For me the hard thing is how should i set second item and "tell" it to take as an argument value from the set which was returned from first added item.
As a result on dashboard Web-page of zabbix-server for new added host i want to see the table like this:
SERVER NAME I STATUS
Server1 I 1(active)
Server2 | 0(failed)
On agent site i have an application which writes some data about some servers in sqlite DB, and I have added two special python scripts which i want to look through this DB and from which i want to send data to zabbix-server. First script (script1.py) takes no argument, that's why i have added it in UserParameter simple like: "UserParameter=agent.script1,../../../script1.py", but it returns a set of string values (some server's names), which it finds in DB. The second script (script2.py) takes one argument(one server name) and returns the status(numbers:0,1 or 2) of this server, that's why i have added it in UserParameter as: "UserParameter=agent.script2[*],../../../script2.py $1".
I should say that i have added these two strings only on agent site in agent config file(am i right or not i don't know).
And the main question for me is: how should i create new items for these scripts and then add these items to new created template for the purpose of configurating new host(with zabbix-agent, my scripts and DB with data about some servers) in Web-page of zabbix-server and adding this new-created template to this new-configurated host?
For me the hard thing is how should i set second item and "tell" it to take as an argument value from the set which was returned from first added item.
As a result on dashboard Web-page of zabbix-server for new added host i want to see the table like this:
SERVER NAME I STATUS
Server1 I 1(active)
Server2 | 0(failed)
Comment