国产片侵犯亲女视频播放_亚洲精品二区_在线免费国产视频_欧美精品一区二区三区在线_少妇久久久_在线观看av不卡

服務器之家:專注于服務器技術及軟件下載分享
分類導航

云服務器|WEB服務器|FTP服務器|郵件服務器|虛擬主機|服務器安全|DNS服務器|服務器知識|Nginx|IIS|Tomcat|

服務器之家 - 服務器技術 - Nginx - Prometheus監控實戰篇Nginx、Hbase操作詳解

Prometheus監控實戰篇Nginx、Hbase操作詳解

2022-02-28 23:27袁勝的博客 Nginx

這篇文章主要介紹了Prometheus監控實戰篇Nginx、Hbase,本文通過圖文并茂的形式給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下

 

一、Prometheus監控Nginx

 

1、監控Nginx相關插件下載地址

nginx_exporter下載地址
Nginx_module-vts下載地址
nginx-release下載地址

Prometheus(8.3.3)和grafana(2.32.1)我使用的是官網最新版

 

2、編譯Nginx

注意:我這邊是使用rpm安裝的Nginx。所以要進行編譯一下,可以根據自己的實際情況進行操作

 

2.1 下載 nginx-release 并解壓

如果有這兩個目錄將其刪除掉

rm -rf Makefile objs

Prometheus監控實戰篇Nginx、Hbase操作詳解

 

2.2 解壓 Nginx-module-vts,到/opt/nginx/

Prometheus監控實戰篇Nginx、Hbase操作詳解

 

2.3 執行以下命令,進行編譯Nginx

./configure --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-compat --with-debug --with-file-aio --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_degradation_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module=dynamic --with-http_mp4_module --with-http_perl_module=dynamic --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-http_xslt_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-stream_ssl_preread_module --with-threads --with-cc-opt="-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic" --with-ld-opt="-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E" --add-module=/opt/nginx/nginx-module-vts-0.1.18

 

2.4 再執行 make 命令

注意: 不要執行make install

make

2.5 將編譯后的二進制文件以及模塊放到對應的目錄下,并將原來的做備份

Prometheus監控實戰篇Nginx、Hbase操作詳解

Prometheus監控實戰篇Nginx、Hbase操作詳解

Prometheus監控實戰篇Nginx、Hbase操作詳解

 

2.6 在Nginx 添加以下內容到Nginx配置文件中

location /status {
    vhost_traffic_status_display;
    vhost_traffic_status_display_format html;
}

 

2.7 重新啟動Nginx,并檢查服務是否正常

http://127.0.0.1:80/status/

Prometheus監控實戰篇Nginx、Hbase操作詳解

 

2.8 解壓Nginx-vts-exporter,并啟動

Prometheus監控實戰篇Nginx、Hbase操作詳解

啟動nginx-vts-exporter(默認端口為9913)

nohup ./nginx-vts-exporter -nginx.scrape_uri=http://127.0.0.1:80/status/format/json &

 

2.9 在Prometheus中添加Nginx-vts-exporter,并重啟Prometheus

vim promethues.yml
  - job_name: "nginx_exporter"
    static_configs:
      - targets: ["localhost:9913"]

 

2.10 在grafana 中添加模塊 使用的模塊是2949,也可以自己定義

Prometheus監控實戰篇Nginx、Hbase操作詳解

Prometheus監控實戰篇Nginx、Hbase操作詳解

數據展示

Prometheus監控實戰篇Nginx、Hbase操作詳解

 

二、Prometheus監控hbase

 

1. 監控hbase插件下載地址

jmx_prometheus_javaagent
grafana模塊

 

2. 部署

 

2.1 將下載好的jmx_prometheus_javaagent 移動到hbase的lib下

Prometheus監控實戰篇Nginx、Hbase操作詳解

 

2.2 配置 hbase_jmx_config.yaml

vim /usr/hbase/conf/ hbase_jmx_config.yaml

---
lowercaseOutputName: true
lowercaseOutputLabelNames: true
rules:
- pattern: Hadoop<service=HBase, name=RegionServer, sub=Regions><>Namespace_([^W_]+)_table_([^W_]+)_region_([^W_]+)_metric_(w+)
  name: HBase_metric_$4
  labels:
    namespace: "$1"
    table: "$2"
    region: "$3"
- pattern: Hadoop<service=(w+), name=(w+), sub=(w+)><>([w._]+)
  name: hadoop_$1_$4
  labels:
    "name": "$2"
    "sub": "$3"
- pattern: .+

Prometheus監控實戰篇Nginx、Hbase操作詳解

 

2.3 在hbase-env.sh 中添加以下參數,并重啟hbase

注意:分別在master和regionserver 都要添加,但是要注意端口不可以相同。(每臺服務都做以上操作)

master

-javaagent:$HBASE_HOME/lib/jmx_prometheus_javaagent-0.16.1.jar=17000:$HBASE_HOME/conf/hbase_jmx_config.yaml

regionserver

-javaagent:$HBASE_HOME/lib/jmx_prometheus_javaagent-0.16.1.jar=18000:$HBASE_HOME/conf/hbase_jmx_config.yaml

Prometheus監控實戰篇Nginx、Hbase操作詳解

 

2.4 查看是否采集數據

http://127.0.0.1:17000/metrics

Prometheus監控實戰篇Nginx、Hbase操作詳解

 

2.5 配置Prometheus server,并重啟服務

IP地址根據實際情況改寫

vim prometheus.yml
  - job_name: "hbase_exporter"
    static_configs:
      - targets: ["127.0.0.1:17000"]
      - targets: ["127.0.0.1:18000"]
      - targets: ["127.0.0.1:18000"]
      - targets: ["127.0.0.1:18000"]
      - targets: ["127.0.0.1:18000"]

 

2.6 在granfan中添加模塊

grafana模塊

Prometheus監控實戰篇Nginx、Hbase操作詳解

Prometheus監控實戰篇Nginx、Hbase操作詳解

數據展示

Prometheus監控實戰篇Nginx、Hbase操作詳解

到此這篇關于Prometheus監控實戰篇Nginx、Hbase的文章就介紹到這了,更多相關Prometheus監控Nginx、Hbase內容請搜索服務器之家以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持服務器之家!

原文地址:https://blog.csdn.net/yuansheng730/article/details/123114061

延伸 · 閱讀

精彩推薦
主站蜘蛛池模板: 天天操网 | 美女久久久久 | 国产成人精品一区二区三区四区 | 97久久精品 | 播放欧美一级片 | 免费一区二区 | 亚州国产精品视频 | 亚洲一区二区三区高清 | 久久九九免费 | 日本中文字幕在线观看 | 亚洲国产视频网站 | 久久精品国产v日韩v亚洲 | av一区二区三区免费观看 | 一区视频在线 | 黄色网页在线观看 | 四虎永久在线观看 | 国产xxxx成人精品免费视频频 | 一级毛片观看 | 一级毛片一级毛片一级毛片 | 国产精品3区 | 欧美成人激情视频 | 91在线免费观看 | 中文字幕国产 | 日本不卡高字幕在线2019 | 中文在线一区二区 | 日韩精品在线播放 | 色综合中文 | 一区二区三区精品 | 欧美一区二区视频免费观看 | 国产精品国产三级国产aⅴ中文 | 成人免费毛片在线观看 | 久久久久国产精品免费 | 久久精品国产91精品亚洲高清 | 国产一级在线 | 在线观看一区 | 亚洲精品成人av久久 | 日韩一区二区免费电影 | 中文字幕综合在线 | 日本黄色片免费看 | 国产在线中文字幕 | 国产一区二区在线视频 |