User Tools

Site Tools


networking:monitoring:zabbix_host

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
networking:monitoring:zabbix_host [2015/08/27 17:48]
jcooper
networking:monitoring:zabbix_host [2015/12/29 11:30] (current)
gcooper
Line 1: Line 1:
 ====== Zabbix NMS Host ====== ====== Zabbix NMS Host ======
 +
 +See also **[[networking:monitoring:zabbix]]**
  
 **Home**: http://www.zabbix.com/ **Home**: http://www.zabbix.com/
Line 14: Line 16:
  
 **HowTo - Agent**: http://tecadmin.net/install-zabbix-agent-on-centos-rhel/ **HowTo - Agent**: http://tecadmin.net/install-zabbix-agent-on-centos-rhel/
- 
-See also **[[networking:monitoring:zabbix]]** 
  
 ===== Add a Host to Monitor ===== ===== Add a Host to Monitor =====
Line 29: Line 29:
 Use Case: You have a monitored device on a circuit that is having issues.  Rather than have constant alerts due to packet loss etc. modify the alert to minimize the churning until the circuit can be stabilized then return to the stock template. Use Case: You have a monitored device on a circuit that is having issues.  Rather than have constant alerts due to packet loss etc. modify the alert to minimize the churning until the circuit can be stabilized then return to the stock template.
  
-  * Clone the template with the problem alert.  Use "Full Clone" to take advantage of the previous configuration.+  * Clone the template with the problem alert.  Use "Full Clone" to take advantage of the previous configuration.  Rename appropriately to appear next to original in template list. 
 +  * Remove original template and attach new cloned template.
  
-https://www.zabbix.com/documentation/2.4/manual/config/templates/template+Clone Template
  
-  * Clone the problem alert +  - Configuration -> Templates 
 +  - Click on Template with problem Trigger 
 +  - Click ''Full Clone'' 
 +  - Append text to name to be descriptive and list next to original
  
 +Remove Template and replace with clone
  
-==== Trigger Dependencies ====+  - Configuration -> Hosts -> Templates 
 +  - Click ''Unlink'' 
 +  - Type the name of the new clone template in the ''Link new templates'' field and click the template 
 +  - Click ''Add'' 
 +  - Click ''Update''
  
-https://www.zabbix.com/documentation/2.4/manual/config/triggers/dependencies+https://www.zabbix.com/documentation/2.4/manual/config/templates/template
  
-Sometimes the availability of one host depends on another. A server that is behind some router will become unreachable if the router goes down. With triggers configured for both, you might get notifications about two hosts down - while only the router was the guilty party. +Create/Clone the problem alert in the cloned template then modify for appropriate level
  
-=== Server ===+:!: IE: Circuit is flaky, you know it and fix is down the road.  "Response time is too high" alert is set to trigger if over 200ms for 10 minutes and triggers several times a day.  Modify for 400ms and then when an alerts is sent there could be something to investigate.
  
-<file+  - Configuration -Host -> Triggers (on problem host)  
-vim /etc/sysconfig/iptables+  - Disable "Problem Trigger" -> Click Problem Trigger Click ''Clone''  
 +  - Rename Problem Trigger -> Edit expression and Description Click ''Add''  
 +  - Enable new Trigger
  
--A INPUT -p udp -m udp --dport 162 -j ACCEPT 
--A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT 
--A INPUT -m state --state NEW -m tcp -p tcp --dport 10051 -j ACCEPT 
-</file> 
  
-=== Agent === 
  
-<file> +==== Trigger Dependencies ====
-vim /etc/sysconfig/iptables+
  
--A INPUT -m state --state NEW -m tcp -p tcp --dport 10050 -j ACCEPT +https://www.zabbix.com/documentation/2.4/manual/config/triggers/dependencies
-</file>+
  
