Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Roman Khavronenko hagen1778

💭
I may be slow to respond.
View GitHub Profile
View step-2.go
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
"github.com/VictoriaMetrics/metrics"
)
@hagen1778
hagen1778 / step-1.go
Last active Nov 29, 2020
Simple go web app
View step-1.go
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
func main() {
@hagen1778
hagen1778 / rules.yml
Created Aug 8, 2020
Migrating data from Prometheus to VM. Prometheus rules config
View rules.yml
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 / prometheus.yaml
Created Aug 8, 2020
Migrating data from Prometheus to VM. Prometheus scrape config
View prometheus.yaml
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:
View grafana-playground-13291.json
{
"__inputs": [],
"__requires": [
{
"type": "grafana",
"id": "grafana",
"name": "Grafana",
"version": "5.3.0-beta1"
}
],
View dashboard.json
{
"__inputs": [
{
"name": "DS_CH",
"label": "CH",
"description": "",
"type": "datasource",
"pluginId": "vertamedia-clickhouse-datasource",
"pluginName": "ClickHouse"
}