software:zabbix:client_install
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | software:zabbix:client_install [2023/12/13 07:41] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== Zabbix Client Install ====== | ||
| + | |||
| + | Zabbix agent is in many Linux and Unix repositories, | ||
| + | |||
| + | As such, I tend to download and install from the Linux repositories maintained by Zabbix. Instructions and downloads are located at | ||
| + | https:// | ||
| + | |||
| + | Precompiled agents for Windows/ | ||
| + | |||
| + | The installation process is fairly straight forward; install the software and edit the config. The zabbix agent configuration file that comes with the installation is very large, but that is mainly because they include most of the default values as comments. I generally rename this file for a reference, then create a new file with values which are necessary. | ||
| + | |||
| + | Actually, there is only one value that is required, and that is the IP address of the Zabbix Server which will be communicating with this machine: | ||
| + | |||
| + | <code conf> | ||
| + | Server=ip.address.of.server | ||
| + | </ | ||
| + | |||
| + | A much better configuration would be to explicitly define the hostname, as this is the name which the server matches on. For example, if your config file has the line | ||
| + | <code conf> | ||
| + | your Zabbix server will use // | ||
| + | |||
| + | ===== Linux ===== | ||
| + | |||
| + | On Debian based machines, I also include the pid and log file locations, and an Include directive. The following config is the minimum I use on these. | ||
| + | <code conf> | ||
| + | PidFile=/ | ||
| + | LogFile=/ | ||
| + | LogFileSize=0 | ||
| + | Server=ip.of.zabbix.server | ||
| + | Hostname=Name of Host | ||
| + | Include=/ | ||
| + | </ | ||
| + | |||
| + | Following is a quick script that will generate a config file. It first saves the current config (if it is not already saved), then creates it. You define the Zabbix Server IP address in line 4. | ||
| + | <code bash configZabbix> | ||
| + | #! / | ||
| + | |||
| + | # you must change this to the IP of your current Zabbix server | ||
| + | ZABBIXSERVER=ip.of.zabbix.server | ||
| + | |||
| + | # if we have not already saved the agent conf, then do so | ||
| + | if [ ! -f / | ||
| + | # write the new configuration | ||
| + | # These first two lines are Debian specific | ||
| + | echo ' | ||
| + | echo ' | ||
| + | echo ' | ||
| + | # allow traffic from ZABBIXSERVER | ||
| + | echo ' | ||
| + | # grab our hostname and specifically use it | ||
| + | echo Hostname=`hostname -f` >> / | ||
| + | # include anything in the includes directory | ||
| + | echo ' | ||
| + | # restart agent | ||
| + | service zabbix-agent restart | ||
| + | </ | ||
| + | |||
| + | Note: I have never used Active Checks (though they sound pretty cool), so I always set that IP to null (the default). | ||
| + | |||
| + | ===== Windows ===== | ||
| + | |||
| + | For Windows machines, grab the zip file from https:// | ||
| + | https:// | ||
| + | |||
| + | - Unzip the downloaded archive | ||
| + | - Create c:\zabbix | ||
| + | - Move the zabbix agent binary (zabbix_agentd.exe) and config file (zabbix_agentd.conf) into c:\zabbix | ||
| + | - Edit zabbix_agentd.conf, | ||
| + | - Open an elevated command shell (cmd with Administrative privileges) and run the command < | ||
| + | - Open service manager and start the Zabbix Agent | ||
| + | - Open your firewall and allow port 10050 through from the Zabbix Server | ||
| + | |||
| + | NOTE: There is a cool script at https:// | ||
| + | |||
software/zabbix/client_install.txt · Last modified: by 127.0.0.1
