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
{ | |
"dashboard": { | |
"annotations": { | |
"list": [ | |
] | |
}, | |
"description": "etcd dashboard Derived from https://raw.githubusercontent.com/etcd-io/etcd/master/Documentation/op-guide/grafana.json", | |
"editable": true, | |
"gnetId": null, |
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
juju config prometheus scrape-jobs=" | |
- job_name: 'etcd_metrics' | |
metrics_path: /metrics | |
scheme: https | |
scrape_interval: 30s | |
static_configs: | |
- targets: ['10.5.0.42:2379'] | |
- targets: ['10.5.1.137:2379'] | |
- targets: ['10.5.1.249:2379'] | |
tls_config: |
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
#!/usr/bin/python3 | |
# Author: Chris Johnston <cjohnston@ubuntu.com> | |
# Initial inspiration from: | |
# https://gist.github.com/nathan-osman/b9158d058cc45916dcd20a591b66d0b4 | |
from argparse import ArgumentParser | |
from sys import exit | |
try: | |
from launchpadlib.launchpad import Launchpad | |
from tabulate import tabulate |
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
# for juju on bionic | |
cat << EOF > /tmp/a.js | |
db = db.getSiblingDB('juju'); | |
var collectionNames = db.getCollectionNames(), stats = []; | |
collectionNames.forEach(function (n) { stats.push(db[n].stats()); }); | |
stats = stats.sort(function(a, b) { return b['size'] - a['size']; }); | |
for (var c in stats) { print(stats[c]['ns'] + ": " + stats[c]['size'] + " (" + stats[c]['storageSize'] + ")"); } | |
EOF | |
/usr/bin/mongo --sslAllowInvalidCertificates --ssl -u admin -p $(grep oldpassword /var/lib/juju/agents/machine-0/agent.conf | awk -e '{print $2}') localhost:37017/admin /tmp/a.js |
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
### Keybase proof | |
I hereby claim: | |
* I am cjohnston1158 on github. | |
* I am cjohnston (https://keybase.io/cjohnston) on keybase. | |
* I have a public key ASCH6ODfKLgSgmyhNetICTm2Ry9o8tLPRi25ll22wwrP5Qo | |
To claim this, I am signing this object: |