Is it possible to see all metrics (all paths) in whisper (graphite)?

1.8k Views Asked by At

I have a lot of metrics in Graphite and I have to search through them.

I tried to use whisper-fetch.py, but it returns the metric values (numbers), I want the metric names, something like that:

prefix1.prefix2.metricName1 prefix1.prefix2.metricName2 ...

Thank you.

2

There are 2 best solutions below

3
On BEST ANSWER

You can just use the unix find command, e.g. find /data/graphite -name 'some_pattern' or use the web api, e.g. curl http://my-graphite/metrics/find?query=somequery, see graphite metrics api

0
On

Graphite has a dedicated endpoint for retrieving all metrics as part of its HTTP API: /metrics/index.json

For example, running this command against my local Graphite

curl localhost:8080/metrics/index.json | jq "."

produces the following output:


[
  "carbon.agents.graphite-0-a.activeConnections",
  "carbon.agents.graphite-0-a.avgUpdateTime",
  "carbon.agents.graphite-0-a.blacklistMatches",
  "carbon.agents.graphite-0-a.cache.bulk_queries",
  "carbon.agents.graphite-0-a.cache.overflow",
  ...
  "stats_counts.response.200",
  "stats_counts.response.400",
  "stats_counts.response.404",
  "stats_counts.statsd.bad_lines_seen",
  "stats_counts.statsd.metrics_received",
  "stats_counts.statsd.packets_received",
  "statsd.numStats"
]