Skip to content

Instantly share code, notes, and snippets.

View tomarv2's full-sized avatar

Varun Tomar tomarv2

View GitHub Profile
@tomarv2
tomarv2 / config-part4
Last active April 24, 2020 02:25
prometheus-config.yaml
rule_files:
- '/tmp/prometheus/rules/prometheus.rules'
- '/tmp/prometheus/rules/rules-k8s-monitoring.yaml'
- '/tmp/prometheus/rules/rules-es-pushgateway.yaml'
- '/tmp/prometheus/rules/rules-infra-monitoring.yaml'
- '/tmp/prometheus/rules/rules-redis-exporter.yaml'
- '/tmp/prometheus/rules/rules-spark-blackbox.yaml'
@tomarv2
tomarv2 / config-part3
Last active April 24, 2020 02:25
prometheus-config.yaml
- job_name: demo-blackbox
metrics_path: /probe
params:
module: [http_2xx]
# static_configs:
# - targets:
# - https://gmail.com
# - http://192.168.99.100:31240
# - http://192.168.99.100:31891
# - https://google.com
@tomarv2
tomarv2 / config-part2
Last active April 24, 2020 02:48
prometheus-config.yaml
scrape_configs:
- job_name: redis_exporter
static_configs:
- targets:
- 'redis-ha-exporter.devops:9121'
- 'redis-cluster-exporter.devops:9121'
- job_name: es_exporter
static_configs:
- targets:
- 'es-exporter:9114'
@tomarv2
tomarv2 / config-part1
Last active April 24, 2020 02:20
prometheus-config.yaml
global:
scrape_interval: 30s
evaluation_interval: 60s
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'demo-monitor'
alerting:
alertmanagers:
@tomarv2
tomarv2 / root_logger_settings.py
Created July 21, 2016 05:42 — forked from st4lk/root_logger_settings.py
Python logging settings for root logger
"""
Settings for root logger.
Log messages will be printed to console and also to log file (rotated, with
specified size). All log messages from used libraries will be also handled.
Three approaches for defining logging settings are used:
1. using logging classes directly (py25+, py30+)
2. using fileConfig (py26+, py30+)
3. using dictConfig (py27+, py32+)
Choose any variant as you like, but keep in mind python versions, that
@tomarv2
tomarv2 / logstash
Created July 20, 2016 01:15 — forked from nodesocket/logstash
LogStash init.d service script.
#! /bin/sh
#
# /etc/rc.d/init.d/logstash
#
# Starts Logstash as a daemon
#
# chkconfig: 2345 20 80
# description: Starts Logstash as a daemon
### BEGIN INIT INFO