Setup zabbix-agent22 » Historie » Version 3
Jeremias Keihsler, 15.07.2017 16:21
| 1 | 1 | Jeremias Keihsler | h1. Install Zabbix Agent 2.2.x |
|---|---|---|---|
| 2 | |||
| 3 | h2. Preliminary note |
||
| 4 | |||
| 5 | also check back on zabbix-wiki http://www.zabbix.com/wiki/howto/monitor/os/linux/agentinstallonlinux (this is still for CentOS 5.x but may be of help) |
||
| 6 | |||
| 7 | h2. Requirements |
||
| 8 | |||
| 9 | * [[repo_epel|EPEL]] |
||
| 10 | |||
| 11 | h2. Agent-Install |
||
| 12 | |||
| 13 | <pre><code class="bash"> |
||
| 14 | yum update |
||
| 15 | yum --enablerepo=epel install zabbix22-agent |
||
| 16 | </code></pre> |
||
| 17 | <pre><code class="bash"> |
||
| 18 | vim /etc/zabbix/zabbix_agentd.conf |
||
| 19 | </code></pre> |
||
| 20 | <pre> |
||
| 21 | # line 82: change to your Zabbix-server |
||
| 22 | Server=192.168.56.1 |
||
| 23 | |||
| 24 | # line 105: change to your hostname |
||
| 25 | Hostname=application.server.example.com |
||
| 26 | </pre> |
||
| 27 | |||
| 28 | <pre><code class="bash"> |
||
| 29 | vim /etc/zabbix/zabbix_agent.conf |
||
| 30 | </code></pre> |
||
| 31 | <pre> |
||
| 32 | # line 13: change to your Zabbix-server |
||
| 33 | Server=192.168.56.1 |
||
| 34 | </pre> |
||
| 35 | <pre><code class="bash"> |
||
| 36 | systemctl start zabbix-agent |
||
| 37 | systemctl enable zabbix-agent |
||
| 38 | </code></pre> |
||
| 39 | |||
| 40 | h3. Firewall |
||
| 41 | |||
| 42 | you have to open port @10050 tcp@ |
||
| 43 | 2 | Jeremias Keihsler | |
| 44 | <pre><code class="bash"> |
||
| 45 | firewall-cmd --permanent --add-port=10050/tcp --zone=public |
||
| 46 | firewall-cmd --reload |
||
| 47 | </code></pre> |
||
| 48 | 3 | Jeremias Keihsler | |
| 49 | h3. Troubleshoot |
||
| 50 | |||
| 51 | The agent failed to start ... see status |
||
| 52 | see also https://www.zabbix.com/forum/showthread.php?t=46796 |
||
| 53 | |||
| 54 | tried to set PID to @PIDFile=/tmp/zabbix_agentd.pid@ |
||
| 55 | </code></pre> |
||
| 56 | <pre> |
||
| 57 | vim /etc/zabbix/agentd.conf |
||
| 58 | vim /usr/lib/systemd/system/zabbix-agent.service |
||
| 59 | </pre> |
||
| 60 | <pre><code class="bash"> |
||
| 61 | |||
| 62 | </code></pre> |
||
| 63 | <pre> |
||
| 64 | systemctl daemon-reload |
||
| 65 | systemctl start zabbix-agent |
||
| 66 | </pre> |
||
| 67 | <pre><code class="bash"> |
||
| 68 | didn't work either. |
||
| 69 | |||
| 70 | double checked that @/run/zabbix/@ was existing and had right owner/rights |
||
| 71 | everything seemed to be ok. |
||
| 72 | |||
| 73 | After another restart and reset the PID back to @PIDFile=/run/zabbix/zabbix-agentd.pid@ and another daemon-reload everything worked out ok. |