Windows OS Hub
  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux
  • Home
  • About

Windows OS Hub

  • Windows
    • Windows 11
    • Windows Server 2022
    • Windows 10
    • Windows Server 2019
    • Windows Server 2016
  • Microsoft
    • Active Directory (AD DS)
    • Group Policies (GPOs)
    • Exchange Server
    • Azure and Microsoft 365
    • Microsoft Office
  • Virtualization
    • VMware
    • Hyper-V
  • PowerShell
  • Linux

 Windows OS Hub / Linux / Zabbix – Simple ICMP Ping Checks

March 11, 2024

Zabbix – Simple ICMP Ping Checks

In this article we’ll show how to configure ICMP-based network device monitoring using ping in Zabbix. It is the easiest and the most popular task of agentless monitoring, when you want to check the availability of a remote server, website or network device from your monitoring server. Zabbix can send ICMP requests to the host, and if no answer is received, the response time is too long or a large percentage of packets are lost, it displays a warning on the dashboard. The ICMP protocol is mostly used to check the availability of network hosts. Ping and traceroute/tracert tools also work over ICMP protocol.

First of all, you must configure a firewall on the hosts you are going to monitor (allow icmp ping requests) and make sure that fping is installed and configured on your Zabbix server.

How to Open Ports for ICMP Ping on Windows Server and Linux?

By default, ICMP ping is allowed on Windows Server, but if is has been disabled on any reason, you can enable it using netsh or PowerShell. Run the command prompt as administrator and enter the following:

netsh advfirewall firewall add rule name="ICMP Allow“ protocol=icmpv4:8,any dir=in action=allow

Here is the same PowerShell command (built-in NetSecurity module is used):

Set-NetFirewallRule -Name FPS-ICMP-ERQ-In -Enabled True -Profile Any -Action Allow

The commands will create a firewall rule allowing inbound ICMP echo requests.

Inbound ICMP traffic is also allowed in modern Linux distros. If it is disabled on any reason, add these rules to iptables. Run the following commands under root/sudo:

# iptables -I INPUT -p icmp --icmp-type echo-request -j ACCEPT
# iptables -I OUTPUT -p icmp --icmp-type echo-reply -j ACCEPT

Thus, you will add the rules allowing ICMP requests to the beginning of the iptables rule chain.

If you use firewalld to manage firewall rules, you can allow ICMP ping reply as follows:

# firewall-cmd --permanent --direct --add-rule ipv4 filter INPUT 0 -p icmp -s 0.0.0.0/0 -d 0.0.0.0/0 -j ACCEPT

How to Install Fping & Set Paths in Zabbix?

Fping is used in Zabbix to perform ICMP checks. In most Linux distros, the utility is preinstalled, so make sure that it exists in the operating system first. Go to your Zabbix server and run this command:

fping -v

If there is no such tool, install it using a package manager:

  • In Ubuntu: apt install fping
  • In CentOS, you will have to connect EPEL repository first and then install the tool: yum install fping

By default, the tool is installed in /usr/bin/fping. If there are any problems with fping, make sure that it is located in /usr/bin/fping. If it is in another directory, change the following lines in zabbix_server.conf by specifying the correct path to fping.

FpingLocation=/usr/bin/fping
Fping6Location=/usr/bin/fping6

ICMP Ping Template in Zabbix

By default, there is the Template Module ICMP Ping in Zabbix. (It may have a different name depending on a Zabbix version.) We will use it to monitor network hosts using ICMP ping. The template includes 3 checks:

  • ICMP ping – node availability over ICMP;
  • ICMP loss – percentage of lost packets;
  • ICMP response time – ICMP ping response time in milliseconds.

icmp checks in zabbix

Look at the Key column: icmpping, icmppngloss and icmppingse, these are built-in keys in Zabbix. They are Simple checks, it means that the Zabbix Agent is not used to perform them.

View the full list of Simple checks that don’t require Zabbix Agent installation: https://www.zabbix.com/documentation/current/manual/config/items/itemtypes/simple_checks

The template contains 3 triggers that track the keys described above and their values.

zabix icmp triggers with severity

