Skip to content

Instantly share code, notes, and snippets.

View ppetr's full-sized avatar
🤞
I may be slow to respond.

Petr ppetr

🤞
I may be slow to respond.
View GitHub Profile
@ppetr
ppetr / ansible_combine.yaml
Created July 10, 2022 13:46
Ansible dictionary |combine
{''a'': [''a''], ''b'': [''b''], ''d'': [''LEFT'']}|combine(
{''a'': [''a''], ''c'': [''c''], ''d'': [''RIGHT'']})
a:
- a
b:
- b
c:
- c
d:
#!/usr/bin/env python3
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@ppetr
ppetr / monero.conf
Created July 31, 2023 15:34
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