Skip to content

Instantly share code, notes, and snippets.

View oazabir's full-sized avatar

Omar AL Zabir oazabir

View GitHub Profile
Edit the daemon configuration file:
```
$ vim /etc/docker/daemon.json
```
Add the following lines to file:
```
{
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -t nat -F
iptables -t mangle -F
iptables -F
iptables -X
@oazabir
oazabir / gist:26ad7d609e82a92f8aea9cb55605a0a6
Created August 13, 2018 06:28
Install kubernetes on OEL7
source fixproxy.sh
cat <<EOF > /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
@oazabir
oazabir / gist:de8ba9ff3b343eab052bac69fa708c57
Created August 13, 2018 06:27
Proxy setup for kubernetes
export http_proxy=http://proxy.intra.bt.com:8080/
export HTTP_PROXY=$http_proxy
export https_proxy=$http_proxy
export HTTPS_PROXY=$http_proxy
export HOST_IP=`hostname -i`
printf -v pool '%s,' 192.168.0.{1..253}
printf -v service '%s,' 10.96.0.{1..253}
export no_proxy="127.0.0.1,localhost,${HOST_IP,},${service%,},${pool%,},127.0.0.1";
export NO_PROXY=$no_proxy
-g /data/docker -H tcp://0.0.0.0:2376 --tls=false -H unix:///var/run/docker.sock --log-opt max-size=100m --log-opt max-file=3
$elasticsearch="https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/zip/elasticsearch/2.3.1/elasticsearch-2.3.1.zip"
$logstash="https://download.elastic.co/logstash/logstash/logstash-2.3.1.zip"
$filebeat="https://download.elastic.co/beats/filebeat/filebeat-1.2.1-windows.zip"
$grafana="https://grafanarel.s3.amazonaws.com/winbuilds/dist/grafana-3.0.0-beta5.windows-x64.zip"
$logstashconf="https://gist.githubusercontent.com/oazabir/9b9cfc8795581ae5ec07e40245a86081/raw/6a6016a3902e4f2f964a266592a5799aebe3469c/logstash.yml"
$logstashtemplate="https://gist.githubusercontent.com/oazabir/000bde7bc3c8567ea665a0b59c0d86ca/raw/eab8f426b70ff131a40eb4a0ca85429688721901/logstash-template.json"
$filebeatconf="https://gist.githubusercontent.com/oazabir/8046a3c33b61a15d0661f85fae60e245/raw/9cf520fc61c8f1318ef27703c2c24f7c2ffe2442/filebeat.yml"
$grafanatemplate="https://gist.githubusercontent.com/oazabir/6a3021d8a08fd60a43a48a41cf721742/raw/2806b32d6eb35093f6897c3900ff5a3365bb93ee/GrafanaWebLogTempl
{
"id": 1,
"title": "Web Log",
"originalTitle": "Web Log",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"hideControls": false,
"sharedCrosshair": false,
################### Filebeat Configuration Example #########################
############################# Filebeat ######################################
filebeat:
# List of prospectors to fetch data.
prospectors:
# Each - is a prospector. Below are the prospector specific configurations
-
# Paths that should be crawled and fetched. Glob based paths.
# To fetch all ".log" files from a specific level of subdirectories
input {
beats {
port => 5045
type => 'iis'
}
}
# First filter
filter {
{
"template":"logstash-*",
"settings":{
"index.refresh_interval":"5s"
},
"mappings":{
"_default_":{
"dynamic_templates":[
{