Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
GitLabサーバーのモニタリング / gitlab server monitoring
Search
Teraoka Yoshinori
April 24, 2019
Technology
3k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
GitLabサーバーのモニタリング / gitlab server monitoring
GitLab server monitoring with Prometheus.
And some server configurations.
Teraoka Yoshinori
April 24, 2019
More Decks by Teraoka Yoshinori
See All by Teraoka Yoshinori
Job に挿入される sidecar を停止させる sidecar を挿入する話
yteraoka
0
200
What is the difference between docker and containerd about logging?
yteraoka
2
1.1k
Prometheus の relabeling
yteraoka
1
19k
Other Decks in Technology
See All in Technology
新卒エンジニア、 介護士になる
ryu1013
1
540
[FECONF-2026] 신대륙을 향한 카카오페이증권 프론트엔드 항해기 (이주승)
l1ghthouse
0
320
デザインレビューは自動化できるのか?─ Flutter × Figma で UI 品質保証を考える
techiro
2
670
Obsidian Vault Architectures
x5gtrn
PRO
0
210
正解のない研修に放り出されて / Being thrown into a training program with no right answers
ohnoeight
1
170
Devin プロモコードの受け取りと適用(2026.10.27)
kinopeee
1
740
バイブコーディングの特徴と「コケて直す」ループ
happysamurai294
0
130
データマネジメント × 法務で作りあげる、 freeeの新しいデータガバナンスへの軌跡
freee
PRO
2
580
ひとりで始めた AI駆動開発、チームに広げて何が変わったのか
kenichiodo
1
160
これだけは抑えておきたい!後悔しない re:Invent の過ごし方 / AWS re:Invent 2026 prestudy
kinunori
2
590
Deep Data Security 機能解説
oracle4engineer
PRO
3
970
Technical Project Manager の役割とやりがい、少しだけ AI
yoshiiryo1
0
360
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
59
7.1k
Faster Mobile Websites
deanohume
310
32k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
A Tale of Four Properties
chriscoyier
163
24k
Speed Design
sergeychernyshev
33
2.2k
Designing for Timeless Needs
cassininazir
1
530
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
590
Optimizing for Happiness
mojombo
378
71k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
880
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
RailsConf 2023
tenderlove
30
1.6k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.3k
Transcript
GitLabサーバーの モニタリング Yoshinori Teraoka 2019.4.24 GitLab Meetup Tokyo #16 @PLAID
自己紹介 エムスリー株式会社 エンジニアリンググループ SREチーム yteraoka yteraoka
自己紹介 ◀ これ書きました autoscale runner のことはこ れ読めばだいたいわかる https://www.m3tech.blog/entry/advent-calendar-2018-2
エムスリーと GitLab ユーザーの作成日時を見ると 2012年7月~(っぽい) 当然タヌキは昔のやつ 当時はまだ Omnibus package はまだ存在しなかったし、DB は
MySQL だった どこかのタイミングで OS 更新に合わせて Omnibus package に変更 現在のプロジェクト数1200超 GitLab CI, GitLab Pages, Review Apps 使ってます
今日はモニタリングの話
Agenda • Prometheus の活用 • 私の欲しかったもの • gitlab.rb 見てますか?
Prometheus Monitoring GitLab with Prometheus https://docs.gitlab.com/ce/administration/monitoring/prometheus/ GitLab 9.0 以降では有効になっているはず 初期は有効にしていると問題があったので弊社ではながらく無効にしていました
Prometheus Expoters • GitLab monitor exporter ◦ database (:9168/database) ◦
process (:9168/process) ◦ sidekiq (:9168/sidekiq) • Node exporter (:9100/metrics) • Redis exporter (:9121/metrics) • Postgres exporter (:9187/metrics) • Nginx exporter (:8060/metrics) • Gitaly exporter (:9236/metrics) • GitLab Sidekiq exporter (:8082/metrics) • GitLab Workhorse exporter (:9229/metrics) • GitLab Unicorn (:8080/-/metrics)
Grafana Dashboard Grafana Dashboard Repository がある https://gitlab.com/gitlab-org/grafana-dashboards Omnibus package 用
https://gitlab.com/gitlab-org/grafana-dashboards/tree/master/omnibus (でも別にこれ使う必要はないし、必要なものを自分で作ったほうが良い)
Overview Dashboard
コレジャナイ感... Overview だけじゃなくて他にもいくつかあるし、必要なら自分で Dashboard も作れ ば良いのだが、何かあったら見ればよいメトリクスで、 GitLab で普段見る必要がある ようなものではない 私が欲しかったものは
GitLab CI の待ち時間が知りたかった Runner 不足があるなら早く気づいて対処したい (実はまだ autoscale Runner 導入してない) しかし、Job
の状況を確認できるメトリクスが見つからない 無かったら作るしかない
GitLab CI の待ち時間が知りたかった node_exporter には Textfile Collector という機能があり、デフォルトで --collector.textfile.directory=/var/opt/gitlab/node-exporter/textfile_collector というオプションが指定してある
このディレクトリに .prom という拡張子でテキストファイルを置けばメトリクスとして取得 可能になる DB から定期的に取りだしてファイルに書き出すようにしました
GitLab CI の待ち時間が知りたかった こんなのが見れるようになった 赤い横線は Grafana のアラートの閾値
GitLab には Prometheus の alertmanager も含まれているが Grafana でやるとグラフ付きで Slack に送れます
入門 Prometheus 良さそうな本が出るみたいです 2019/05/18 発売 自分の見たい情報は自分で Dashboard 作るのが良い。 Grafana のサイトに共有されているものが参考になる。
モニタリングだけじゃ時間が余りそうなので...
gitlab.rb 見てますか? Omnibus package では /etc/gitlab/gitlab.rb にあり chef を使ったセットアップのための 変数定義がされています。
yum update ではこれは更新されずに新機能はデフォルト値でセットアップされます。 カスタマイズしたい場合は /opt/gitlab/etc/gitlab.rb.template をもとに更新しましょう。 Release note に書かれていない新機能が見つかるはずです。
S3 利用の拡大 利用者が増えるとストレージの容量を気にする必要がでてきますが S3 もしくはその互換ストレージにファイルを保存できるものが増えてます • Backup • LFS •
MergeRequest の diff • Artifacts (CI の生成物保存) • Uploads (Avatar 画像や添付ファイル) • Container registry
Rack Attack かつてデフォルトで有効になっていましたが、オンプレ GitLab の導入理由を考えたらデ フォルトでは無効の方が良かったということでしょう。 インターネットに公開する場合は有効にしましょう。
Unicorn worker killer GitLab には unicorn worker killer が組み込まれています。かつて、この値が弊社環境 には小さすぎたため頻繁に
woker が kill されて遅いという問題がありました。気になる 場合はログを確認して unicorn['worker_memory_limit_min'] unicorn['worker_memory_limit_max'] を調整しましょう。
まとめ • GI の待ち時間を減らしたい ◦ 可視化したので効果も見える ◦ autoscale させるぞ •
gitlab.rb の差分をちょいちょい見ておくと良いですよ • GitLab CI (gitlab-ci.yml) のドキュメントもときどき見直すと発見がある