Belajar Sendiri

Commands

curl -s

curl -s <host>:<port>/metrics

Risk: Safe

What it does

Reads a target's numbers as plain text, the same page Prometheus scrapes.

When to use it

To check that a target really shows the metric you expect.

Example

$ curl -s localhost:9100/metrics | grep 'node_load1 '

Node exporter's 1-minute load, with its help and type lines.

$ curl -s localhost:9090/metrics | grep '^# TYPE' | head

The first few metric types Prometheus shows about itself.