Skip to content

Instantly share code, notes, and snippets.

View moosh3's full-sized avatar
๐Ÿ
doing devop things

Alec Cunningham moosh3

๐Ÿ
doing devop things
View GitHub Profile
version: '3.6'
services:
elasticsearch: &service
container_name: elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:6.7.1
# deploy:
# mode: global
# restart_policy:
# condition: on-failure
sudo docker images | egrep "^<none>" | awk '{print $3}' | xargs sudo docker rmi -f
version: '3.3'
services:
prometheus:
container_name: prometheus
image: prom/prometheus:v2.7.2
container_name: prometheus
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/etc/prometheus/console_libraries'
groups:
- name: postgresql.rules
rules:
- alert: PostgreSQL_UnusedReplicationSlot
expr: 'pg_replication_slots_active == 0'
for: 30m
labels:
severity: warn
channel: database
annotations:
#!/bin/bash
set -euo pipefail
trap "echo 'error: Script failed: see failed command above'" ERR
apiVersion: v1
kind: Template
metadata:
annotations:
description: OCP KubeVirt Fedora 27 VM template
iconClass: icon-fedora
tags: kubevirt,ocp,template,linux,virtualmachine
labels:
kubevirt.io/os: fedora27
miq.github.io/kubevirt-is-vm-template: "true"
[alec@613884-staging1 ~]$ curl -f localhost:9394/metrics
# HELP ruby_collector_working Is the master process collector able to collect metrics
# TYPE ruby_collector_working gauge
ruby_collector_working 1
# HELP ruby_collector_rss total memory used by collector process
# TYPE ruby_collector_rss gauge
ruby_collector_rss 20570112
apiVersion: v1
kind: Service
metadata:
name: hello-kubernetes
spec:
type: LoadBalancer
ports:
- port: 80
targetPort: 8080
selector:
apiVersion: v1
kind: Service
metadata:
name: hello-kubernetes
spec:
type: NodePort
ports:
- port: 80
targetPort: 8080
selector:
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: developer-cluster-role
rules:
- apiGroups:
- ""
resources:
- "*"
verbs: