Ping uses ICMP, defined in RFC 792 for IPv4 and RFC 4443 for IPv6, not TCP or HTTP, so it tests only the network path and the host’s network stack. A server can answer ping while its web server or database is down.
Many firewalls and cloud providers block ICMP by default, so a host that doesn’t answer ping isn’t necessarily down. Check that the target is meant to answer before you monitor it this way.
Ping suits routers, VPN endpoints, network devices and hosts without an open port to check, and gives a baseline for latency.
Example
PING example.com: 3 packets transmitted, 3 received, 0% packet loss
round-trip min/avg/max = 11.2/11.8/12.6 ms