Skip to content

Instantly share code, notes, and snippets.

neil saitug niftynei

Block or report user

Report or block niftynei

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@niftynei
niftynei / node_details.json
Created Sep 24, 2019
c-lightning Prometheus/Grafana Node Dashboard
View node_details.json
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@niftynei
niftynei / quicklook.json
Created Sep 24, 2019
"Quicklook" c-lightning Prometheus Dashboard (Grafana)
View quicklook.json
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@niftynei
niftynei / docker-compose.yaml
Created Sep 24, 2019
c-lightning with Prometheus, Alertmanager, and Grafana
View docker-compose.yaml
version: '3.7'
services:
  lightning:
    image: blockstream/lightningd:prom
    container_name: lightning
    restart: always
    network_mode: "host" 
    volumes:
      - ~/extra/lightning:/root/.lightning
@niftynei
niftynei / shell.sh
Created Sep 24, 2019
Command to start Grafana container
View shell.sh
docker run -d \
--network=host \
-v ~/extra/grafana/data:/var/lib/grafana \
-v ~/extra/grafana/provisioning:/etc/grafana/provisioning \
--name grafana \
grafana/grafana:6.3.5
@niftynei
niftynei / ln-prom.yml
Created Sep 24, 2019
Datasource config to connect Prometheus <-> c-lightning plugin
View ln-prom.yml
apiVersion: 1
datasources:
  - name: Prometheus
    type: prometheus
    access: proxy
    url: http://localhost:9090
@niftynei
niftynei / shell.sh
Created Sep 24, 2019
Command to start Alertmanager
View shell.sh
docker run \
--network=host \
-v ~/extra/prom/data:/data \
-v ~/extra/prom/alertmanager.yaml:/config/alertmanager.yaml \
--name alertmanager \
--entrypoint=/bin/alertmanager \
"prom/prometheus:v2.12.0" --config.file=/config/alertmanager.yaml
@niftynei
niftynei / alertmanager.yml
Created Sep 24, 2019
Alertmanager Config
View alertmanager.yml
receivers:
  - name: alerts-email
    email_configs:
    - to: alerts@example.com
      from: noreply@example.io
      smarthost: smtp.gmail.com:587
      auth_username: alerts@example.com
      auth_password: 12345678910
  - name: alerts-pager
    opsgenie_configs:
@niftynei
niftynei / shell.sh
Created Sep 24, 2019
Command to start Prometheus
View shell.sh
docker run -d \
--network=host \
-v ~/extra/prom/data:/data:rw \
-v ~/extra/prom/prometheus.yaml:/config/prometheus.yaml:ro \
-v ~/extra/prom/alerts.yaml:/config/alerts.yaml:ro \
--read-only \
--name prometheus \
"prom/prometheus:v2.12.0" --config.file=/config/prometheus.yaml --storage.tsdb.path=/data/metrics --storage.tsdb.retention=31d
@niftynei
niftynei / alerts.yml
Created Sep 24, 2019
Alertmanager Config
View alerts.yml
groups:
- name: c-lightning.rules
  rules:
  - alert: c_lightning_node_down
    expr: lightning_node_info{job="lightningd"} == 0
    for: 1m
    labels:
      team: c-lightning
      severity: urgent
    annotations:
@niftynei
niftynei / prometheus.yml
Created Sep 24, 2019
Prometheus config
View prometheus.yml
global:
  evaluation_interval: 15s
  scrape_interval: 15s
rule_files:
  - /config/alerts.yaml
alerting:
  alertmanagers:
  - scheme: http
You can’t perform that action at this time.