Seems like I'm getting spammed autoregistration messages, everytime there's a reboot/apt upgrade, for starters, here's my agend.conf
I have my Discovery rules set up as

AutoRegistration as

Whenever I run this script I get an alert like

As you can see the script uninstalls and reinstalls the agent, whenever is run so there should be no problem on seeing the autoregistering alert several times each time the script is run.
I installed the agent in 70 servers, and after 1 month of having no problems at all, today a coworker logged in into a server to run a
and we got exactly this (I'm reusing the image from above, be assured that this is the one that triggered)

He did it in another server and the same happened, and in both servers, there were no changes at all in the host configuration itself
After reading https://www.zabbix.com/documentation...o_registration
Where is stated that:
As you can see I have no RefreshActiveChecks parameter set up, so I'm guessing that if I modify the items list on the Zabbix front end this might happen again,
I'm trying to troubleshoot this but, it seems that it cant be easily replicated, right I only know that it's time-dependent and can happen in 1 month or 4 months, (leaving the action steps out of being an option), so I'm wondering of whats the cause...
As far as I can see there are 3 possible scenarios triggering this alert.
1.- Whenever there's a change in the item list (on the Zabbix server)
2.- Whenever the Zabbix agent is updated (apt upgrade)
3.- Whenever the server/hardware reboots
Whatever the case ends up being after I begin testing, I wanted to ask here beforehand:
Is there any way to limit this alert to only ONCE (when it's installed via script), instead of seeing it at random whenever any of the 3 scenarios happen?
Code:
ZABBIX_SERVER="1.1.1.1" #Main P4-zabbix server
if [[ $EUID -ne 0 ]]; then
echo "must run as root" 1>&2
exit 1
else
apt-get remove -y zabbix-agent
apt-get purge -y zabbix-agent
apt-get update
apt-get install zabbix-agent
sed -i "/^Server=/c\Server=${ZABBIX_SERVER}" /etc/zabbix/zabbix_agentd.conf
sed -i "/^ServerActive=/c\ServerActive=${ZABBIX_SERVER}" /etc/zabbix/zabbix_agentd.conf
sed -i "/^Hostname=/c\Hostname=${HOSTNAME}" /etc/zabbix/zabbix_agentd.conf
sed -i "s/# StartAgents=3/StartAgents=5/;
s/# HostMetadata=/HostMetadataItem=release/;
s/# UserParameter=/UserParameter=release, uname -s/" /etc/zabbix/zabbix_agentd.conf
systemctl enable zabbix-agent.service
systemctl restart zabbix-agent.service
fi
AutoRegistration as
Whenever I run this script I get an alert like
As you can see the script uninstalls and reinstalls the agent, whenever is run so there should be no problem on seeing the autoregistering alert several times each time the script is run.
I installed the agent in 70 servers, and after 1 month of having no problems at all, today a coworker logged in into a server to run a
HTML Code:
apt update
reboot
He did it in another server and the same happened, and in both servers, there were no changes at all in the host configuration itself
After reading https://www.zabbix.com/documentation...o_registration
Where is stated that:
An auto-registration attempt happens every time an active agent sends a request to refresh active checks to the server. The delay between requests is specified in the RefreshActiveChecks parameter of the agent. The first request is sent immediately after the agent is restarted.
I'm trying to troubleshoot this but, it seems that it cant be easily replicated, right I only know that it's time-dependent and can happen in 1 month or 4 months, (leaving the action steps out of being an option), so I'm wondering of whats the cause...
As far as I can see there are 3 possible scenarios triggering this alert.
1.- Whenever there's a change in the item list (on the Zabbix server)
2.- Whenever the Zabbix agent is updated (apt upgrade)
3.- Whenever the server/hardware reboots
Whatever the case ends up being after I begin testing, I wanted to ask here beforehand:
Is there any way to limit this alert to only ONCE (when it's installed via script), instead of seeing it at random whenever any of the 3 scenarios happen?

Comment