ServerBee

Ping Monitoring

Monitor endpoint availability and latency with ICMP, TCP, and HTTP probes.

ServerBee includes built-in ping monitoring that lets you track the availability and latency of external endpoints from the perspective of your monitored servers. This is useful for verifying network connectivity, measuring latency between regions, and detecting outages.

Probe Types

Three types of probes are available:

TypeDescriptionTarget Format
ICMPStandard ping (ICMP echo request/reply)IP address or hostname (e.g., 8.8.8.8, google.com)
TCPTCP connection test (SYN-ACK handshake)Host and port (e.g., google.com:443)
HTTPHTTP(S) request and response timeFull URL (e.g., https://example.com/health)

Each probe type measures round-trip latency and reports success/failure status.

Creating Ping Tasks

Ping tasks are created through the dashboard or API. Each task requires:

  • Name -- A descriptive label for the task
  • Probe type -- icmp, tcp, or http
  • Target -- The endpoint to probe (format depends on probe type)
  • Interval -- How often to run the probe, in seconds
  • Server IDs -- Which agents should run this probe (as a JSON array of server IDs)
  • Enabled -- Whether the task is active

Example: ICMP Ping

Monitor basic connectivity to Google DNS:

FieldValue
NameGoogle DNS
Probe Typeicmp
Target8.8.8.8
Interval60

Example: TCP Port Check

Verify that a database port is reachable:

FieldValue
NamePostgreSQL Primary
Probe Typetcp
Targetdb.internal:5432
Interval30

Example: HTTP Health Check

Monitor a web service endpoint:

FieldValue
NameAPI Health
Probe Typehttp
Targethttps://api.example.com/health
Interval60

How Tasks Are Distributed

When you create or update a ping task, the server syncs it to the appropriate agents:

  1. The server stores the task configuration in the database
  2. A PingTasksSync message is sent to each assigned agent containing all their active tasks
  3. Each agent starts (or updates) its local probe scheduler
  4. Probe results are sent back to the server as PingResult messages

If an agent disconnects and reconnects, the server automatically re-syncs all assigned ping tasks.

UI Feedback

In the web dashboard, ping task create/delete/enable/disable actions show localized success and error toasts in the current language. While an enable/disable request is in flight, the toggle button is temporarily disabled to reduce accidental double submissions.

Assigning Tasks to Servers

The server_ids_json field controls which agents execute the probe:

  • Specific servers -- Provide an array of server IDs: ["srv-1", "srv-2"]
  • All servers -- Use an empty array [] or the special value ["*"] to assign to all connected agents

This lets you measure latency from multiple geographic locations simultaneously and compare results.

Viewing Results

Ping results are stored in the database with the following data:

FieldDescription
task_idThe ping task that generated this result
server_idThe agent that ran the probe
latencyRound-trip time in milliseconds
successWhether the probe succeeded
errorError message if the probe failed
timeTimestamp of the measurement

Results can be viewed in the dashboard as:

  • Latency charts showing trends over time
  • Success rate percentages
  • Per-agent breakdown when multiple servers probe the same target

Data Retention

Ping records are retained for 7 days by default. This is configurable via the retention.ping_records_days setting in server.toml:

[retention]
ping_records_days = 14

The cleanup task runs hourly and removes records older than the configured retention period.

Integration with Alerts

You can combine ping monitoring with alert rules. For example, to alert when a critical endpoint becomes unreachable, you could create an alert rule that watches for failed ping probes. The ping data is stored alongside regular monitoring data, making it available for the same alerting infrastructure.

On this page