Skip to content

Instantly share code, notes, and snippets.

View iamabhishek-dubey's full-sized avatar
🎯
Focusing

Abhishek Dubey iamabhishek-dubey

🎯
Focusing
View GitHub Profile
global:
# The smarthost and SMTP sender used for mail notifications.
smtp_smarthost: 'localhost:25'
smtp_from: 'alertmanager@example.org'
smtp_auth_username: 'alertmanager'
smtp_auth_password: 'password'
# The auth token for Hipchat.
hipchat_auth_token: '1234556789'
# Alternative host for Hipchat.
hipchat_api_url: 'https://hipchat.foobar.org/'
scrape_configs:
- job_name: "node"
scrape_interval: "15s"
static_configs:
- targets: ['localhost:9100']
- targets: ['192.168.2.10:9117']
- targets: ['192.168.2.10:9104']
- targets: ['192.168.2.25:9115'] # Target to probe with http on port 8
- job_name: "haproxy_exporter"
global:
scrape_interval: 30s # Default is every 1 minute.
evaluation_interval: 60s # The default is every 1 minute.
scrape_timeout: 10s # global default is 10s
# Attach these labels to any time series or alerts when communicating with
# external systems (federation,
groups:
- name: cluster-rules
interval: 30s # defaults to global interval testing threshold
rules:
- alert: os_cluster_memory_low
expr: sum (container_memory_working_set_bytes{id="/"}) / sum (machine_memory_bytes{}) *100 > 70
for: 10m
{
"annotations": {
"list": []
},
"description": "HAproxy backend servers",
"editable": true,
"gnetId": 2428,
"graphTooltip": 1,
"hideControls": false,
"id": 61,
{
"annotations": {
"list": []
},
"description": "HAproxy backend servers",
"editable": true,
"gnetId": 2428,
"graphTooltip": 1,
"hideControls": false,
"id": 61,
@iamabhishek-dubey
iamabhishek-dubey / User and Organisation Creation in Grafana.md
Created December 19, 2017 06:38
This commands will help you to create user and organisation in Grafana with HTTP API

User Creation in Grafana with HTTP Api

curl -XPOST -H "Content-Type: application/json" -d '{
  "name":"User",
  "email":"user@graf.com",
  "login":"user",
 "password":"userpassword"
@iamabhishek-dubey
iamabhishek-dubey / pod_rules.md
Last active January 19, 2018 06:09
Prometheus Rule File for POD Failure

Prometheus Rule File for Pod Failure

There are two rule files for Pod Failure of Openshift or Kubernetes in Prometheus

  1. One is:-
- name: pod.rules
  rules:
  - alert: Pod is failed
@iamabhishek-dubey
iamabhishek-dubey / prometheus-config.yml
Last active December 26, 2017 13:39
Prometheus ConfigMap for Openshift or Grafana
apiVersion: v1
data:
prometheus.rules: |
groups:
- name: custom-rules
rules:
- alert: DBsDown
expr: count((up{job="db-exporter"} == 0 )) > 0
for: 2m
labels:
@iamabhishek-dubey
iamabhishek-dubey / alertmanager-config.yml
Created December 21, 2017 07:52
Alertmanager ConfigMap with Slack Integrations
apiVersion: v1
data:
config.yml: |-
global:
# The directory from which notification templates are read.
templates:
- '/etc/alertmanager/template/*.tmpl'