Hi experts, i have my servers list in csv file, i have downloaded zabbix agent for windows, instead of manually installing on each server, is there any ways through script i can install on many servers simultaneously. currently i am installing manually on each server.
Ad Widget
Collapse
install zabbix agent
Collapse
X
-
Tags: None
-
I don't have a complete answer but one thing I have been doing is put the agent and config files, and any associated scripts (I have some powershell) in a windows AD share, e.g. \\domain\netlogon\zabbix
This then auto-magically propagates updated code to each server (assuming they are AD members), and you only need to install the service. So my manual install looks like this (once I put things on the share and let it replicate:
mkdir c:\zabbix
\\domain\netlogon\zabbix\zabbix_agentd --install --config "\\domain\netlogon\zabbix\zabbix_agentd.conf"
\\domain\netlogon\zabbix\zabbix_agentd --start
(Can't recall if the install starts also).
The config file points the log to the c:\zabbix folder; you could use some other place of course, but the log shouldn't go on the \netlogon share.
I also found on windows 2016 I needed a privileged domain account to get zabbix to run, i.e. not the default local system account. I never tracked down why, it's on my list, but there's a definite change in privilege required for windows 2016 servers that may hit you. I couldn't get the service to start otherwise.
The ideal part of this is that changes to agent config files can be made in one place, and they propagate directly and take effect next agent restart (Not sure if there's a command to hurry that up, I seem to remember there is).
-
Hi experts will the below script help me
echo off
echo Starting Zabbix agent installation and configuration script
:CheckOS
echo Detecting OS processor type
IF EXIST "%PROGRAMFILES(X86)%" (GOTO 64BIT) ELSE (GOTO 32BIT)
:64BIT
echo 64-bit system detected
net use y: "\\HOSTNAME\Zabbix$\64bit_Agent_208"
xcopy y:\ "C:\Program Files\Zabbix" /y
net use /delete /y y:
GOTO CONFIG_AGENT
:32BIT
echo 32-bit system detected
net use y: "\\HOSTNAME\Zabbix$\32bit_Agent_208"
xcopy y:\ "C:\Program Files\Zabbix" /y
net use /delete /y y:
GOTO CONFIG_AGENT
:CONFIG_AGENT
echo Configuring Zabbix agent
echo Server=ZABBIXSERVERIP > "C:\Program Files\Zabbix\zabbix_agentd.conf"
echo Hostname=%COMPUTERNAME% >> "C:\Program Files\Zabbix\zabbix_agentd.conf"
echo StartAgents=10 >> "C:\Program Files\Zabbix\zabbix_agentd.conf"
echo ServerActive=ZABBIXSERVERIP >> "C:\Program Files\Zabbix\zabbix_agentd.conf"
echo LogFile=C:\Program Files\Zabbix\zabbix_agentd.log >> "C:\Program Files\Zabbix\zabbix_agentd.conf"
echo Timeout=5 >> "C:\Program Files\Zabbix\zabbix_agentd.conf"
GOTO INSTALL_AGENT
:INSTALL_AGENT
echo Installing Zabbix agent service
cd c:\Program Files\Zabbix
zabbix_agentd.exe --config "C:\Program Files\Zabbix\zabbix_agentd.conf" --install
GOTO START_AGENT
:START_AGENT
echo Starting Zabbix agent
net start "Zabbix agent"
echo Starting Zabbix agent installation and configuration script - FINISHED
pauseComment
-
What did you do to setup this privileged domain account? I'm trying to do the same but keep running up to permission problems like this one.I also found on windows 2016 I needed a privileged domain account to get zabbix to run, i.e. not the default local system account. I never tracked down why, it's on my list, but there's a definite change in privilege required for windows 2016 servers that may hit you. I couldn't get the service to start otherwise.Comment
-
It always depends on our Desktops even if it's privilege or not. And to all of the installed apps that you're talking about.Comment
-
I did something you should probably not do - I used a Domain Admin account for the Active Directory domain. I did not take the time to find the minimum set of privileges required, which is what one should really do, but is tedious.
What did you do to setup this privileged domain account? I'm trying to do the same but keep running up to permission problems like this one.
Comment
Comment