Compare commits

..

No commits in common. "62bb2da068b097043cfb45d85c47b9a1cc05b8ae" and "4ec608adf264fa937ac3dccb2ae2fc54ab1a39af" have entirely different histories.

2 changed files with 1 additions and 32 deletions

View file

@ -21,6 +21,6 @@ services:
- MYSQL_ROOT_PASSWORD=<%= @mysql_root_password %> - MYSQL_ROOT_PASSWORD=<%= @mysql_root_password %>
- BOOTSTRAP=<%= @bootstrap %> - BOOTSTRAP=<%= @bootstrap %>
- FORCE_BOOTSTRAP=0 - FORCE_BOOTSTRAP=0
command: "--wsrep_cluster_address=gcomm://<%= @db_ip.join(',') %>" command: "--wsrep_cluster_address=gcomm://<%= @db_ip[0] %>,<%= @db_ip[1] %>,<%= @db_ip[2] %>"
tty: true tty: true

View file

@ -1,31 +0,0 @@
#!/usr/bin/env python3
import argparse
import sys
parser = argparse.ArgumentParser()
parser.add_argument('-w', '--warning',
help='Warning threashold',
required=True)
parser.add_argument('-c', '--critical',
help='Critical threashold',
required=True)
args = parser.parse_args()
warning = int(args.warning)
critical = int(args.critical)
with open('/proc/uptime', 'r') as f:
uptime_seconds = float(f.readline().split()[0])
days = int(uptime_seconds / 86400)
status = "OK"
exit = 0
if days > warning:
status = "WARNING"
exit = 1
if days > critical:
status = "CRITICAL"
exit = 2
print(f"{status}: uptime {days} days | uptime={days};{warning};{critical};")
sys.exit(exit)