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
sudo netstat -pen | grep alertmanager | |
tcp6 1 0 127.0.0.1:9093 127.0.0.1:29050 CLOSE_WAIT 1004 286419317 12457/alertmanager | |
tcp6 1 0 127.0.0.1:9093 127.0.0.1:24856 CLOSE_WAIT 1004 286410656 12457/alertmanager | |
tcp6 1 0 127.0.0.1:9093 127.0.0.1:28188 CLOSE_WAIT 1004 286414536 12457/alertmanager | |
tcp6 1 0 127.0.0.1:9093 127.0.0.1:20016 CLOSE_WAIT 1004 286404398 12457/alertmanager | |
tcp6 1 0 127.0.0.1:9093 127.0.0.1:21632 CLOSE_WAIT 1004 286408310 12457/alertmanager | |
tcp6 1 0 127.0.0.1:9093 127.0.0.1:19387 CLOSE_WAIT 1004 286406190 12457/alertmanager | |
tcp6 1 0 127.0.0.1:9093 127.0.0.1:27235 CLOSE_WAIT 1004 286414449 12457/alertmanager | |
tcp6 1 0 127.0.0.1:9093 127.0.0.1:26576 CLOSE_WAIT 1004 286414331 12457/alertmanager | |
tcp6 |
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
goroutine 37040 [running]: | |
runtime/pprof.writeGoroutineStacks(0x7efd7412e278, 0xc82182a630, 0x0, 0x0) | |
/usr/local/go/src/runtime/pprof/pprof.go:516 +0x84 | |
runtime/pprof.writeGoroutine(0x7efd7412e278, 0xc82182a630, 0x2, 0x0, 0x0) | |
/usr/local/go/src/runtime/pprof/pprof.go:505 +0x46 | |
runtime/pprof.(*Profile).WriteTo(0xfcab60, 0x7efd7412e278, 0xc82182a630, 0x2, 0x0, 0x0) | |
/usr/local/go/src/runtime/pprof/pprof.go:236 +0xd4 | |
net/http/pprof.handler.ServeHTTP(0xc82489aeb1, 0x9, 0x7efd7414a8e8, 0xc82182a630, 0xc821b54000) | |
/usr/local/go/src/net/http/pprof/pprof.go:199 +0x37e | |
net/http/pprof.Index(0x7efd7414a8e8, 0xc82182a630, 0xc821b54000) |
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
version: '2' | |
services: | |
proxysql: | |
image: perconalab/proxysql | |
ports: | |
- "3306:3306" | |
- "6032:6032" |
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
#host running out of memory! | |
ALERT HighMem | |
IF 100 -(node_memory_MemFree + node_memory_Buffers + node_memory_Cached) / node_memory_MemTotal* 100 > 80 | |
FOR 1m | |
WITH { | |
severity="page" | |
} | |
SUMMARY "Instance {{$labels.host}} has high memory consumption" | |
DESCRIPTION "{{$labels.host}} of job {{$labels.job}} has less than 40% of memory available for more than 1 minutes." |
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
# my global config | |
global: | |
scrape_interval: 15s # By default, scrape targets every 15 seconds. | |
evaluation_interval: 15s # By default, scrape targets every 15 seconds. | |
# scrape_timeout is set to the global default (10s). | |
# Attach these extra labels to all timeseries collected by this Prometheus instance. | |
external_labels: | |
monitor: 'codelab-monitor' |
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/env sh | |
cd $BACKUP_DIR | |
export DESTHOST=127.0.0.1 | |
export BACKUP_DIR=/vol_mysql/backups | |
mysqld --skip-grant-tables & | |
for i in `ls -1 *-schema.dump.gz | cut -d'-' -f1`; do mysql -h $DESTHOST -e "CREATE DATABASE IF NOT EXISTS $i"; zcat $i-schema.dump.gz | mysql -h $DESTHOST $i; zcat $i-schema-post.dump.gz | mysql -h $DESTHOST $i; done | |
/usr/bin/myloader --host=$DESTHOST --directory=$BACKUP_DIR --enable-binlog --threads=10 --queries-per-transaction=20 -v 3 | |
chown -R mysql:mysql /var/lib/mysql/ |
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
#!/bin/bash | |
echo "Install the necessary tools" | |
sudo apt-get update | |
sudo apt-get -y install make flex bison libtool libevent-dev automake pkg-config libssl-dev libboost-all-dev libbz2-dev build-essential g++ python-dev git | |
echo "git cloning Thrift" | |
apt- |
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/env python | |
import requests | |
url = "https://testngo-be-rz.femi.com/login" | |
headers = {'accept': 'application/json, text/plain, */*', | |
'accept-language': 'en-US,en;q=0.9,he;q=0.8', | |
'authorization': 'Bearer', | |
'content-type': 'application/json; charset=UTF-8', |
OlderNewer