成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

運維監控系統之Prometheus redis監控

運維 系統運維 Redis
redis_exporter就是為了收集redis服務指標的應用。

 簡介

redis_exporter就是為了收集redis服務指標的應用。


下載運行

  1. wget -c -t 100 https://github.com/oliver006/redis_exporter/releases/download/v1.15.0/redis_exporter-v1.15.0.linux-amd64.tar.gz 
  2.  
  3. tar zxvf   redis_exporter-v1.15.0.linux-amd64.tar.gz 
  4.  
  5. cd redis_exporter-v1.15.0.linux-amd64 
  6.  
  7. ./redis_exporter 

  1. INFO[0000] Redis Metrics Exporter v1.15.0    build date: 2020-12-27-18:57:05    sha1: 43ec65f7a22041e64ec557291c36500d04c6f6b0    Go: go1.15.6    GOOS: linux    GOARCH: amd64  
  2. INFO[0000] Providing metrics at :9121/metrics   

 默認端口是9121,默認鏈接是redis://localhost:6379


如果設置了密碼,就需要在執行的時候,指定密碼

  1. ./redis_exporter -redis.addr 'redis://localhost:6379'   -redis.password  redispassword 

查看更多參數

  1. ./redis_exporter -h 

  1. Usage of ./redis_exporter: 
  2.   -check-key-groups string 
  3.         Comma separated list of lua regex for grouping keys 
  4.   -check-key-groups-batch-size int 
  5.         Check key groups batch size hint for the underlying SCAN (default 10000) 
  6.   -check-keys string 
  7.         Comma separated list of key-patterns to export value and length/size, searched for with SCAN 
  8.   -check-single-keys string 
  9.         Comma separated list of single keys to export value and length/size 
  10.   -check-single-streams string 
  11.         Comma separated list of single streams to export info about streams, groups and consumers 
  12.   -check-streams string 
  13.         Comma separated list of stream-patterns to export info about streams, groups and consumers, searched for with SCAN 
  14.   -config-command string 
  15.         What to use for the CONFIG command (default "CONFIG"
  16.   -connection-timeout string 
  17.         Timeout for connection to Redis instance (default "15s"
  18.   -count-keys string 
  19.         Comma separated list of patterns to count, eg: 'db3=sessions:*'. Warning: The exporter runs SCAN to count the keys. 
  20.   -debug 
  21.         Output verbose debug information 
  22.   -export-client-list 
  23.         Whether to scrape Client List specific metrics 
  24.   -export-client-port 
  25.         Whether to include the client's port when exporting the client list. Warning: including the port increases the number of metrics generated and will make your Prometheus server take up more memory 
  26.   -include-system-metrics 
  27.         Whether to include system metrics like e.g. redis_total_system_memory_bytes 
  28.   -is-tile38 
  29.         Whether to scrape Tile38 specific metrics 
  30.   -log-format string 
  31.         Log format, valid options are txt and json (default "txt"
  32.   -max-distinct-key-groups int 
  33.         The maximum number of distinct key groups with the most memory utilization to present as distinct metrics per database, the leftover key groups will be aggregated in the 'overflow' bucket (default 100) 
  34.   -namespace string 
  35.         Namespace for metrics (default "redis"
  36.   -ping-on-connect 
  37.         Whether to ping the redis instance after connecting 
  38.   -redis-only-metrics 
  39.         Whether to also export go runtime metrics 
  40.   -redis.addr string 
  41.         Address of the Redis instance to scrape (default "redis://localhost:6379"
  42.   -redis.password string 
  43.         Password of the Redis instance to scrape 
  44.   -redis.user string 
  45.         User name to use for authentication (Redis ACL for Redis 6.0 and newer) 
  46.   -script string 
  47.         Path to Lua Redis script for collecting extra metrics 
  48.   -set-client-name 
  49.         Whether to set client name to redis_exporter (default true
  50.   -skip-tls-verification 
  51.         Whether to to skip TLS verification 
  52.   -tls-ca-cert-file string 
  53.         Name of the CA certificate file (including full path) if the server requires TLS client authentication 
  54.   -tls-client-cert-file string 
  55.         Name of the client certificate file (including full path) if the server requires TLS client authentication 
  56.   -tls-client-key-file string 
  57.         Name of the client key file (including full path) if the server requires TLS client authentication 
  58.   -tls-server-cert-file string 
  59.         Name of the server certificate file (including full path) if the web interface and telemetry should use TLS 
  60.   -tls-server-key-file string 
  61.         Name of the server key file (including full path) if the web interface and telemetry should use TLS 
  62.   -version 
  63.         Show version information and exit 
  64.   -web.listen-address string 
  65.         Address to listen on for web interface and telemetry. (default ":9121"
  66.   -web.telemetry-path string 
  67.         Path under which to expose metrics. (default "/metrics"

 部署腳本


  1. #!/bin/bash 
  2.  
  3. VERSION="1.15.0" 
  4.  
  5. wget  -t 100  -c  https://github.com/oliver006/redis_exporter/releases/download/v${VERSION}/redis_exporter-${VERSION}.linux-amd64.tar.gz 
  6.  
  7. if [ ! -e redis_exporter-${VERSION}.linux-amd64.tar.gz ] 
  8. then 
  9.     echo "安裝包下載失敗" 
  10.     exit 1 
  11. fi 
  12. tar xvfz redis_exporter-${VERSION}.linux-amd64.tar.gz -C /opt/ 
  13. cd /opt 
  14. ln -s redis_exporter-${VERSION}.linux-amd64  redis_exporter 
  15. cat > /etc/systemd/system/redis_exporter.service <<EOF 
  16.  
  17. [Unit] 
  18. Description=redis_exporter 
  19. After=network.target 
  20.  
  21. [Service] 
  22. Type=simple 
  23. WorkingDirectory=/opt/redis_exporter 
  24. ExecStart=/opt/redis_exporter/redis_exporter -redis.addr redis://localhost:6379   -redis.password  redispassword 
  25. LimitNOFILE=65536 
  26. PrivateTmp=true 
  27. RestartSec=2 
  28. StartLimitInterval=0 
  29. Restart=always 
  30.  
  31. [Install] 
  32. WantedBy=multi-user.target 
  33. EOF 
  34.  
  35.  
  36. systemctl daemon-reload 
  37.  
  38. systemctl enable redis_exporter 
  39. systemctl start redis_exporter 

 prometheus配置

添加下面的job

  1. - job_name: 'redis' 
  2.  
  3.    # metrics_path defaults to '/metrics' 
  4.    # scheme defaults to 'http'
  5.  
  6.    static_configs: 
  7.    - targets: ['localhost:9121'

 配置好以后,reload一下prometheus就可以加載

  1. kill -HUP [promethues_pid] 

指標展示

指標可以通過prometheus的WebUI進行查看

  1. http://[promethe server ip]:9090 

如果需要畫圖,可以直接使用grafana,有人已經配置好了圖形可以通過grafana官方下的dashboard搜索redis_exporter,配置好prometheus數據源,直接導入grafana就可以直接展示了。


 

責任編輯:姜華 來源: 今日頭條
相關推薦

2020-12-29 10:45:22

運維Prometheus-監控

2020-12-28 10:13:32

運維Prometheus監控

2021-07-07 05:46:46

運維監控Prometheus

2020-12-17 09:25:46

運維Prometheus監控

2020-12-30 05:34:25

監控PrometheusGrafana

2022-07-11 13:43:51

Prometheus監控

2011-03-21 14:43:42

2023-10-11 09:58:07

2013-04-12 13:30:47

2016-04-06 10:02:23

手機微博運維監控

2014-07-22 10:06:43

運維監控虛擬化

2018-09-27 08:59:29

2011-03-25 13:54:00

Nagios

2010-07-09 12:09:34

IT運維Mocha BSM摩卡軟件

2011-01-05 15:39:44

2015-09-23 16:46:54

架構監控運維自動化

2022-02-08 10:21:17

運維應用監控

2022-11-08 00:00:00

監控系統Prometheus

2019-05-06 10:35:49

運維監控白盒

2019-06-06 08:50:08

運維監控工具
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 麻豆av免费观看 | 一级女毛片| 成人在线网 | 99re热精品视频 | 婷婷二区 | 久久久精彩视频 | 国产精品久久久久久久岛一牛影视 | 精品久久久久久久久久久院品网 | 一区天堂 | 久久福利网站 | 超碰在线97国产 | 91日韩| 视频一区二区国产 | 日日干夜夜草 | 国产精品日韩欧美一区二区三区 | 国产成人叼嘿视频在线观看 | 国产免费观看久久黄av片涩av | 伊人成人免费视频 | 日本中出视频 | 久久久久国产精品一区二区 | av手机在线看 | 欧美日韩精品在线免费观看 | 日韩中文字幕免费在线观看 | 最大av在线 | 老司机67194精品线观看 | 亚洲一区在线观看视频 | 日韩和的一区二区 | 国产a级黄色录像 | 99精品国产一区二区青青牛奶 | 亚洲午夜网 | 97视频在线观看免费 | 国产黄色大片 | 亚洲区视频| 欧美一级在线观看 | 成人老司机 | 中文字幕动漫成人 | 一区二区手机在线 | 久久久久久综合 | 国产亚洲一区精品 | 91中文字幕在线观看 | 日韩av成人 |