Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
docker run -d \
--name rabbitmq \
-p 5672:5672 -p 15672:15672 \
-e RABBITMQ_DEFAULT_USER=fizz -e RABBITMQ_DEFAULT_PASS=fizz \
rabbitmq:3-management
version: '3'
services:
prom:
image: prom/prometheus
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
global:
scrape_interval: 60s
external_labels:
monitor: 'fizz'
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['?.?.?.?:9090']
#!/usr/bin/env python
import time
import pika
credentials = pika.PlainCredentials('fizz', 'fizz')
parameters = pika.ConnectionParameters(host='?.?.?.?',
port=5672, credentials=credentials)
#!/usr/bin/env python
import pika
credentials = pika.PlainCredentials('fizz', 'fizz')
parameters = pika.ConnectionParameters(host='?.?.?.?',
port=5672, credentials=credentials)
connection = pika.BlockingConnection(parameters)
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
#!/bin/bash
###############################################################################
# basics
###############################################################################
yum -y install wget /
net-tools / # netstat etc etc
sqlite-devel # fixes sqlite/python integration issue
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 \
# 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"
# 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