Skip to content

Instantly share code, notes, and snippets.

View hagen1778's full-sized avatar
💭
I may be slow to respond.

Roman Khavronenko hagen1778

💭
I may be slow to respond.
View GitHub Profile
{
"__inputs": [
{
"name": "DS_CH",
"label": "CH",
"description": "",
"type": "datasource",
"pluginId": "vertamedia-clickhouse-datasource",
"pluginName": "ClickHouse"
}
{
"__inputs": [],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "5.3.0-beta1"
}
],
@hagen1778
hagen1778 / prometheus.yaml
Created August 8, 2020 20:59
Migrating data from Prometheus to VM. Prometheus scrape config
global:
scrape_interval: 5s
rule_files:
- "rules.yml"
scrape_configs:
- job_name: 'node_exporter_1'
static_configs:
- targets: ['localhost:9100']
- job_name: 'node_exporter_2'
static_configs:
@hagen1778
hagen1778 / rules.yml
Created August 8, 2020 21:10
Migrating data from Prometheus to VM. Prometheus rules config
groups:
- name: CPU rules
interval: 10s
rules:
# The count of CPUs per node, useful for getting CPU time as a percent of total.
- record: instance:node_cpus:count
expr: >
count without (cpu, mode) (
node_cpu_seconds_total{mode="idle"}
)
@hagen1778
hagen1778 / step-1.go
Last active November 29, 2020 14:35
Simple go web app
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
func main() {
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"github.com/VictoriaMetrics/metrics"
)
serviceMonitor:
enabled: true
# disabled, external ruler is used
ruler:
enabled: false
# disabled, external alertmanager is used
alertmanager:
enabled: false
vmselect:
serviceMonitor:
enabled: true
persistentVolume:
enabled: true
size: 15Gi
storageClass: standard-rwo
extraLabels:
cluster: victoria-metrics
extraArgs:
# vmtag is a docker image tag for VictoriaMetrics components,
# which run inside the prometheus-benchmark - e.g. vmagent, vmalert, vmsingle.
vmtag: "v1.80.0"
nodeSelector:
app: rw-benchmark
# targetsCount defines the number of nodeexporter instances to scrape.
# This option allows to configure the number of active time series to push
# to remoteStorages.
# vmtag is a docker image tag for VictoriaMetrics components,
# which run inside the prometheus-benchmark - e.g. vmagent, vmalert, vmsingle.
vmtag: "v1.80.0"
# nodeSelector is the list of key-value pairs for selecting instances
# where benchmark pods should be deployed.
nodeSelector: {}
# targetsCount defines the number of nodeexporter instances to scrape.
# This option allows to configure the number of active time series to push