Fping for Zabbix automatic discovery, fping for Zabbix
Originally published in cu:
The Zabbix automatic Discovery function is relatively simple in the configuration process: Discovery and Action.
The automatic detection function does not take effect when the "ICMP ping" check method is used for automatic discovery and verification of Zabbix.
I. Environment 1. zabbix Environment
Zabbix: zabbix-3.0.1server/agent
2. Configure the Discovery Environment
Check: ICMP ping on the local network 172.19.200.1-254, as shown below:
Action
In ICMP ping mode, the UP host is added to the "Discovery hosts" group, as follows:
Ii. Automatic Failure Detection 1. symptom
If the automatic discovery and action processes are correctly configured, wait for 10 minutes and the automatic discovery function does not take effect.
2. Fault Locating
# A "/usr/sbin/fping file not found" information record is found. [Root @ localhost ~] # Vim/tmp/zabbix_server.log1412: 20160621: 110040.593/usr/sbin/fping: [2] No such file or directory
3. Fault Analysis
Check Method of "ICMP ping". check the status using the/usr/sbin/fping command. if the system is not installed or the fping Command Execution path is incorrect, the check method cannot detect the device, the automatic detection function is invalid.
3. install and configure fping 1. Install fping
# Fping can ping multiple targets at the same time with multiple statistical output formats; # currently, fping can only be installed by compiling [root @ localhost ~] # Cd/usr/local/src [root @ localhost src] # wget unzip src] # tar-zxvf fping-3.13.tar.gz [root @ localhost src] # cd fping-3.13 [root @ localhost fping-3.13] #. /configure [root @ localhost fping-3.13] # make & make install
2. Configure the fping execution path
# The default fping execution path in the zabbix_server configuration file is commented out. The default path is/usr/sbin/fping # You can configure the fping execution path as follows: [root @ localhost ~] # Sed-I's | # FpingLocation =/usr/sbin/fping | FpingLocation =/usr/local/sbin/fping | G'/usr/local/zabbix/etc/zabbix_server.conf # Or do not modify the zabbix_server.conf file, use soft connection ln-s/usr/local/sbin/fping/usr/sbin/fping
3. Configure fping Permissions
# Fping must be executed by the root user. If fping is executed by a non-root account, the following alarm message is displayed when you view the zabbix_server log: #21822: 20160621: 151232.024 fping failed: (null ): can't create socket (must run as root ?) : Permission denied # If the fping is installed by the root account, you do not need to modify the owner; # However, zabbix_server uses the zabbix account to call the command. You can set the SUID Permission for fping, as shown below: [root @ localhost ~] # Chown root: root/usr/local/sbin/fping [root @ localhost ~] # Chmod u + s/usr/local/sbin/fping
Iv. Verification 1. Verify Discovery
Monitoring --> Discovery rule, select "Local network" (name when the discovery is created), as follows:
2. Verify Action
Configuration --> Hosts --> Group, select the "Discovery hosts" Group, as shown below: