In my test environment I try to setup lvs monitor with zabbix LLD.
Zabbix 3.2.0
OS: Ubuntu 14.04.1 LTS
# Discovery rule
1. key: lvs.service
2. Type: Zabbix agent
3. Two Filters with empty regular expression
# Item prototypes 1 works fine
Key: net.tcp.service[tcp,{#SERVICE_HOST},{#SERVICE_PORT}]
Type: Zabbix agent
# Item prototypes 2 doesn't work, no item created in Configuration -> Hosts -> Items page
Key: lvs_service[inbps,{$SERVICE_HOST},{$SERVICE_PORT}]
Type: Zabbix trapper
A crontab use zabbix_sender to send data to zabbix_server
In zabbix console, discovery rule show error:
After some time, the error message missing, and Zabbix Server log
How to debug LLD issue?
Thanks,
Linbo
Zabbix 3.2.0
OS: Ubuntu 14.04.1 LTS
# Discovery rule
1. key: lvs.service
2. Type: Zabbix agent
3. Two Filters with empty regular expression
Code:
{#SERVICE_HOST}
{#SERVICE_PORT}
# cat /etc/zabbix/zabbix_agentd.conf.d/userparameter_lvs.conf
UserParameter=lvs.service, python /etc/zabbix/script/lvs_monitor/dump_service.py
# python /etc/zabbix/script/lvs_monitor/dump_service.py
{"data": [{"{#SERVICE_HOST}": "10.211.55.12", "{#SERVICE_PORT}": "7777"}, {"{#SERVICE_HOST}": "10.211.55.11", "{#SERVICE_PORT}": "7778"}]}
# Item prototypes 1 works fine
Key: net.tcp.service[tcp,{#SERVICE_HOST},{#SERVICE_PORT}]
Type: Zabbix agent
# Item prototypes 2 doesn't work, no item created in Configuration -> Hosts -> Items page
Key: lvs_service[inbps,{$SERVICE_HOST},{$SERVICE_PORT}]
Type: Zabbix trapper
A crontab use zabbix_sender to send data to zabbix_server
Code:
# cat /tmp/lvs_service_stat
precise64 lvs_service[inpps,10.211.55.12,7777] 1485221745 0
precise64 lvs_service[inpps,10.211.55.11,7778] 1485221745 0
Code:
Cannot create item: item with the same key "lvs_service[inbps,{$SERVICE_HOST},{$SERVICE_PORT}]" already exists.
Cannot create item: item with the same key "lvs_service[inbps,{$SERVICE_HOST},{$SERVICE_PORT}]" already exists.
Code:
trapper got '{
"request":"sender data",
"data":[
{
"host":"precise64",
"key":"lvs_service[inpps,10.211.55.12,7777]",
"value":"0",
"clock":1485221821},
{
"host":"precise64",
"key":"lvs_service[inpps,10.211.55.11,7778]",
"value":"0",
"clock":1485221821}],
"clock":1485221821}'
16152:20170124:093701.030 In recv_agenthistory()
16152:20170124:093701.030 In process_hist_data()
16152:20170124:093701.030 In process_mass_data()
16152:20170124:093701.031 End of process_mass_data()
16152:20170124:093701.031 End of process_hist_data():SUCCEED
16152:20170124:093701.031 In zbx_send_response()
16152:20170124:093701.031 zbx_send_response() '{"response":"success","info":"processed: 0; failed: 2; total: 2; seconds spent: 0.000102"}'
How to debug LLD issue?
Thanks,
Linbo
Comment