given two keys:
Account Name: produceracct
package main | |
import ( | |
"context" | |
"fmt" | |
"github.com/ethereum/go-ethereum/common" | |
"github.com/ethereum/go-ethereum/core/types" | |
"github.com/ethereum/go-ethereum/ethclient" | |
) |
#!/bin/bash | |
#CONTAINER=fixme | |
#ZPOOL=fixme | |
#CHAIN_NAME=fixme | |
#OUT_DIR=fixme | |
#URL=fixme | |
#API=fixme | |
# Uses ZFS snapshots to minimize node downtime when creating history node archives: |
#cloud-config | |
# vim: syntax=yaml | |
# | |
write_files: | |
# cloudwatch logs, send log streams, but not metrics: | |
- content: | | |
{ | |
"agent": { |
package main | |
import ( | |
"context" | |
"encoding/json" | |
"fmt" | |
rpchttp "github.com/tendermint/tendermint/rpc/client/http" | |
"github.com/tendermint/tendermint/types" | |
"time" | |
) |
package main | |
import ( | |
"flag" | |
"github.com/PagerDuty/go-pagerduty" | |
"log" | |
"os" | |
"strings" | |
) |
This example is specifically for my Osmosis seed node, that I run in the cloud, all my other nodes are on hardware, and I use a very different setup on those.
These instructions should work on just about any cloud provider, by striping block devices it's possible to get much higher IOPS and throughput. On Omosis in particular this is important. It doesn't cost any more to use striped volumes, so for example 3 40GB volumes cost the same as a single 120GB, but give (almost) 3x the performance.
After provisioning new block devices (do not format automatically) in the DO console and attaching them, ssh into the droplet and as root follow the directions below. I try to shoot for < 50% usage, so right now with about 120GiB needed, three 90GB volumes will do nicely.
_Note that extending the volume group in the future will require adding exactly the same number and size of volumes. Alternatively you can just use the same procedure here to move the files into a new vol
#!/bin/bash | |
PROMETHEUS=http://localhost:26660 | |
NUM_PEERS=$(curl -s ${PROMETHEUS}/stats |grep 'p2p_peers{' |awk '{print $NF}') | |
# if we can't connect don't alarm, that is done in another check. | |
[ -z $NUM_PEERS ] && exit 0 | |
if [ $NUM_PEERS -eq 0 ] ; then | |
echo NO PEERS ARE CONNECTED |