日日操夜夜添-日日操影院-日日草夜夜操-日日干干-精品一区二区三区波多野结衣-精品一区二区三区高清免费不卡

公告:魔扣目錄網(wǎng)為廣大站長提供免費收錄網(wǎng)站服務(wù),提交前請做好本站友鏈:【 網(wǎng)站目錄:http://www.ylptlb.cn 】, 免友鏈快審服務(wù)(50元/站),

點擊這里在線咨詢客服
新站提交
  • 網(wǎng)站:51998
  • 待審:31
  • 小程序:12
  • 文章:1030137
  • 會員:747

Prometheus

Prometheus是一個開源監(jiān)控解決方案,用于收集和聚合指標作為時間序列數(shù)據(jù)。更簡單地說,Prometheus 商店中的每個項目都是一個指標事件,并帶有它發(fā)生的時間戳。

mac 搭建Prometheus

地址:https://prometheus.io/

Mac 安裝

brew install prometheus

默認安裝路徑:

/usr/local/Cellar/prometheus

默認配置文件:

/usr/local/etc/prometheus.yml

啟動

prometheus --config.file=/usr/local/etc/prometheus.yml

訪問:http://localhost:9090

Spring boot 結(jié)合

springboot的web項目,pom依賴:

    <dependencies>
        <!--  web 依賴  -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>

        <dependency>
            <groupId>io.micrometer</groupId>
            <artifactId>micrometer-registry-prometheus</artifactId>
        </dependency>
    </dependencies>

Yml配置文件:

server:
  port: 8080
# 暴露監(jiān)控端點
management:
  endpoints:
    web:
      exposure:
        include: '*'

監(jiān)控端點:
http://127.0.0.1:8080/actuator/prometheus

# HELP executor_queued_tasks The Approximate number of tasks that are queued for execution
# TYPE executor_queued_tasks gauge
executor_queued_tasks{name="applicationTaskExecutor",} 0.0
# HELP executor_pool_max_threads The maximum allowed number of threads in the pool
# TYPE executor_pool_max_threads gauge
executor_pool_max_threads{name="applicationTaskExecutor",} 2.147483647E9
# HELP jvm_gc_pause_seconds Time spent in GC pause
# TYPE jvm_gc_pause_seconds summary
jvm_gc_pause_seconds_count{action="end of major GC",cause="Metadata GC Threshold",} 1.0
jvm_gc_pause_seconds_sum{action="end of major GC",cause="Metadata GC Threshold",} 0.072
jvm_gc_pause_seconds_count{action="end of minor GC",cause="Metadata GC Threshold",} 1.0
jvm_gc_pause_seconds_sum{action="end of minor GC",cause="Metadata GC Threshold",} 0.014
# HELP jvm_gc_pause_seconds_max Time spent in GC pause
# TYPE jvm_gc_pause_seconds_max gauge
jvm_gc_pause_seconds_max{action="end of major GC",cause="Metadata GC Threshold",} 0.0
jvm_gc_pause_seconds_max{action="end of minor GC",cause="Metadata GC Threshold",} 0.0
# HELP jvm_classes_loaded_classes The number of classes that are currently loaded in the JAVA virtual machine
# TYPE jvm_classes_loaded_classes gauge
jvm_classes_loaded_classes 7566.0
# HELP jvm_gc_memory_promoted_bytes_total Count of positive increases in the size of the old generation memory pool before GC to after GC
# TYPE jvm_gc_memory_promoted_bytes_total counter
jvm_gc_memory_promoted_bytes_total 3235200.0
# HELP Tomcat_sessions_active_current_sessions  
# TYPE tomcat_sessions_active_current_sessions gauge
tomcat_sessions_active_current_sessions 0.0
# HELP executor_pool_size_threads The current number of threads in the pool

 

監(jiān)控軟件:Prometheus

 

配置 prometheus.yml

global:
  scrape_interval: 15s
scrape_configs:
  - job_name: "prometheus"
    static_configs:
    - targets: ["localhost:9090"]
  # 創(chuàng)建job 
  - job_name: "tomato-study-prometheus"
    scrape_interval: 5s
    metrics_path: '/actuator/prometheus'
    static_configs:
    - targets: ["localhost:8080"]

重啟 prometheus:
http://localhost:9090/targets

監(jiān)控軟件:Prometheus

 

安裝 grafana

展示各種漂亮的圖表。

Mac 安裝

brew install grafana

默認安裝路徑:

/usr/local/Cellar/grafana/

啟動:

grafana-server --config=/usr/local/etc/grafana/grafana.ini --homepath /usr/local/share/grafana --packaging=brew cfg:default.paths.logs=/usr/local/var/log/grafana cfg:default.paths.data=/usr/local/var/lib/grafana cfg:default.paths.plugins=/usr/local/var/lib/grafana/plugins

注:如需修改默認端口,可修改
/usr/local/etc/grafana/grafana.ini

訪問:http://localhost:3000/ admin/admin

使用前必須更改密碼 admin/123qwe

配置 grafana

grafana只是一個圖表展示工具,必須添加數(shù)據(jù)源,才能讀取到數(shù)據(jù)。

 

監(jiān)控軟件:Prometheus

 


監(jiān)控軟件:Prometheus

 

配置 Grafana DashBoard文件

推薦的 Grafana DashBoard:

JVM (Micrometer)-(https://grafana.com/grafana/dashboards/4701)

Spring Boot 2.1 Statistics -(https://grafana.com/grafana/dashboards/10280)

Node Exporter - (https://grafana.com/grafana/dashboards/8919)

Druid - https://grafana.com/grafana/dashboards/11157

主機基礎(chǔ)監(jiān)控-(
https://grafana.com/grafana/dashboards/9276)

 

監(jiān)控軟件:Prometheus

 


監(jiān)控軟件:Prometheus

 


監(jiān)控軟件:Prometheus

 

最終展示效果:

監(jiān)控軟件:Prometheus

 

分享到:
標簽:監(jiān)控軟件
用戶無頭像

網(wǎng)友整理

注冊時間:

網(wǎng)站:5 個   小程序:0 個  文章:12 篇

  • 51998

    網(wǎng)站

  • 12

    小程序

  • 1030137

    文章

  • 747

    會員

趕快注冊賬號,推廣您的網(wǎng)站吧!
最新入駐小程序

數(shù)獨大挑戰(zhàn)2018-06-03

數(shù)獨一種數(shù)學(xué)游戲,玩家需要根據(jù)9

答題星2018-06-03

您可以通過答題星輕松地創(chuàng)建試卷

全階人生考試2018-06-03

各種考試題,題庫,初中,高中,大學(xué)四六

運動步數(shù)有氧達人2018-06-03

記錄運動步數(shù),積累氧氣值。還可偷

每日養(yǎng)生app2018-06-03

每日養(yǎng)生,天天健康

體育訓(xùn)練成績評定2018-06-03

通用課目體育訓(xùn)練成績評定