Blog

Put Your First Custom Metric on a WatchLog Dashboard

Send a test value without opening a terminal, then put a real workload metric on a WatchLog dashboard so it is available during an incident.

CPU can look normal while a queue gets longer. Put the number that answers your operational question on the dashboard you use to investigate it. In this example, that number is jobs waiting, not how much CPU the worker consumed.

Send a test value without a terminal

In WatchLog, open Your metrics → Add a source → Push a value. Create a send-only token and choose the workload or server the number belongs to. Save the token securely; it is shown once and cannot read metrics. Click Send a test value for me and look for the receipt for my_first_test_value. This uses one metric series while present, not another source. It checks the token and dashboard workflow, not whether your worker can reach the ingest endpoint.

Put the value on a dashboard

Choose Put it on a dashboard after receipt. A number shows the latest queue depth; a line chart tells you whether a spike cleared in minutes or the queue has been growing for an hour. Use a descriptive title and unit, such as Jobs waiting. Once you see the test value, remove it and create or point the widget at your real metric. The Shop business example puts queue depth beside orders and payment failures.

WatchLog’s Shop business dashboard showing Orders, Payment failures and Jobs waiting.
The Shop business dashboard in WatchLog.

Switch from a sample to a useful metric

Send queue_jobs_waiting from the script or worker that measures it. It is a gauge: if the queue falls from 12 to 3, send 3, not minus 9. Use the generated push command for the same workload or server. Check the first real value in WatchLog against the source queue count. Add bounded labels such as the queue name if useful; do not make a new series for every job or customer. Pin the real metric on the owning workload or server so it is available during an incident.

Separate display from alerting

Cloud Free supports one custom dashboard with up to eight widgets and allows pinning, but it does not alert on custom metrics. Self-hosted Community supports threshold and freshness conditions. Cloud Pro and licensed self-hosted plans also offer anomaly-based conditions. Before setting any threshold, check whether you need to detect a growing backlog, a backlog above a meaningful limit, or the absence of fresh queue measurements. Those are different conditions.

Open the WatchLog demo and choose sample-cluster → Your metrics → Shop business, or follow the official WatchLog metrics setup guide.

See your own servers in five minutes.

Free on WatchLog Cloud for 5 servers or nodes, or run it yourself, open source.