0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Grafana Prometheusのセットアップメモ

Last updated at Posted at 2020-03-13

Grafanaインストール

wget https://dl.grafana.com/oss/release/grafana-6.6.2-1.x86_64.rpm
yum install --allowerasing grafana-6.6.2-1.x86_64.rpm
touch /etc/grafana/grafana.ini

Prometheusインストールからサーバー自体のメトリクスのグラフ表示までの単純動作確認
https://prometheus.io/docs/introduction/first_steps/

ローカルのnode-exporterのメトリクス取得とPrometheusでのグラフ表示確認
https://prometheus.io/docs/guides/node-exporter/

GRAFANA SUPPORT FOR PROMETHEUS
https://prometheus.io/docs/visualization/grafana/

起動

/opt/node_exporter-1.0.0-rc.0.linux-amd64/node_exporter &
/opt/prometheus/prometheus-2.17.0-rc.0.linux-amd64/prometheus --config.file=prometheus.yml &
systemctl start grafana-server

ブラウザでの確認
http://192.168.80.131:3000/

全部ローカルでの設定ファイル(prometheus.yml)

# 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=<job_name>` to any timeseries scraped from this config.
  - job_name: 'prometheus'

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

    static_configs:
    - targets: ['localhost:9100']

https://prometheus.io/docs/prometheus/latest/storage/
※ストレージの制約(一か月の月次評価目的の阻害要因)はなさそう。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?