Build and run locally
$ git clone https://github.com/oliver006/redis_exporter.git
$ cd redis_exporter
$ go build .
$ nohup /home/sw/redis_exporter/redis_exporter &
开机运行
$ sudo vim /etc/systemd/system/redis_exporter.service
[Unit]
Description=redis exporter
After=network.target
[Service]
Type=simple
ExecStart=/home/sw/redis_exporter/redis_exporter
[Install]
WantedBy=multi-user.target
$ sudo systemctl enable redis_exporter.service; sudo systemctl start redis_exporter.service; sudo systemctl status redis_exporter.service
Basic Prometheus Configuration
Add a block to the scrape_configs
of your prometheus.yml config file:
scrape_configs:
- job_name: redis_exporter
static_configs:
- targets: ['<<REDIS-EXPORTER-HOSTNAME>>:9121']
and adjust the host name accordingly.
See Metrics from Grafana
Grafana Dashboard for Redis: https://grafana.com/grafana/dashboards/763
Trigger some Redis call:
$ redis-benchmark -n 1000000 -r 10000000 -q -h 192.168.2.204
Reference
FEATURED TAGS
algorithm
algorithmproblem
architecturalpattern
architecture
aws
c#
cachesystem
codis
compile
concurrentcontrol
database
dataformat
datastructure
debug
design
designpattern
distributedsystem
django
docker
domain
engineering
freebsd
git
golang
grafana
hackintosh
hadoop
hardware
hexo
http
hugo
ios
iot
java
javaee
javascript
kafka
kubernetes
linux
linuxcommand
linuxio
lock
macos
markdown
microservices
mysql
nas
network
networkprogramming
nginx
node.js
npm
oop
openwrt
operatingsystem
padavan
performance
programming
prometheus
protobuf
python
redis
router
security
shell
software testing
spring
sql
systemdesign
truenas
ubuntu
vmware
vpn
windows
wmware
wordpress
xml
zookeeper