mirror of
https://github.com/cirocosta/monero-exporter.git
synced 2024-12-22 06:15:07 -05:00
31f5a6f84b
the code has been initially written under `monero-operator`, but it turns out that having the exporter available for non-kubernetes users is pretty good, thus, making it its own separate thing. Signed-off-by: Ciro S. Costa <utxobr@protonmail.com>
24 lines
504 B
Awk
Executable File
24 lines
504 B
Awk
Executable File
#!/usr/bin/awk -f
|
|
|
|
# gh-table-printer - prints to `stdout` the metric descriptions
|
|
# in GitHub flavored markdown tables[1].
|
|
#
|
|
# [1] - https://help.github.com/articles/organizing-information-with-tables/
|
|
#
|
|
# Usage: `curl -s localhost:9100/metrics | grep container_ | ./gh-table-printer`
|
|
|
|
BEGIN {
|
|
print "| name | description |"
|
|
print "| ---- | ----------- |"
|
|
}
|
|
|
|
/HELP/ {
|
|
line="| " $3 " |"
|
|
for (i = 4; i <= NF; i++) {
|
|
line = line " "$i
|
|
}
|
|
|
|
line = line " |"
|
|
print line
|
|
}
|