Some triggers, like High ICMP ping response time, use the template macros. You can change macro values in the Macros tab.

The values that will activate a trigger:

  • The package loss percentage of ICMP Ping Loss ($ICMP_LOSS_WARN) for the last 5 minutes is more than 20.
  • The Response Time value ($ICMP_RESPONSE_TIME_WARN) is over 150 milliseconds for the last 5 minutes.

template icmp ping macros on zabbix

Create Host in Zabbix and Connect the ICMP Ping Template

In this article I will configure monitoring of a host running Windows Server. Let’s add this host to zabbix. Go to Configuration -> Hosts -> Create Host.

Enter a host name, select a group and enter an IP address of your host in Agent interfaces.

adding new agentless host to zabbix

Note. Zabbix groups help to sort hosts. A group name does not affect monitoring.

Open the Templates tab, click Select and choose Template Module ICMP Ping.

link a template module icmp ping to zabbix host

Click Add in the template selection form and Add to finish host creation.

zabbix link new templates

All templates connected to the host are displayed in the Templates column.

zabbix host with linked templates

Then check how the monitoring works. Go to Monitoring -> Latest data, click Select next to Hosts and select the host you have just created.

The latest data received from the host are displayed in the Last Value column.

Also, you can view a graph for a specific value, like the ICMP Response time. Click Graph.

zabbix icmp availability graph

In case of any problems, you will see a notification on Zabbix dashboard.

zabbix ismp alert on dashboard

ICMP ping is the easiest basic check of your network device availability. If you want to get more data about your device, you can configure device monitoring using Zabbix Agent, SNMP or other protocols.

0 comment
1
Facebook Twitter Google + Pinterest
LinuxWindows Server 2016
previous post
Using TSADMIN.msc and TSCONFIG.msc Snap-Ins on Windows Server RDS Hosts
next post
Fixing “Winload.efi is Missing or Contains Errors” in Windows 10

Related Reading

Ubuntu/Mint/Kali Boots to Initramfs Prompt in BusyBox

March 11, 2024

How to Check Disk Performance (IOPS and Latency)...

March 11, 2024

Install and Configure SNMP on RHEL/CentOS/Fedor

March 13, 2024

How to Configure MariaDB Master-Master/Slave Replication

March 11, 2024

KVM: How to Expand or Shrink a Virtual...

March 11, 2024

Compress, Defrag and Optimize MariaDB/MySQL Database

March 11, 2024

How to Install and Use ClamAV Antivirus on...

March 13, 2024

How to Disable Microsoft Teams Auto Startup

March 12, 2024

Leave a Comment Cancel Reply

join us telegram channel https://t.me/woshub
Join WindowsHub Telegram channel to get the latest updates!

Recent Posts

  • Map a Network Drive over SSH (SSHFS) in Windows

    May 13, 2025
  • Configure NTP Time Source for Active Directory Domain

    May 6, 2025
  • Cannot Install Network Adapter Drivers on Windows Server

    April 29, 2025
  • Change BIOS from Legacy to UEFI without Reinstalling Windows

    April 21, 2025
  • How to Prefer IPv4 over IPv6 in Windows Networks

    April 9, 2025
  • Load Drivers from WinPE or Recovery CMD

    March 26, 2025
  • How to Block Common (Weak) Passwords in Active Directory

    March 25, 2025
  • Fix: The referenced assembly could not be found error (0x80073701) on Windows

    March 17, 2025
  • Exclude a Specific User or Computer from Group Policy

    March 12, 2025
  • AD Domain Join: Computer Account Re-use Blocked

    March 11, 2025

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • Installing an Open Source KMS Server (Vlmcsd) on Linux
  • How to Access VMFS Datastore from Linux, Windows, or ESXi
  • How to Configure MariaDB Master-Master/Slave Replication
  • Using iPerf to Test Network Speed and Bandwidth
  • Moving WSL to Another Drive in Windows
  • KVM: How to Expand or Shrink a Virtual Machine Disk Size?
  • Ubuntu/Mint/Kali Boots to Initramfs Prompt in BusyBox
Footer Logo

@2014 - 2024 - Windows OS Hub. All about operating systems for sysadmins


Back To Top