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.
您可以只使用 unix find
命令,例如find /data/graphite -name 'some_pattern'
或使用 web api,例如curl http://my-graphite/metrics/find?query=somequery
,请参阅石墨指标 api
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"
]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.