-
Type:
Problem report
-
Resolution: Cannot Reproduce
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
Component/s: Agent (G)
-
None
Steps to reproduce:
Source data START
- zabbix_agentd (daemon) (Zabbix) 3.2.4
Config: /etc/zabbix/zabbix_agentd.confPidFile=/var/run/zabbix/zabbix_agentd.pid LogFile=/var/log/zabbix/zabbix_agentd.log LogFileSize=100 StartAgents = 11 DebugLevel=3 Timeout=30 MaxLinesPerSecond=1000 Server=zabbix-server.company.local ServerActive=zabbix-server.company.local Hostname=client1.company.local RefreshActiveChecks=60 Include=/etc/zabbix/zabbix_agentd.d/ LoadModulePath=/etc/zabbix/ UserParameter=user_param[*],bash /etc/zabbix/user_param_new.sh "$1" "$2"
Information about problem host:
| Count query | delay | |
|---|---|---|
| 118 | 30 | |
| 49 | 60 | |
| 38 | 120 | |
| 1 | 600 | |
| 12 | 3600 | |
| Count query | type | |
| 189 | ZabbixAgent(passive) | |
| 29 | ZabbixAgent(active) | |
| Count query | type | delay |
| 116 | ZabbixAgent(passive) | 30 |
| 30 | ZabbixAgent(passive) | 60 |
| 38 | ZabbixAgent(passive) | 120 |
| 5 | ZabbixAgent(passive) | 3600 |
| 2 | ZabbixAgent(active) | 30 |
| 19 | ZabbixAgent(active) | 60 |
| 1 | ZabbixAgent(active) | 600 |
| 7 | ZabbixAgent(active) | 3600 |
For 10 minute number query for exec = 3041
AVG execution time for query ~ 1.4 sec
Source data STOP
After startup, all is well.
Through 1,5 - 2 weeks 'agent.ping' begin come at least 1 time per minute.
Without rebooting zabbix_agent, we reduce the command execution time to almost 0 (set static value in user_param_new.sh).
Result:
In not loaded state:
~# netstat -an | grep 10050 | wc -l
3
~# time zabbix_get -s 127.0.0.1 -k agent.ping
real 0m5.006s <---- 5 second. With just started zabbix_agent ~ 0.00[0-9] user 0m0.000s sys 0m0.002s
Check log for on instance (pid 1808).
Log format:
PID:YYYYMMDD:HHMMSS.MSEC text
1808:20180507:192140.682 __zbx_zbx_setproctitle() title:'listener #1 [waiting for connection]' =Accepted processing request at 40 seconds: 1808:20180507:192140.682 __zbx_zbx_setproctitle() title:'listener #1 [processing request]' 1808:20180507:192145.686 Requested [user_param[inst1,status]] =On !!! 45.6 !!! run the command: 1808:20180507:192145.686 In zbx_popen() command:'bash /etc/zabbix/user_param_new.sh "inst1" "status"' 1808:20180507:192145.687 End of zbx_popen():7 1808:20180507:192145.707 In zbx_waitpid() 1808:20180507:192145.707 zbx_waitpid() exited, status:0 1808:20180507:192145.707 End of zbx_waitpid():29874 1808:20180507:192145.707 EXECUTE_STR() command:'bash /etc/zabbix/user_param_new.sh "inst1" "status"' len:1 cmd_result:'1' =On 45.7 (through 0.1 second) sent result: 1808:20180507:192145.707 Sending back [1] =Immediately stay in "waiting for connection": 1808:20180507:192145.707 __zbx_zbx_setproctitle() title:'listener #1 [waiting for connection]' =Immediately accepted the request at 45 seconds: 1808:20180507:192145.707 __zbx_zbx_setproctitle() title:'listener #1 [processing request]' =On !!! 50.7 !!! run the command: 1808:20180507:192150.710 Requested [agent.ping] 1808:20180507:192150.710 Sending back [1] =Immediately stay in "waiting for connection": 1808:20180507:192150.710 __zbx_zbx_setproctitle() title:'listener #1 [waiting for connection]' =Immediately accepted the request at 45 seconds: 1808:20180507:192150.711 __zbx_zbx_setproctitle() title:'listener #1 [processing request]' =On !!! 55.7 !!! run the command: 1808:20180507:192155.711 Requested [net.if.in[eth0]] 1808:20180507:192155.711 Sending back [377892932057] 1808:20180507:192155.711 __zbx_zbx_setproctitle() title:'listener #1 [waiting for connection]' 1808:20180507:192155.711 __zbx_zbx_setproctitle() title:'listener #1 [processing request]' 1808:20180507:192200.716 Requested [vfs.fs.size[/]]
Expected:
In not loaded state:
~# netstat -an | grep 10050 | wc -l
3
~# time zabbix_get -s 127.0.0.1 -k agent.ping
real 0m0.003s user 0m0.000s sys 0m0.002s