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
Generated by iptables-save v1.6.0 on Wed Jan 25 15:32:29 2017 | |
*nat | |
:PREROUTING ACCEPT [4:14250] | |
:INPUT ACCEPT [0:0] | |
:OUTPUT ACCEPT [0:0] | |
:POSTROUTING ACCEPT [4:14250] | |
-A POSTROUTING -s 192.168.13.0/24 -o br0 -j MASQUERADE | |
COMMIT | |
# Completed on Wed Jan 25 15:32:29 2017 | |
# Generated by iptables-save v1.6.0 on Wed Jan 25 15:32:29 2017 |
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 | |
import subprocess | |
from subprocess import Popen, PIPE | |
import json, os | |
def facter(): | |
binary = "/opt/puppetlabs/puppet/bin/facter" | |
if os.path.isfile(binary): | |
output = json.loads(subprocess.Popen([binary, '-p', '-j'], stdout=PIPE, stderr=PIPE).stdout.read().rstrip('\n')) |
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 | |
# usage: | |
# ./check_grants.py -u admin -p test1234 -f influx -d '{"telegraf":{"perms":{"telegraf":"WRITE","test":"READ"},"pass":"asdasdd"},"vova":{"perms":{"test5":"WRITE","test4":"READ"},"pass":"test234"},"asd":{"perms":{"telegraf":"READ","test5": "ALL"},"pass":"asdmk"}}' | |
import sys, json, argparse | |
import requests, urllib | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) |
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
var data = stream | |
|from() | |
.database('telegraf') | |
.retentionPolicy('autogen') | |
.measurement('cpu') | |
.groupBy('host') | |
.where(lambda: "cpu" == 'cpu-total') | |
|eval(lambda: "usage_user" + "usage_system") | |
.as('usage_total') | |
.keep() |
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
salt 'ceph*' cmd.run 'parted --script /dev/sdb mklabel gpt mkpart primary 1MiB 30GiB mkpart primary 30GiB 60GiB' | |
for i in {0..5}; do salt 'ceph-1.*' cmd.run "ceph osd out osd.$i" ; done | |
for i in {0..5}; do salt 'ceph-1.*' cmd.run "ceph osd down osd.$i" ; done | |
for i in {0..5}; do salt 'ceph-1.*' cmd.run "ceph auth del osd.$i" ; done | |
for i in {0..5}; do salt 'ceph-1.*' cmd.run "ceph osd crush remove osd.$i" ; done | |
for i in {0..5}; do salt 'ceph-1.*' cmd.run "ceph osd rm osd.$i" ; done | |
do salt 'ceph-1.*' cmd.run "ceph osd tree" | |
salt 'ceph*' cmd.run 'ceph-disk list ' | |
salt 'ceph-*' cmd.run 'ceph-disk zap /dev/sdd; ceph-disk zap /dev/sdc' |
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
{ | |
"source": { | |
"index": "suricata-1-2017.03.04", | |
"query": { | |
"term": { | |
"event_type": "alert" | |
} | |
} | |
}, | |
"dest": { |
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
{"version": 1, "partitions": [{"topic": "syslog", "partition": 0, "replicas": [63, 61, 62]}, {"topic": "syslog", "partition": 1, "replicas": [61, 63, 62]}, {"topic": "syslog", "partition": 2, "replicas": [62, 63, 61]}]} |
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
module(load="omelasticsearch") | |
module(load="mmjsonparse") | |
template(name="myformat" type="list") { | |
constant(value="<") | |
property(name="pri") | |
constant(value=">") | |
property(name="timestamp" dateFormat="rfc3339") | |
constant(value=" ") | |
property(name="hostname") |
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
var warn_load1 = 2 | |
var warn_load5 = 1 | |
var warn_load15 = 0.5 | |
var crit_load1 = 4 | |
var crit_load5 = 1.5 | |
var crit_load15 = 1 | |
var period = 1m | |
var every = 1m |
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 python3 | |
from os import listdir | |
from os import path | |
import yaml | |
role = 'logs' | |
base_dir = '/var/cache/salt/master/minions' | |
minions_dirs = listdir(base_dir) |