-<file> +Sometimes the availability of one host depends on anotherserver that is behind some router will become unreachable if the router goes downWith triggers configured for both, you might get notifications about two hosts down while only the router was the guilty party
-service iptables restart +
-</file> +
- +
-==== CSF Firewall ==== +
- +
-=== Zabbix Server === +
- +
-=== Zabbix Agent === +
- +
-== csf.allow == +
- +
-<file> +
-tcp|in|d=10050|s=10.10.1.100   # From Zabbix Server +
-tcp|out|d=10051|d=10.10.1.100  # To Zabbix Server +
-</file> +
- +
-===== Agents ===== +
- +
-<note important>For normal communications (not 'active'), you must forward port 10050 on the remote NAT firewall device to the monitored host.</note> +
- +
-<note tip>If you have multiple monitored hosts behind a remote NAT firewall, you must use Active mode on the agent or (on the remote NAT firewall device) forward additional ports (10051, etc.) in to port 10050 of the additional monitored hosts and adjust the ports defined for the additional monitored hosts in the Zabbix web interface.</note> +
- +
-==== Active Agents ==== +
- +
-https://support.opennodecloud.com/wiki/doku.php?id=usrdoc:os:zabbix +
- +
-  * Active agents initiate all communications to server +
-  * No port forwarding required at client +
-  * Multiple monitored hosts behind remote NAT firewall +
-  * Lower resource utilization on server +
-  * Modify the host on server +
-    * IP address must be set to ''0.0.0.0'' +
-    * All ''Items'' must be configured as ''Zabbix Agent (active)'' +
-      * Generally by cloning templates +
-        * See link above +
-  * The configuration file is slightly different +
-    * Set ''ServerActive'' to the IP address of the Zabbix server +
- +
-==== Install Agents ==== +
- +
-:!: Install the ''zabbix-agent'' on the Zabbix server as well. +
- +
-<note important>Modify the firewall to allow incoming ''tcp/10050'' and edit the agent configuration file before starting the service.</note> +
- +
-Modify the agent configuration file: +
- +
-<file> +
-vim /etc/zabbix/zabbix_agentd.conf +
- +
-Server=<Zabbix Server IP> +
-#ServerActive=127.0.0.1 +
-Hostname=<Monitored Host ID> +
-</file> +
- +
-Configure the agent to auto-startstart the service and check the firewall: +
- +
-<file> +
-chkconfig zabbix-agent on +
-service zabbix-agent start +
- +
-ps ax|grep zabbix +
-netstat -tapn|grep 1005 +
-iptables -nL |grep 1005 +
-</file> +
- +
-=== Windows === +
- +
-http://tecadmin.net/install-zabbix-agent-windows-system/ +
- +
-http://www.zabbix.com/downloads/2.4.4/zabbix_agents_2.4.4.win.zip +
- +
-Download and extract the Windows agent to ''C:\Support''+
- +
-:!: You can use ''Wordpad'' as the editor, but turn word-wrap off.  Use ''Notepad'' thereafter. +
- +
-Edit ''C:\Support\zabbix_agents_2.4.4.win\conf\zabbix_agentd.win.conf'': +
- +
-<file> +
-Server=<Zabbix Server IP> +
-#ServerActive=127.0.0.1 +
-Hostname=<exact-Zabbix-host-name> +
-</file> +
- +
-In an administrative (elevated) command prompt (not PowerShell): +
- +
-<file> +
-cd C:\Support\zabbix_agents_2.4.4.win\bin\win64 +
-.\zabbix_agentd.exe --config C:\support\zabbix_agents_2.4.4.win\conf\zabbix_agentd.win.conf --install +
-net start "Zabbix Agent" +
-sc config "Zabbix Agent" start= auto +
-netsh advfirewall firewall add rule name="Zabbix Agent" dir=in action=allow protocol=TCP localport=10050 +
-</file> +
- +
-=== Ubuntu === +
- +
-http://tecadmin.net/install-zabbix-agent-on-ubuntu-and-debian/ +
- +
-=== CentOS === +
- +
-http://tecadmin.net/install-zabbix-agent-on-centos-rhel/ +
- +
-== CentOS 5 x86 == +
- +
-<file> +
-rpm -Uvh http://repo.zabbix.com/zabbix/2.4/rhel/5/i386/zabbix-release-2.4-1.el5.noarch.rpm +
-yum install zabbix zabbix-agent +
-</file> +
- +
-== CentOS 6 x64 == +
- +
-<file> +
-rpm -Uvh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm +
-yum install zabbix zabbix-agent +
-</file> +
- +
-:!: Modify the firewall, edit the config file then start the agent service. +
- +
-=== SME Server === +
- +
-== SME 9 x64 (CentOS 6 Base) == +
- +
-<file> +
-config set zabbix-agent service TCPPort 10050 access public status enabled +
-signal-event remoteaccess-update +
- +
-rpm -Uvh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm +
-mv /etc/yum.repos.d/zabbix.repo /etc/yum.smerepos.d/ +
- +
-yum install zabbix zabbix-agent +
- +
-chkconfig zabbix-agent on +
- +
-/etc/init.d/zabbix-agent start +
-</file> +
- +
-<note important>If you have problems getting the agent to auto-start after a reboot, a quick way to fix is to add a line to ''rc.local''.</note> +
- +
-<file> +
-vim /etc/rc.local +
- +
-/etc/rc4.d/S86zabbix-agent start +
-</file> +
- +
-== SME 8 x64 (CentOS 5 Base) == +
- +
-<file> +
-config set zabbix-agent service TCPPort 10050 access public status enabled +
-signal-event remoteaccess-update +
- +
-rpm -Uvh http://repo.zabbix.com/zabbix/2.4/rhel/5/x86_64/zabbix-release-2.4-1.el5.noarch.rpm +
-mv /etc/yum.repos.d/zabbix.repo /etc/yum.smerepos.d/ +
- +
-yum install zabbix zabbix-agent +
- +
-chkconfig zabbix-agent on +
-ln -s /etc/rc.d/init.d/zabbix-agent /etc/rc7.d/S87zabbix-agent +
- +
-service zabbix-agent start +
-</file> +
- +
-===== Add a Host to Monitor ===== +
- +
-http://tecadmin.net/add-host-zabbix-server-monitor/ +
- +
-https://www.zabbix.com/documentation/2.4/manual/config/hosts/host +
- +
-==== SNMP ==== +
- +
-http://www.zabbix.org/wiki/Start_with_SNMP_traps_in_Zabbix +
- +
-  * Listening port is usually 161/UDP +
-  * Use SNMP version ''2c'' if possible +
-    * Will show more info +
-  * ''Template SNMP Device'' will often suffice +
-  * Set the community string per host +
-    * Like a password +
-    * Defined with macro ''{$SNMP_COMMUNITY}'' +
- +
-=== Test Access === +
- +
-:!: ''2c'' is SNMP version. +
- +
-<file> +
-snmpwalk -v 2c -c <community> <remoteIP>+
-</file> +
- +
-=== Add Host === +
- +
-:!: Set the SNMP community string (like a password) for each host by adding a **macro** ''{$SNMP_COMMUNITY}'' with the value being the community string for the host to be monitored. +
- +
-{{ ::zabbix_snmp_host.png?750 |Add SNMP Host}} +
- +
-===== Troubleshooting ===== +
- +
-This test should connect, then close when you hit <enter>: +
- +
-<file> +
-telnet <IP of agent> 10050 +
-</file>+
  
-===== Zimbra ===== 
  
-https://github.com/YetOpen/zabbix-scripts/tree/master/zabbix-zimbra 
networking/monitoring/zabbix_host.1440719330.txt.gz · Last modified: 2015/08/27 17:48 by jcooper