Last active
September 10, 2020 19:01
-
-
Save mmahut/682852074ea355e979dcf6fc86907c25 to your computer and use it in GitHub Desktop.
This file contains 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
[root@oracle1:~]# cat /etc/crontab | |
SHELL=/nix/store/g9dkn6v4zz0wa71r5c2clsdw0ar53nxp-bash-4.4-p23/bin/bash | |
PATH=/nix/store/lhg8v3l7q4agva377wqbffirm7zlbix9-system-path/bin:/nix/store/lhg8v3l7q4agva377wqbffirm7zlbix9-system-path/sbin | |
NIX_CONF_DIR=/etc/nix | |
TOKEN=xxx | |
* * * * * root /nix/store/m3rg2cw5771psmpgq9dz8yrpilkjzzwi-ergo_prom/bin/ergo_prom > /var/lib/prometheus-node-exporter-text-files/ergo.prom.next; mv /var/lib/prometheus-node-exporter-text-files/ergo.prom.next /var/lib/prometheus-node-exporter-text-files/ergo.prom | |
[root@oracle1:~]# cat /nix/store/m3rg2cw5771psmpgq9dz8yrpilkjzzwi-ergo_prom/bin/ergo_prom | |
QUERY=$(curl -s -XGET -H "accept: application/json" -H "Content-Type: application/json" -H "api_key: $TOKEN" http://localhost:9053/wallet/status) | |
echo -n "ergo_wallet_initialized " | |
echo "$QUERY" | grep isInitialized | grep -c true | |
echo -n "ergo_wallet_unlocked " | |
echo "$QUERY" | grep isUnlocked | grep -c true | |
echo -n "ergo_wallet_height " | |
echo "$QUERY" | /nix/store/mkmjly8kay3crs09jr7xzgmczwji2k9g-jq-1.6-bin/bin/jq -r .walletHeight | |
[root@oracle1:~]# | |
[root@oracle1:~]# /nix/store/m3rg2cw5771psmpgq9dz8yrpilkjzzwi-ergo_prom/bin/ergo_prom | |
ergo_wallet_initialized 1 | |
ergo_wallet_unlocked 1 | |
ergo_wallet_height 314825 | |
[root@oracle1:~]# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment