[ZBX-17677] zabbix_sender does not work if run on zabbix server host? Created: 2020 May 05  Updated: 2020 Jun 30

Status: Open
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Jeroen Baten Assignee: Eduards Matuls (Inactive)
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

zabbix 4.4.7 on 3 hosts, one is server


Attachments: PNG File image-2020-05-05-10-50-02-806.png     PNG File image-2020-05-06-08-39-07-209.png     PNG File image-2020-06-19-15-02-18-743.png    

 Description   

 

Running on host that is NOT the zabbix server:

zabbix_sender -vv -c /etc/zabbix/zabbix_agentd.conf --key rclone.log --value "2020/05/05 09:44:14 test 123"
zabbix_sender [11163]: DEBUG: answer [\{"response":"success","info":"processed: 1; failed: 0; total: 1; seconds spent: 0.000112"}]
Response from "167.172.41.94:10051": "processed: 1; failed: 0; total: 1; seconds spent: 0.000112"
sent: 1; skipped: 0; total: 1

 

Running on host that IS the zabbix server:

zabbix_sender -vv -c /etc/zabbix/zabbix_agentd.conf --key rclone.log --value "2020/05/05 09:44:14 test 123"
zabbix_sender [14872]: DEBUG: answer [\{"response":"success","info":"processed: 0; failed: 1; total: 1; seconds spent: 0.000025"}]
Response from "127.0.0.1:10051": "processed: 0; failed: 1; total: 1; seconds spent: 0.000025"
sent: 1; skipped: 0; total: 1

 

 



 Comments   
Comment by Glebs Ivanovskis [ 2020 May 06 ]

Check Allowed hosts setting for this trapper item.

Comment by Jeroen Baten [ 2020 May 06 ]

The item is from a template and no Allowed host setting is in effect

Comment by Glebs Ivanovskis [ 2020 May 06 ]

Are /etc/zabbix/zabbix_agentd.conf files identical on these hosts?

Is there anything useful in server's log file?

Comment by Jeroen Baten [ 2020 May 06 ]

Loglevel 4

12195:20200505:094940.318 zbx_setproctitle() title:'trapper #1 [processing data]'
12195:20200505:094940.318 trapper got '{"request":"sender data","data":[

{"host":"s102","key":"rclone.log","value":"test 123"}

]}'
12195:20200505:094940.319 In recv_senderhistory()
12195:20200505:094940.319 In process_client_history_data()
12195:20200505:094940.319 In parse_history_data()
12195:20200505:094940.319 End of parse_history_data():SUCCEED processed:1/1
12195:20200505:094940.319 In process_history_data()
12195:20200505:094940.319 End of process_history_data() processed:0
12195:20200505:094940.319 End of process_client_history_data():SUCCEED
12195:20200505:094940.319 In zbx_send_response_ext()
12195:20200505:094940.319 zbx_send_response_ext() '{"response":"success","info":"processed: 0; failed: 1; total: 1; seconds spent: 0.000123"}'
12195:20200505:094940.319 End of zbx_send_response_ext():SUCCEED

Loglevel 5

12522:20200505:095150.373 trapper got '{"request":"sender data","data":[

{"host":"s102","key":"rclone.log","value":"test 123"}

]}'
12522:20200505:095150.373 In recv_senderhistory()
12522:20200505:095150.373 In process_client_history_data()
12522:20200505:095150.373 In parse_history_data()
12522:20200505:095150.373 End of parse_history_data():SUCCEED processed:1/1
12522:20200505:095150.373 In process_history_data()
12522:20200505:095150.373 End of process_history_data() processed:0
12522:20200505:095150.373 End of process_client_history_data():SUCCEED
12522:20200505:095150.373 In zbx_send_response_ext()
12522:20200505:095150.373 zbx_send_response_ext() '{"response":"success","info":"processed: 0; failed: 1; total: 1; seconds spent: 0.000100"}'
12522:20200505:095150.373 End of zbx_send_response_ext():SUCCEED

Comment by Jeroen Baten [ 2020 May 06 ]

While on the subject: just a little more diagnostic messages for zabbx-sender would be really nice...

Comment by Ingus Vilnis [ 2020 May 06 ]

Try using external IP instead of 127.0.0.1 for ServerActive in zabbix_agentd.conf and see if that makes any difference.

Comment by Jeroen Baten [ 2020 May 06 ]
vim /etc/zabbix/zabbix_agentd.conf
# grep ServerActive /etc/zabbix/zabbix_agentd.conf
### Option: ServerActive
ServerActive=x.y.z.a (removed for security reasons)

# service zabbix-agent restart
# zabbix_sender -c /etc/zabbix/zabbix_agentd.conf --key rclone.log --value "test123"
Response from "x.y.z.a:10051": "processed: 0; failed: 1; total: 1; seconds spent: 0.000025"
sent: 1; skipped: 0; total: 1
root@s102:~#

Result: makes no difference

 

Comment by Alexander Vladishev [ 2020 May 28 ]

Not related to the problem, but "Log time format" is incorrect in the item configuration. The month should be capitalized: yyyy/MM/dd hh:mm:ss.

Comment by Eduards Matuls (Inactive) [ 2020 Jun 19 ]

Hello!

After reviewing the issue I have additional questions:

  1. You use "-c /etc/zabbix/zabbix_agentd.conf" on both hosts. I assume Hostname is different on those /etc/zabbix/zabbix_agentd.conf files, isn't it? 
  2. Does your Zabbix server's agent has an item with key rclone.log ?

Regards,
Eduards

Comment by Jeroen Baten [ 2020 Jun 19 ]

I just checked and can confirm it still behaves the same.

Q1:

 good host:# grep Hostname /etc/zabbix/zabbix_agentd.conf | grep -v "^#"
 Hostname=s101

 bad host/server# grep Hostname /etc/zabbix/zabbix_agentd.conf | grep -v "^#"
 Hostname=s102

Q2:

Both hosts have the same template assigned with the same rclone.log key.

 

Screenshot of latest data afther having just run the same command

Generated at Sun May 11 08:43:20 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.