Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
GitLab x Prometheus -Application Performance-
Search
Shingo.Kitayama
November 17, 2017
Technology
0
100
GitLab x Prometheus -Application Performance-
2017/11/17
GitLab Meetup Tokyo #5
https://gitlab-jp.connpass.com/event/69475/
Shingo.Kitayama
November 17, 2017
Tweet
Share
More Decks by Shingo.Kitayama
See All by Shingo.Kitayama
Why we expect the Microservices
shkitayama
2
440
Why run OpenShift on Google Cloud
shkitayama
1
290
Container Replatform 101
shkitayama
4
1.6k
Red Hat OpenShift Platform Plus - Red Hat Summit Connect 2022
shkitayama
0
660
NVIDIA AI Enterprise for Red Hat OpenShift
shkitayama
0
750
Kubernetes CICD Pipelines Book
shkitayama
2
1.9k
Shipwright Overview
shkitayama
0
1.8k
CloudNative CICD in OpenShift Commons Japan
shkitayama
5
18k
The State of Container Security in Red Hat Experience
shkitayama
2
570
Other Decks in Technology
See All in Technology
フォーイット_エンジニア向け会社紹介資料_Forit_Company_Profile.pdf
forit_tech
1
1.7k
AI自体のOps 〜LLMアプリの運用、AWSサービスとOSSの使い分け〜
minorun365
PRO
9
770
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
19k
Snowflake ML モデルを dbt データパイプラインに組み込む
estie
0
110
1行のコードから社会課題の解決へ: EMの探究、事業・技術・組織を紡ぐ実践知 / EM Conf 2025
9ma3r
12
4.4k
Aurora PostgreSQLがCloudWatch Logsに 出力するログの課金を削減してみる #jawsdays2025
non97
1
230
AIエージェント元年@日本生成AIユーザ会
shukob
1
250
ABWG2024採択者が語るエンジニアとしての自分自身の見つけ方〜発信して、つながって、世界を広げていく〜
maimyyym
1
200
JAWS DAYS 2025 アーキテクチャ道場 事前説明会 / JAWS DAYS 2025 briefing document
naospon
0
2.7k
2025/3/1 公共交通オープンデータデイ2025
morohoshi
0
100
Global Databaseで実現するマルチリージョン自動切替とBlue/Greenデプロイ
j2yano
0
150
【内製開発Summit 2025】イオンスマートテクノロジーの内製化組織の作り方/In-house-development-summit-AST
aeonpeople
2
1.1k
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
51
7.4k
GitHub's CSS Performance
jonrohan
1030
460k
How to Ace a Technical Interview
jacobian
276
23k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
The World Runs on Bad Software
bkeepers
PRO
67
11k
The Cult of Friendly URLs
andyhume
78
6.2k
Thoughts on Productivity
jonyablonski
69
4.5k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
How to train your dragon (web standard)
notwaldorf
91
5.9k
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Transcript
GitLab x Prometheus デプロイアプリのPerformance測定 Shingo.Kitayama 2017/11/17 GitLab Meetup Tokyo #5
https://gitlab-jp.connpass.com/event/69475/
Introduction GitLab x Prometheus 2 日本ヒューレット・パッカード株式会社 テクニカルアーキテクト ・オープンソースソリューションの提案 ・コンサルティング、および構築デリバリーを担当 Now
on Sale
Introduction ITmediaエンタープライズ 連載中 3 変化を拒むおっさんに 喝をいれる連載 執筆中!! お仕事の息抜き&気分転換に ご覧ください。
本日のIndex GitLab x Prometheus 4 1. とりあえず理解するPrometheus 2. GitLabとPrometheusの連携 3.
アプリパフォーマンス監視
1. とりあえず理解するPrometheus 5 - What’s Prometheus -
Prometheusとは オープンソースの軽量サービス監視ツール 6 https://qiita.com/tnir/items/7dd63b7baa4299135194 パフォーマンスデータの収集やグラフの表示、アラートなどの通常監視機能に加え、クエリを利用して、CPUの負荷やメモリ、 ストレージの利用率、HTTPのレイテンシなどのメトリクスを計算しグラフ化することも可能。 - Pull型監視 - 監視対象
Prometheus 管理サーバ側から管理対象に情報をリクエストし、ステータスを収集する方法。監視対象を完全にコントロールできる 反面、監視対象ホストが増えるたびに管理サーバの設定ファイルを更新する必要があります。 情報収集 リクエスト
Prometheusの仕組み Prometheus Architecture 7 監視対象 Prometheus Server Retrieval PromQL ローカル
ストレージ Storage 監視対象プロセス Exporter 情報収集 リクエスト ジョブプログラム PushGateway リクエスト 情報収集 情報送信 Alert manager Web UI ・ Grafana ・ API Client アラート送信 mail slack web hook Expression Browser 『メトリクスの収集/格納』 『アラートの通知』 『クエリの返答』
Prometheus Exporters メトリクスの収集 8 監視対象 node exporter mysqld exporter mysql
監視対象 既存の監視メトリックをPrometheusメトリックとしてエクスポートするのに役立つライブラリ。 http://target.local:9100/metrics - job_name: node static_configs: - targets: - ":9100" Prometheus Server
2. GitLabとPrometheusの連携 9 - Prometheus within GitLab -
GitLabにおけるPrometheusの用途 Omnibus GitLabに付随しているPrometheusはGitLab管理用途 10 GitLabのプロセスステータス管理用Prometheus GitLabでデプロイしたアプリの パフォーマンス測定用Prometheus Omnibus GitLabに付随しているPrometheusでは、GitLab上で利用するプロセスのステー タスチェックを行う。
個別にExporterを用意することによって、Environmentに配置したアプリケーションのパフォー マンスチェックを動的に行う。
GitLabのプロセスステータス管理用Prometheus Exporters for Process Status 11 Exporters ステータス内容 ポート Node
exporter メモリ、ディスク、CPU使用率などのマ シンリソースの測定 localhost:9100 Redis exporter Redisプロセスのリソース測定 localhost:9121 Postgres exporter ProstgreSQLプロセスのリソース測定 localhost:9187 GitLab monitor exporter DatabaseやGit、SidekiqなどのGitLab に関するリソース測定 localhost:9168
GitLabのプロセスステータス管理用Prometheus http://gitlab.example.com/-/metrics?token=$token_id 12
GitLabでデプロイしたアプリのパフォーマンス測定用Prometheus サポートメトリクス 13 Exporters Support Metric Kubernetes Average Memory Usage
(MB) Average CPU Utilization (%) NGINX VTS exporter Throughput (req/sec) Latency (ms) HTTP Error Rate (HTTP Errors / sec) NGINX Ingress Controller Throughput (req/sec) Latency (ms) HTTP Error Rate (HTTP Errors / sec) HAProxy Throughput (req/sec) HTTP Error Rate (%) Amazon Cloud Watch Throughput (req/sec) Latency (ms) HTTP Error Rate (%)
3. アプリパフォーマンス監視 14 - Performance Monitoring -
アプリケーションデプロイメント Sample Application 15
Application構成 デプロイメント構成 16 Docker Engine Prometheus Server GitLab 情報収集 リクエスト
http://haproxy:8080/admin?stats HAProxy Exporter http://gitlab-runner01:9101/metrics HAProxy Tomcat ユーザー アクセス - job_name: review-develop-33z241 static_configs: - targets: - gitlab-runner01:9101 relabel_configs: - source_labels: - job target_label: environment
Demo 17 でも(時間があったら
Environment Monitoring $CI_ENVIRONMENT_SLUG 18 Environment = $CI_ENVIRONMENT_SLUG
19 Thank you