This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
URL="https://api.amboss.space/graphql" | |
NOW=$(date -u +%Y-%m-%dT%H:%M:%S%z) | |
SIGNATURE=$(lncli signmessage "$NOW" | jq -r .signature) | |
JSON="{\"query\": \"mutation HealthCheck(\$signature: String!, \$timestamp: String!) { healthCheck(signature: \$signature, timestamp: \$timestamp) }\", \"variables\": {\"signature\": \"$SIGNATURE\", \"timestamp\": \"$NOW\"}}" | |
echo "$JSON" | curl -s --data-binary @- -H "Content-Type: application/json" -X POST --output /dev/null $URL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
TMP_DIR=somewhere | |
PIC_DIR=somewhere_else | |
SHORT=h # iterate over h, d, y? | |
LONG="hour" # iterate over "hour", "day", "year"? | |
WIDTH=500 | |
rrdtool graph $TMP_DIR/bitcoin_conn_$SHORT.png \ | |
--end now --start end-1$SHORT \ | |
-t "Bitcoin Connections last $LONG" \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
import time | |
import socket | |
import subprocess | |
import json | |
hostname = os.environ['COLLECTD_HOSTNAME'] if 'COLLECTD_HOSTNAME' in os.environ else socket.getfqdn() |