I'm in the testing phase trying to automate my agent installs,
First I install the Zabbix agent manually
then i run my script with
The Zabbix server already auto-registers on the front end using the port 10051, however,
I'm really confused since I'm not really sure my agent is running in active mode due to me not being able to find the word "active" anywhere in the front end, I'm running this and Seems to work fine but I really do not know if it's actually working in active mode or not
from the agent log, I can see this
From what I have read, by using the port 10051 is already running on the active mode, but i would like to know if theres any way to make sure it is running as an active agent
First I install the Zabbix agent manually
Code:
apt-get update apt-get install zabbix-agent
Code:
#! /bin/bash
if [[ $EUID -ne 0 ]]; then
echo "MUst run as root" 1>&2
exit 1
else
echo PidFile=/var/run/zabbix/zabbix_agentd.pid > /etc/zabbix/zabbix_agentd.conf
echo LogFile=/var/log/zabbix-agent/zabbix-agentd.log >> /etc/zabbix/zabbix_agentd.conf
echo LogFileSize=0 >> /etc/zabbix/zabbix_agentd.conf
echo Server=SERVERIP >> /etc/zabbix/zabbix_agentd.conf
echo ServerActive=SERVERIP >> /etc/zabbix/zabbix_agentd.conf
echo ListenPort=10051 >> /etc/zabbix/zabbix_agentd.conf
echo UserParameter=release, uname -sr >> /etc/zabbix/zabbix_agentd.conf
echo HostnameItem=$HOSTNAME >> /etc/zabbix/zabbix_agentd.conf
echo HostMetadataItem=release >> /etc/zabbix/zabbix_agentd.conf
echo Include=/etc/zabbix/zabbix_agentd.conf.d/ >> /etc/zabbix/zabbix_agentd.conf
/etc/init.d/zabbix-agent restart
fi
I'm really confused since I'm not really sure my agent is running in active mode due to me not being able to find the word "active" anywhere in the front end, I'm running this and Seems to work fine but I really do not know if it's actually working in active mode or not
from the agent log, I can see this
Code:
root@p4-zabbix-agent:~# tail -f /var/log/zabbix-agent/zabbix-agentd.log 7650:20190705:185605.256 IPv6 support: YES 7650:20190705:185605.256 TLS support: YES 7650:20190705:185605.256 ************************** 7650:20190705:185605.256 using configuration file: /etc/zabbix/zabbix_agentd.conf 7650:20190705:185605.256 agent #0 started [main process] 7665:20190705:185605.258 agent #3 started[listener #2] 7664:20190705:185605.258 agent #2 started[listener #1] 7666:20190705:185605.258 agent #4 started[listener #3] 7667:20190705:185605.258 agent #5 started [active checks #1] 7663:20190705:185605.266 agent #1 started [collector]