Skip to content

Instantly share code, notes, and snippets.

View saez0pub's full-sized avatar

Jean Prat saez0pub

  • p00ls.io
  • 127.0.0.1:0.0
View GitHub Profile
==> Starting Consul agent...
Version: '1.8.3'
Node ID: '506cf337-31df-4815-01b0-90606fc638f6'
Node name: 'actarus'
Datacenter: 'dc1' (Segment: '<all>')
Server: true (Bootstrap: false)
Client Addr: [127.0.0.1] (HTTP: 8500, HTTPS: -1, gRPC: 8502, DNS: 8600)
Cluster Addr: 127.0.0.1 (LAN: 8301, WAN: 8302)
Encrypt: Gossip: false, TLS-Outgoing: false, TLS-Incoming: false, Auto-Encrypt-TLS: false

Keybase proof

I hereby claim:

  • I am saez0pub on github.
  • I am saez0pub (https://keybase.io/saez0pub) on keybase.
  • I have a public key ASDoxtXNeLIhjNt1mxJV2n8oPprWaxTvpB-aDP_B6tK0qwo

To claim this, I am signing this object:

@saez0pub
saez0pub / gist:e1169b3688744b9a843b
Last active March 5, 2016 15:02
detect and restart systemctl units after a full upgrade Oo
- name: restart systemctl units with deleted files when upgraded
shell: find /proc/*/fd/ -xtype f ! -exec file {} \; | grep -P '^/proc/[0-9]+/fd/[0-9]+{{ ":" }} broken symbolic link to /.*(deleted)' | sed -e 's/^\/proc\/\([0-9][0-9]*\)\/fd\/[0-9][0-9]*{{ ":" }} broken symbolic link to \(\/.*\) (deleted)/\1 \2/' | grep -v -e ' /tmp/' -e '(deleted)' |cut -d ' ' -f1 | sort -u | while read pid; do systemctl status $pid --no-pager -n0 --no-legend | grep '^ *Loaded\{{ ":" }} loaded (/usr/lib/systemd/' | sed -e 's/^ *Loaded\{{ ":" }} loaded (//' -e 's/;.*//' -e 's/.*\///'; done | sort -u
register: restartUnits
failed_when: restartUnits.stderr
when: "systemUpgraded | changed"
#!/usr/bin/env perl
#===============================================================================
# Auteur : saez0pub
# Date : 11/11/2015
# But : Vérification du journal via journaltcl
#===============================================================================
use strict;
use warnings;
use Getopt::Long;
@saez0pub
saez0pub / logstash.json
Last active December 23, 2015 17:49
Elasticsearch Template for new schema of logstash
{
"template" : "logstash-*",
"settings" : {
"index.default_field" : "message",
"index.number_of_replicas" : "0",
"index.number_of_shards" : "1"
},
"mappings" : {
"_default_" : {
"dynamic_templates" : [ {
@saez0pub
saez0pub / mod_gearman.conf
Last active December 15, 2015 23:29
mod gearman conf example
input {
gearman {
servers => ["127.0.0.1:4730"]
worker_id => "test_1"
queue => "check_results"
type => "nagios-gearman"
threads => 20
debug => true
}
}