Skip to content

Instantly share code, notes, and snippets.

@f41gh7
f41gh7 / README.md
Last active August 19, 2024 14:43
multi level vmcluster with helm chart

Mutli level cluster setup

doc

Lets say we have 2 zones: zone-a and zone-b. Separate cluster must be deploy to the both zones with commands:

helm upgrade -i zone-a vm/victoria-metrics-cluster -f zone.yaml
@f41gh7
f41gh7 / README.md
Last active June 8, 2024 18:09
opentelemetry-collector and VM

How to use opentelemetry collector with VictoriaMetrics

requirements

Installation of VictoriaMetrics

In education purpose, I'll use single node version of VictoriaMetrics.

@f41gh7
f41gh7 / README.md
Last active July 30, 2024 13:46
metricsql.py

python wrapper for metricsql expr validation.

usage:

  1. build shared lib: go build -buildmode=c-shared -o library.so main.go
  2. use it
python3 metricsql.py 'not_exist(up)'`
failed to parse expr: not_exist(up), error: unsupported function "not_exist"
@f41gh7
f41gh7 / README.md
Created July 29, 2024 12:10
VMAlertmanager and helm

Recommeneded project structure for alertmanager helm chart

I'd recommend to keep project structure simple and straight forward:

chart-name/
  # any static content to include into templates
  files/
  # all needed dynamic templates
  templates/
@f41gh7
f41gh7 / gist:5d9f2dbae53163bdc0ebd1ada455b8d5
Created February 13, 2025 16:10
vmagent shard UI expose
apiVersion: operator.victoriametrics.com/v1beta1
kind: VMAgent
metadata:
name: main
spec:
selectAllByDefault: true
replicaCount: 1
statefulMode: true
shardCount: 2
extraArgs:
@f41gh7
f41gh7 / all-in-one.yaml
Created April 11, 2025 14:14
VictoriaLogs cluster
apiVersion: v1
kind: Service
metadata:
name: vlinsert
spec:
type: ClusterIP
ports:
- name: http
protocol: TCP
port: 9428