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
OCI ロギングでカスタム・ログを収集する
Search
yukitkns
February 20, 2024
Programming
920
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
OCI ロギングでカスタム・ログを収集する
yukitkns
February 20, 2024
Transcript
20 slides
「OCI ロギングでカスタム・ログを収集する」 株式会社 CLOUDII 高梨 祐樹 1
⾃⼰紹介 y.takanashi 「Cloudii ブログ」で検索︕ @yukitkns_ yukitkns yukitkns ⾼梨 祐樹 株式会社
Cloudii クラウドエンジニア 2
半年で3回⽬の登壇︕ 3 2023年9⽉ #44 「夏休みの⾃由研究振り返り&セキュリティ特集」 2023年12⽉ #47 「2023忘年LT⼤会」
本⽇の内容 4 https://cloudii.jp/news/blog/oracle-cloud/custom-log/
当ブログの構成について lカスタム・ログの作成 lIAMユーザー、IAMグループ、ポリシーの作成 lRPMファイルの取得 lエージェントの導⼊ l認証情報の配置 lカスタム・ログの作成 lカスタム・ログの設定変更 l設定変更 l動作確認
今回はこちらのみをご紹介︕ 5
設定変更の全体地図 OCIのロギングの設定変更後、⼿動で内容更新をできるようになること OCI ロギング OS OCI ロギング ︖ ファイル・パスを 「/var/log/*」→
「/var/log/messages」 に変更 「/var/log/messages」 のログが表⽰ 6
デモの環境 lブログ内の環境と同構成を採⽤ l対象リソース︓OCIのコンピュート・インスタンス lOS︓Oracle Linux 9 lシェイプ・タイプ︓VM.Standard.E5.Flex l⽂字コード︓UTF-8 ※デモのため、FWはオールパスのルールを使⽤ 7
作業に⼊ります︕💪 8
1︓エージェントの「編集」を選択 9
2:任意のパス(ここでは 「/var/log/messages」)に変更 10
3:エージェントのステータスが「更新中」→ 「アクティブ」に遷移後、設定が変更される。 11
4:以下のログが出⼒されている事を確認 ljournalctl -u unified- monitoring- agent_config_downloader. service l <source>内のpath︓収集対象のファイ ル・パス
※設定変更後のファイル・パスになっている事を 確認 l fluentd outputが"true"︓Fluentdへ の出⼒が完了 ※"false"と表⽰される場合は、エージェント構 成の設定が間違っている可能性が⾼く、構成の ⾒直しを推奨 12
5:以下のコマンドで、 Fluentdの設定内容を確認 lcat /etc /unified-monitoring- agent/conf.d/fluentd_config/fluentd.conf l<source>内の「path」が変更後のファイル・パスとして表⽰されることを確認 13
6:以下のコマンドでunified-monitoring- agent.serviceの再起動を実⾏ lsudo systemctl restart unified-monitoring-agent.service 14
7. /var/log/unified-monitoring-agent/unified- monitoring-agent のログを確認 l/var/log/unified- monitoring-agent/unified- monitoring-agent l file DEFAULT_CONFIG_FILE,
<認証 ファイルを格納しているパス>︓認証情報が配 置されているパスを表⽰ l <source>内のpath︓収集対象のファイル・ パス ※設定変更後のファイル・パスになっている事を 確認 l following tail of /var/log /messages︓ファイル・パスで設 定したログの収集を開始 15
8.以下のコマンドで /var/log/messages にログを出⼒。 llogger "This is a test message." 16
9. /var/log/unified-monitoring-agent/unified- monitoring-agent のログを再度確認 l以下のログが出⼒されている事を確認 lput_logs request with log_object_id <収集したログのOCID>︓収集したログを
カスタム・ログに転送 lresponse 200 id︓転送が成功 17
10. カスタム・ログにloggerコマンドで出⼒したログが表⽰され、 設定変更が完了となる 18
設定変更の全体地図 OCIのロギングの設定変更後、⼿動で内容更新をできるようになること OCI ロギング OS OCI ロギング 1.unified-monitoring- agent_config_downloader.service を起動
2.unified-monitoring- agent_config_downloader.service のログを確認 3./etc/unified-monitoring-agent/conf.d/ fluentd_config/fluentd.conf を確認 4.unified-monitoring-agent.serviceを再起動 5.unified-monitoring-agent のログを確認 6.カスタム・ログに変更内容後のログが出⼒され、設定変更が完了 ファイル・パスを 「/var/log/*」→ 「/var/log/messages」 に変更 「/var/log/messages」 のログが表⽰される 19
ご清聴いただきありがとうございました。👏 20
More Decks by yukitkns
See All by yukitkns
Let's EncryptでSSL証明書を自動更新
yukitkns
1
78
OCI Stack Monitoringでリソース監視をする
yukitkns
1
1.1k
WAFログの推奨ルールを確認する
yukitkns
0
69
多段接続について
yukitkns
0
85
「寺子屋Oracle Cloud:Win Story研究会『ハイブリッドクラウド・マルチクラウド』」に参加してみて
yukitkns
1
220
開発未経験者がはじめて DevOpsを触ってみた
yukitkns
0
200
「寺子屋Oracle Cloud:Win Story研究会『OCVSのリフト案件』」に参加してみて
yukitkns
0
220
ここがスゴいよ、OCM!!
yukitkns
1
190
Other Decks in Programming
See All in Programming
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
220
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
140
Secure Your Coding Agent Like It’s Malware (v1.5) 🇬🇧 @Code.talks 2026
richargh
0
200
AI時代のFlutter品質設計 — アプリ品質を守るQuality Layers
omatty198
0
390
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
260
仕様駆動開発入門 (何を作るかを先に決めて渡す) | 目指せ Kiro マスター 05
inariku
PRO
3
220
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
610
なぜ私たちは「現時点では」KMPの導入を見送ったのか
chigichan24
1
630
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
6.2k
JavaScriptはシングルバイナリの夢を見るか / Does JavaScript Dream of a Single Binary?
ssssota
0
180
祈るテストから、探索するテストへ 〜Lincheckではじめる並行処理テスト〜
yyh_gl
0
430
Stage 3でも仕様は変わる。アプリケーション開発者のためのTC39プロセスの読み方
bicstone
1
130
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
331
22k
How to Ace a Technical Interview
jacobian
280
24k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Leo the Paperboy
mayatellez
11
2.5k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
6
970
Skip the Path - Find Your Career Trail
mkilby
1
300
Abbi's Birthday
coloredviolet
5
11k
Darren the Foodie - Storyboard
khoart
PRO
5
4.1k
We Are The Robots
honzajavorek
0
460
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
380