Skip to content

Instantly share code, notes, and snippets.

View churrops's full-sized avatar

ChurrOps On DevOps churrops

View GitHub Profile
=======================================================================================
# kubectl describe nodes | grep -A 3 -e "Resource Requests"
=======================================================================================
Resource Requests Limits
-------- -------- ------
cpu 11045m (69%) 30400m (191%)
memory 19990070Ki (30%) 36109957Ki (55%)
--
Resource Requests Limits
@churrops
churrops / filebeat-mysql-slowlog-mysql.yml
Created June 18, 2018 01:47
/etc/filebeat/modules.d/mysql.yml
- module: mysql
# Error logs
error:
enabled: true
# Set custom paths for the log files. If left empty,
# Filebeat will choose the paths depending on your OS.
var.paths: ["/var/log/mariadb/mariadb.log"]
# Slow logs
@churrops
churrops / filebeat-mysql-slowlog-slowlog.yml
Created June 18, 2018 01:45
/usr/share/filebeat/module/mysql/slowlog/config/slowlog.yml
type: log
paths:
{{ range $i, $path := .paths }}
- {{$path}}
{{ end }}
exclude_files: ['.gz$']
multiline:
# pattern: '^# User@Host: '
pattern: '^# Time: '
negate: true
@churrops
churrops / filebeat-mysql-slowlog-pipeline.json
Last active June 18, 2018 14:07
/usr/share/filebeat/module/mysql/slowlog/ingest/pipeline.json
{
"description": "Pipeline for parsing MySQL slow logs.",
"processors": [{
"grok": {
"field": "message",
"patterns":[
"^# Time: (?<mysql_slowlog_time>%{NUMBER}%{SPACE}%{TIME})(.|\r|\n)*# User@Host: %{USER:mysql_slowlog_user}\\[%{USER:mysql_slowlog_current_user}\\] @ %{HOSTNAME:mysql_slowlog_client_host}? \\[%{IP:mysql_slowlog_client_ip}?\\](.|\r|\n)*# Thread_id:%{SPACE}%{NUMBER:mysql_slowlog_id} Schema: %{WORD:mysql_slowlog_schema}? QC_hit: %{WORD:mysql_slowlog_qc_hit}(.|\r|\n)*# Query_time: %{NUMBER:mysql_slowlog_query_time_sec} Lock_time: %{NUMBER:mysql_slowlog_lock_time} Rows_sent: %{NUMBER:mysql_slowlog_rows_sent} Rows_examined: %{NUMBER:mysql_slowlog_rows_examined}(.|\r|\n)*SET timestamp=%{NUMBER:mysql_slowlog_timestamp};(.|\n)%{GREEDYDATA:mysql_slowlog_query}"
],
"pattern_definitions" : {
"GREEDYMULTILINE" : "(.|\n)*"
##########################################################
#################### INSTALACAO APACHE RANGER
##########################################################
http://coheigea.blogspot.com.br/2016/07/installing-apache-ranger-admin-ui.html
https://www.talend.com/blog/2016/07/28/syncing-users-groups-ldap-apache-ranger/
hostnamectl set-hostname apache-ranger
systemctl disable firewalld; systemctl stop firewalld
version: "3.3"
services:
traefik:
image: traefik
command: --web --docker --docker.swarmmode --docker.watch --docker.domain=churrops.lab --logLevel=DEBUG
ports:
- "80:80"
- "8080:8080"
- "443:443"
global
log 127.0.0.1 local0 notice
maxconn 6000
user haproxy
group haproxy
daemon
stats socket /tmp/haproxy.sock
#debug
#quiet