I was using zabbix_agentd 3.0.28 after updating to zabbix_agentd 3.0.31 i find out some triggers stoped working.
I saw that some changes occurred:
Was...
Now
the logs have changed as well:
Was:
Now:
My zabbix_agentd.conf was:
I had to update to match the new configuration of the folders:
I have agents running on both versions, 3.0.28 and 3.0.31, the ones that are running on version 3.0.31 some triggers are not working properly.
Here is one that is not working on version 3.0.31 but works fine on 3.0.28.
Looking into zabbix_agentd.log i see that the commands are being running but the return change according to the version:
zabbix_agentd 3.0.28
On version 3.0.28 is returning 1 (ONE).
zabbix_agentd 3.0.31
On version 3.0.31 is returning 0 (ZERO).
If i run the commands directly on terminal, I have the followed return:
Based on the return of the commands on the terminal, that are greater than zero, the Zabbix should not up an alert, but its upping an alert like the result is like zero.
I have no idea why it is returning zero.
Anyone know what is happening, what can be done to solve this problem?
Thanks.
I saw that some changes occurred:
Was...
Code:
/etc/zabbix/zabbix_agentd.d
Code:
/etc/zabbix/zabbix_agentd.conf.d/
Was:
Code:
/var/log/zabbix/zabbix_agentd.log
Code:
/var/log/zabbix-agent/zabbix_agentd.log
Code:
PidFile=/var/run/zabbix/zabbix_agentd.pid LogFile=/var/log/zabbix/zabbix_agentd.log LogFileSize=100 EnableRemoteCommands=1 LogRemoteCommands=1 Server=100.220.254.1 AllowRoot=1 Include=/etc/zabbix/zabbix_agentd.d/
Code:
PidFile=/var/run/zabbix/zabbix_agentd.pid LogFile=/var/log/zabbix-agent/zabbix_agentd.log LogFileSize=100 EnableRemoteCommands=1 LogRemoteCommands=1 Server=100.220.254.1 AllowRoot=1 Include=/etc/zabbix/zabbix_agentd.conf.d/*.conf
Here is one that is not working on version 3.0.31 but works fine on 3.0.28.
Code:
{viabat:system.run[/sbin/iptables-save | grep "INPUT DROP" | wc -l].last()}=0 or {viabat:proc.num[,,,fail2ban\-server].last()}=0 or {viabat:system.run[/sbin/iptables-save | grep -i "f2b-ASTERISK" | wc -l].last()}=0 or {viabat:system.run[/sbin/iptables-save | grep -i "f2b-ssh" | wc -l].last()}=0
Looking into zabbix_agentd.log i see that the commands are being running but the return change according to the version:
zabbix_agentd 3.0.28
Code:
21881:20201202:120144.809 EXECUTE_STR() command:'/sbin/iptables-save | grep "INPUT DROP" | wc -l' len:1 cmd_result:'[COLOR=#27ae60][B]1[/B][/COLOR]' 21881:20201202:120144.809 Sending back [[COLOR=#16a085][B]1[/B][/COLOR]]
zabbix_agentd 3.0.31
Code:
18670:20201202:120059.957 EXECUTE_STR() command:'/sbin/iptables-save | grep "INPUT DROP" | wc -l' len:1 cmd_result:'[COLOR=#c0392b][B]0[/B][/COLOR]' 18670:20201202:120059.957 Sending back [[COLOR=#c0392b][B]0[/B][/COLOR]]
If i run the commands directly on terminal, I have the followed return:
Code:
# /sbin/iptables-save | grep "INPUT DROP" | wc -l 1 # /sbin/iptables-save | grep -i "f2b-ASTERISK" | wc -l 3 # /sbin/iptables-save | grep -i "f2b-ssh" | wc -l 3
I have no idea why it is returning zero.
Anyone know what is happening, what can be done to solve this problem?
Thanks.
Comment