<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Prometheuses on Tony Wu&#39;s Blog</title>
    <link>https://tonywu1995.github.io/prometheus/</link>
    <description>Recent content in Prometheuses on Tony Wu&#39;s Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <lastBuildDate>Mon, 31 Oct 2022 21:22:46 +0800</lastBuildDate><atom:link href="https://tonywu1995.github.io/prometheus/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Redis Exporter建立</title>
      <link>https://tonywu1995.github.io/prometheus/redis-exporter/</link>
      <pubDate>Mon, 31 Oct 2022 21:22:46 +0800</pubDate>
      
      <guid>https://tonywu1995.github.io/prometheus/redis-exporter/</guid>
      <description>前言 redis exporter是用來監控Redis一個Prometheus Client，提供相關redis的監控metrics 步驟 建立一個新的folder，命名redis 在redis目錄底下，建立docker-compose.yml docker-compose.yml 底下輸入 version: &amp;#39;3&amp;#39; services: redis: restart: always container_name: redis image: redis:6.2.7-alpine ports: - 6379:6379 redis-exporter: restart: always image: oliver006/redis_exporter:v1.45.0-alpine container_name: redis-exporter ports: - 9121:9121 command: - &amp;#39;--redis.addr=redis://redis-server:6379&amp;#39; 執行docker-compose up -d，redis服務與redis exporter即可啟動
確認redis exporter服務，已經在執行輸入curl http://localhost:9121/metrics
λ curl http://localhost:9121/metrics # HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles. # TYPE go_gc_duration_seconds summary go_gc_duration_seconds{quantile=&amp;#34;0&amp;#34;} 0 go_gc_duration_seconds{quantile=&amp;#34;0.25&amp;#34;} 0 go_gc_duration_seconds{quantile=&amp;#34;0.5&amp;#34;} 0 go_gc_duration_seconds{quantile=&amp;#34;0.75&amp;#34;} 0 go_gc_duration_seconds{quantile=&amp;#34;1&amp;#34;} 0 go_gc_duration_seconds_sum 0 go_gc_duration_seconds_count 0 # HELP go_goroutines Number of goroutines that currently exist.</description>
    </item>
    
    <item>
      <title>Node Exporter建立</title>
      <link>https://tonywu1995.github.io/prometheus/node-exporter/</link>
      <pubDate>Sun, 03 Oct 2021 16:25:57 +0800</pubDate>
      
      <guid>https://tonywu1995.github.io/prometheus/node-exporter/</guid>
      <description>前言 node exporter是用來監控Linux vm的一個Prometheus Client 提供: CPU 使用率、硬碟使用率&amp;hellip; metrics 步驟 安裝Node Exporter在Ubuntu20.04 #!/bin/bash version=&amp;#34;${VERSION:-1.2.2}&amp;#34; arch=&amp;#34;${ARCH:-linux-amd64}&amp;#34; bin_dir=&amp;#34;${BIN_DIR:-/usr/local/bin}&amp;#34; wget &amp;#34;https://github.com/prometheus/node_exporter/releases/download/v$version/node_exporter-$version.$arch.tar.gz&amp;#34; \ -O /tmp/node_exporter.tar.gz mkdir -p /tmp/node_exporter cd /tmp || { echo &amp;#34;ERROR! No /tmp found..&amp;#34;; exit 1; } tar xfz /tmp/node_exporter.tar.gz -C /tmp/node_exporter || { echo &amp;#34;ERROR! Extracting the node_exporter tar&amp;#34;; exit 1; } sudo cp &amp;#34;/tmp/node_exporter/node_exporter-$version.$arch/node_exporter&amp;#34; &amp;#34;$bin_dir&amp;#34; chown root:staff &amp;#34;$bin_dir/node_exporter&amp;#34; sudo cat &amp;lt;&amp;lt;EOF &amp;gt; /etc/systemd/system/node_exporter.service [Unit] Description=Node Exporter After=network.target [Service] Type=simple ExecStart=/usr/local/bin/node_exporter [Install] WantedBy=multi-user.</description>
    </item>
    
  </channel>
</rss>
