Skip to content

Instantly share code, notes, and snippets.

@ppetr
Created July 31, 2023 15:34
Show Gist options
  • Save ppetr/05404121ba6bc94fa65ee294d650c554 to your computer and use it in GitHub Desktop.
Save ppetr/05404121ba6bc94fa65ee294d650c554 to your computer and use it in GitHub Desktop.
Instrumenting monerod with Telegraf (InfluxDB)
# /etc/telegraf/telegraf.d/monero.conf
[[inputs.exec]]
name_override = '''monerod'''
interval = '''60s'''
commands = ['''curl --silent --data '{"jsonrpc":"2.0","id":"0","method":"get_info"}' http://localhost:18081/json_rpc''']
timeout = '''30s'''
# See https://github.com/influxdata/telegraf/blob/master/docs/DATA_FORMATS_INPUT.md
data_format = '''json'''
json_query = '''result'''
json_string_fields = ['''status''', '''version''']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment