<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          Prometheus(一)之基礎(chǔ)安裝

          共 2470字,需瀏覽 5分鐘

           ·

          2022-04-23 19:55

          點(diǎn)擊上方藍(lán)色字體,關(guān)注我們

          promethus-header

          一、準(zhǔn)備條件

          Windows10

          go1.15.1.windows-amd64

          二、下載與安裝

          1、下載

          Download | Prometheus,依據(jù)需求選擇對(duì)應(yīng)版本的包,此處選擇 Windows 對(duì)應(yīng)版本 amd64

          Prometheus-Download

          2、解壓文件

          解壓到目標(biāo)安裝目錄,此處為D:\ProgramData\prometheus-2.23.0-rc,解壓之后,目錄結(jié)構(gòu)如下:

                        consoles
          console_libraries
          11,357 LICENSE
          3,420 NOTICE
          89,340,928 prometheus.exe
          926 prometheus.yml
          79,250,432 promtool.exe

          3、修改配置

          解壓路徑中的配置文件為prometheus.yml,系統(tǒng)默認(rèn)的數(shù)據(jù)存儲(chǔ)方式為文件形式,存儲(chǔ)在與執(zhí)行程序prometheus.exe同目錄下的data文件夾中,可以通過(guò)指令--storage.tsdb.path="data/"進(jìn)行數(shù)據(jù)存儲(chǔ)路徑的設(shè)置。

          # my global config
          global:
          scrape_interval: 15s?# Set the scrape interval to every 15 seconds. Default is every 1 minute.
          evaluation_interval:?15s?# Evaluate rules every 15 seconds. The default is every 1 minute.
          # scrape_timeout is set to the global default (10s).

          # Alertmanager configuration
          alerting:
          alertmanagers:
          -?static_configs:
          -?targets:
          # - alertmanager:9093

          # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
          rule_files:
          # - "first_rules.yml"
          # - "second_rules.yml"

          # A scrape configuration containing exactly one endpoint to scrape:
          # Here it's Prometheus itself.
          scrape_configs:
          # The job name is added as a label `job=` to any timeseries scraped from this config.
          -?job_name:?'prometheus'

          # metrics_path defaults to '/metrics'
          # scheme defaults to 'http'.

          static_configs:
          -?targets: ['localhost:9090']

          4、運(yùn)行訪問(wèn)

          cmd 中啟動(dòng) prometheus.exe ,可看到如下輸出:

          level=info ts=2020-11-26T10:36:59.027Z caller=head.go:722 component=tsdb msg="WAL replay completed" checkpoint_replay_duration=0s wal_replay_duration=996.2μs total_replay_duration=1.9937ms
          level=info ts=2020-11-26T10:36:59.028Z caller=main.go:742 fs_type=unknown
          level=info ts=2020-11-26T10:36:59.028Z caller=main.go:745 msg="TSDB started"
          level=info ts=2020-11-26T10:36:59.028Z caller=main.go:871 msg="Loading configuration file" filename=prometheus.yml
          level=info ts=2020-11-26T10:36:59.040Z caller=main.go:902 msg="Completed loading of configuration file" filename=prometheus.yml totalDuration=11.9662ms remote_storage=0s web_handler=0s query_engine=0s scrape=10.969ms scrape_sd=0s notify=0s notify_sd=0s rules=0s
          level=info ts=2020-11-26T10:36:59.040Z caller=main.go:694 msg="Server is ready to receive web requests."

          執(zhí)行成功后訪問(wèn)http://localhost:9090/能夠出現(xiàn)對(duì)應(yīng)頁(yè)面,則表示訪問(wèn)成功。

          Prometheus-Server
          往期推薦


          點(diǎn)擊閱讀原文,更精彩~
          瀏覽 66
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  操屄视频免费在线观看 | 色综合久久88色综合天天看泰 | 欧美性久久 | 国产女人操逼视屏免费播 | 青青青青青欧美在线观视频观看 |