成人免费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

2013-04-12 13:30:47

2016-04-06 10:02:23

手機微博運維監控

2023-10-11 09:58:07

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

運維應用監控

2019-05-06 10:35:49

運維監控白盒

2019-09-28 23:17:41

zabbix運維監控

2019-06-06 08:50:08

運維監控工具
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 婷婷久久一区 | 亚洲美女网站 | 91看片在线观看 | 色综合视频 | 交专区videossex农村 | 午夜成人免费视频 | 99视频入口| 91视频三区 | 日操夜操 | 羞羞视频免费在线观看 | 在线观看精品视频网站 | 国产精品呻吟久久av凹凸 | 国产香蕉视频在线播放 | 亚洲精品免费在线 | 国产精品久久久久久久久久 | 欧美性一区二区三区 | 成人精品一区二区三区中文字幕 | 亚洲成人一区 | 天堂在线www | 成人精品一区二区三区 | xx性欧美肥妇精品久久久久久 | 亚洲444eee在线观看 | 91久久精品国产 | 日韩av在线免费 | 久久高潮 | 欧美一区二区三区一在线观看 | 午夜精品一区二区三区在线视频 | 四虎影院一区二区 | 一区二区成人 | 不卡一二区| 亚洲成人一区 | 玖玖爱365| 999热在线视频 | 亚洲天堂久久 | 99精品九九 | 久久人人网 | 国产精品一区二区三区在线 | 午夜激情国产 | 久久精品国产亚洲一区二区三区 | 精品欧美乱码久久久久久1区2区 | 日本色综合 |