Install packages on both nodes
sudo yum install corosync pcs pacemaker maxscale
Set the password for the hacluster user [both nodes]
Recording Rule Example 1 | |
================================ | |
# Aggregating up requests per second that has a path label: | |
- record: instance_path:requests:rate5m | |
expr: rate(requests_total{job="myjob"}[5m]) | |
- record: path:requests:rate5m | |
expr: sum without (instance)(instance_path:requests:rate5m{job="myjob"}) | |
Recording Rule Example 2 |
# Many of these are obvious and stupidly simple, but for your reference and copy-pasting pleasure… | |
# Mextify all (with workaround for pesky samples that contain multi-line RSA key that breaks pt-mext) | |
for i in $(ls $1/*-mysqladmin); do { (cat $i | sed -e '/\-\-\-\-\-BEGIN\ PUBLIC\ KEY/,+9d' | pt-mext -r -- cat -) > $i.mext && echo $i.mext;} done; | |
# Inspect given variable through multiple mext samples (revealing ;-)) | |
grep Table_locks_waited *.mext |less -S | |
#Find contentious tables |
file_to_disk = './tmp/large_disk.vdi' | |
Vagrant::Config.run do |config| | |
config.vm.box = 'base' | |
config.vm.customize ['createhd', '--filename', file_to_disk, '--size', 500 * 1024] | |
config.vm.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', file_to_disk] | |
end |