Posts
Granafa Host Monitoring Configuration
· β˜• 2 min read
1. Install node exporter 1 2 3 wget https://github.com/prometheus/node_exporter/releases/download/v1.3.1/node_exporter-1.3.1.linux-amd64.tar.gz tar xvfz node_exporter-1.3.1.linux-amd64.tar.gz mv node_exporter-1.3.1.linux-amd64/node_exporter /usr/local/bin/ If you cannot reach GitHub, refer to: Several ways to access GitHub from mainland China . 2. Configure and start the exporter Add a Systemd configuration 1 vim /etc/systemd/system/node_exporter.service Add the following content: 1 2 3 4 5 6 7 8 9 10 11 12 [Unit] Description=Node Exporter After=network.

Reading Btrfs Partition Files on MacOS
· β˜• 3 min read
1. Background and Prerequisites Compared with Ext4, Btrfs is a younger file system with more features to play with β€” snapshots, subvolumes, checksum self-verification, software RAID, and even transparent compression. That said, if you do not have the operations capability behind you, it is best not to use Btrfs. This article records the process of pulling a Btrfs disk out of a Synology DSM system and reading its data.

Problems Using Go mod
· β˜• 1 min read
1. go.sum Version Mismatch After Upgrading Go Running the command go build reports an error. Error message: missing go.sum entry for module providing package golang.org/x/time/rate; to add Solution: Update go.sum before go build by running the command go mod tidy. 2. TLS Error Running the command go mod download reports an error.

Common Commands for Cleaning Up Kubernetes Cluster Resources
· β˜• 4 min read
Clusters that run for a long time often face various kinds of resource exhaustion. On top of that, when disk space runs low, Kubelet will proactively clean up images on its own, adding another source of uncertainty. This article provides some command snippets for cleanup work. 1. Cleaning Up Basic Kubernetes Objects Clean up Pods in Evicted state 1 sudo kubectl get pods --all-namespaces -o wide | grep Evicted | awk '{print $1,$2}' | sudo xargs -L1 kubectl delete pod -n Clean up Pods in Error state 1 sudo kubectl get pods --all-namespaces -o wide | grep Error | awk '{print $1,$2}' | sudo xargs -L1 kubectl delete pod -n Clean up Pods in Completed state 1 sudo kubectl get pods --all-namespaces -o wide | grep Completed | awk '{print $1,$2}' | sudo xargs -L1 kubectl delete pod -n Clean up unused PVs 1 sudo kubectl describe -A pvc | grep -E "^Name:.

Logstash Configuration Basics
· β˜• 4 min read
1. How Logstash Works Logstash is a component for data transport and processing. Through combinations of plugins, Logstash can handle a wide variety of log collection scenarios: logstash->elasticsearch filebeat->logstash->elasticsearch filebeat->kafka->logstash->elasticsearch filebeat->redis->logstash->elasticsearch 2. Basic Logstash Configuration Here is the format of a Logstash configuration: 1 2 3 4 5 6 7