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
# LightDM greeter uses display :2 so we have ti login first | |
sudo x11vnc -auth /var/run/lightdm/root/:2 -forever -shared -rfbauth /home/revin/.vnc/passwd \ | |
-rfbport 5900 -xkb -norc -noxrecord -noxdamage -nomodtweak -desktop :2 -display :2 | |
# Once logged in, we can connect to the desktop | |
sudo x11vnc -auth /var/run/lightdm/root/:0 -forever -shared -rfbauth /home/revin/.vnc/passwd \ | |
-rfbport 5900 -xkb -norc -noxrecord -noxdamage -nomodtweak -desktop :0 -display :0 |
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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": "-- Grafana --", | |
"enable": true, | |
"hide": true, | |
"iconColor": "rgba(0, 211, 255, 1)", | |
"name": "Annotations & Alerts", |
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
multi_source_repl: | |
query: "SELECT service_state, COUNT(service_state) AS service_state_count FROM performance_schema.replication_connection_status GROUP BY service_state;" | |
metrics: | |
- service_state: | |
usage: "LABEL" | |
description: "Replication thread state name" | |
- service_state_count: | |
usage: "COUNTER" | |
description: "Count by service state name" | |
multi_source_repl_delay: |
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 | |
from SimpleHTTPServer import SimpleHTTPRequestHandler | |
import BaseHTTPServer | |
import optparse | |
import time | |
import socket | |
import simplejson | |
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 | |
export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin | |
export ORCHESTRATOR_API="$1" | |
OC=orchestrator-client | |
PSQL='mysql --defaults-file=/etc/proxysql/user.cnf -P6032 -h127.1' | |
VER=$(date +%s) | |
$OC -c raft-leader > /dev/null 2>&1 |
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 | |
OC=/usr/bin/orchestrator-client | |
IPADDR=$(/sbin/ip ad sh dev eth0 scope global | grep -oE "inet\s(.*)\/" | grep -oE "([0-9]{1,3}\.){3}[0-9]{1,3}") | |
RAFTLEADER=$($OC -c raft-leader | cut -d: -f1) | |
if [ "x${IPADDR}" != "x${RAFTLEADER}" ]; then | |
exit 0 | |
fi |
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 | |
# -*- coding: utf-8 -*- | |
from datetime import datetime | |
from optparse import OptionParser | |
import json | |
import namedtupled | |
import operator | |
import os | |
import pymysql.cursors |
OlderNewer