Prometheus
Deploying VictoriaMetrics in Containers
· ☕ 8 min read
VictoriaMetrics (VM for short) is a time-series database compatible with the Prometheus ecosystem. It uses fewer resources than Prometheus and comes in both single-node and cluster editions. The single-node edition can directly replace Prometheus storage; the cluster edition splits reads, writes, and storage across vmstorage / vminsert / vmselect, giving it stronger horizontal scaling.

Deploying ClickHouse in Containers
· ☕ 7 min read
1. ClickHouse Single Node 1.1 Configure Environment Variables 1 2 3 4 5 6 7 8 export CONTAINER_CLI=nerdctl export IMAGE=clickhouse/clickhouse-server:24 export CLICKHOUSE_INSTANCE_NAME=clickhouse export CH_DATA=/data/ops/clickhouse/$CLICKHOUSE_INSTANCE_NAME export CLICKHOUSE_PORT=9000 export CLICKHOUSE_PROMETHEUS_PORT=9363 export CLICKHOUSE_USER=default export CLICKHOUSE_PASSWORD=xxxxxx 1.2 Generate the Configuration Files 1 2 3 4 5 6 7 8 9 10 11 12 13

Common Prometheus Alerting Queries for Various Resources
· ☕ 6 min read
Hosts Host memory usage exceeds threshold 1 - node_memory_MemAvailable_bytes{mode!="idle"} / node_memory_MemTotal_bytes Threshold: 0.9 Host CPU usage exceeds threshold 1 - avg(irate(node_cpu_seconds_total{mode="idle"}[5m])) by (host_name) Threshold: 0.85 Host disk usage exceeds threshold 1 - avg without (fstype)(node_filesystem_free_bytes{fstype!='rootfs',mountpoint!~'/(run|var|snap).*'} / node_filesystem_size_bytes{fstype!='rootfs',mountpoint!~'/(run|var|snap).*'}) Threshold: 0.8 Windows Windows host memory usage exceeds threshold 1 - 1 * windows_os_physical_memory_free_bytes{job="windows_exporter",mode!

Using Blackbox Exporter to Test Network Connectivity
· ☕ 5 min read
If you need to monitor the network status between two hosts, or between a host and an external service, then the Blackbox Exporter mentioned in this article is worth a try. 1. Installing Blackbox 1.1 Deploying on a Host Download the binary package 1 2 3 4 5 wget https://github.

How to collect labels and annotations of Kubernetes objects
· ☕ 3 min read
1. Why kube-status-metrics is needed Kubernetes monitoring mainly focuses on two kinds of metrics: Basic performance metrics CPU, memory, disk, network, and so on. These can be collected by deploying node-exporter as a DaemonSet and having Prometheus scrape the relevant metrics. Resource object metrics The replica count of a Deployment, the running state of a Pod, and so on.