Skip to content

Instantly share code, notes, and snippets.

@wh13371
wh13371 / EK_docker-compose.yml
Created August 26, 2020 12:45
A simple Elasticsearch and Kibana stack
version: '3'
services:
es01:
image: docker.elastic.co/elasticsearch/elasticsearch:7.9.0
container_name: es01
environment:
- node.name=es01
- cluster.name=es-docker-cluster
- cluster.initial_master_nodes=es01
- bootstrap.memory_lock=true
#
# A "httpie" container
#
# docker build --network host -t wh13371/httpie .
# docker login
# docker push wh13371/httpie
# docker run -it --rm --network host wh13371/httpie
# Usage: / # http 10.20.30.40:46664
#
FROM alpine:latest
hostname = "3c18ec3c89ea"
data_dir = "/var/lib/kapacitor"
skip-config-overrides = false
default-retention-policy = ""
[alert]
persist-topics = true
[http]
bind-address = ":9092"
# Global tags can be specified here in key="value" format.
[global_tags]
# Configuration for telegraf agent
[agent]
## Default data collection interval for all inputs
interval = "60s"
## Rounds collection interval to 'interval'
## ie, if interval="10s" then always collect on :00, :10, :20, etc.
round_interval = true
# Once every 24 hours InfluxDB will report usage data to usage.influxdata.com
reporting-disabled = true
[meta]
# Where the metadata/raft database is stored
dir = "/var/lib/influxdb/meta"
[data]
# The directory where the TSM storage engine stores TSM files.
dir = "/var/lib/influxdb/data"
docker run -d \
-p 8083:8083 \
-p 8086:8086 \
--name influxdb \
-e INFLUXDB_REPORTING_DISABLED=true \
-v $PWD/influxdb.conf:/etc/influxdb/influxdb.conf:ro \
influxdb -config /etc/influxdb/influxdb.conf
docker run -d \
--name telegraf \
#!/bin/bash
###############################################################################
# basics
###############################################################################
yum -y install wget /
net-tools / # netstat etc etc
sqlite-devel # fixes sqlite/python integration issue
docker run -d \
--restart="always" \
-p 61208-61209:61208-61209 \
-e GLANCES_OPT="-w" \
-v /var/run/docker.sock:/var/run/docker.sock:ro \
--pid host \
--net=host --privileged \
docker.io/nicolargo/glances
#!/usr/bin/env python
import pika
credentials = pika.PlainCredentials('fizz', 'fizz')
parameters = pika.ConnectionParameters(host='?.?.?.?',
port=5672, credentials=credentials)
connection = pika.BlockingConnection(parameters)
#!/usr/bin/env python
import time
import pika
credentials = pika.PlainCredentials('fizz', 'fizz')
parameters = pika.ConnectionParameters(host='?.?.?.?',
port=5672, credentials=credentials)