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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
yukitkns
February 20, 2024
Programming
900
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
OCI ロギングでカスタム・ログを収集する
yukitkns
February 20, 2024
More Decks by yukitkns
See All by yukitkns
Let's EncryptでSSL証明書を自動更新
yukitkns
1
72
OCI Stack Monitoringでリソース監視をする
yukitkns
1
940
WAFログの推奨ルールを確認する
yukitkns
0
65
多段接続について
yukitkns
0
82
「寺子屋Oracle Cloud:Win Story研究会『ハイブリッドクラウド・マルチクラウド』」に参加してみて
yukitkns
1
190
開発未経験者がはじめて DevOpsを触ってみた
yukitkns
0
200
「寺子屋Oracle Cloud:Win Story研究会『OCVSのリフト案件』」に参加してみて
yukitkns
0
200
ここがスゴいよ、OCM!!
yukitkns
1
180
Other Decks in Programming
See All in Programming
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
250
Starting & Sustaining Code-Based E2E Testing for Non-Coding QA Teams( #jasstniigata )
teyamagu
PRO
1
960
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
APNsからLive Activityを開始する話
yumnumm
0
160
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
340
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.8k
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Rails World 2026, Austin, Texas
marcoroth
0
200
JRuby: Past, Present, and Future
headius
0
230
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
最近”作らせてる” ローカルAIアプリの話
akit37
0
440
golang-bob.pdf
iwatsukayura
0
120
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
42k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
560
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
420
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.2k
Large-scale JavaScript Application Architecture
addyosmani
516
110k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
Writing Fast Ruby
sferik
630
63k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
720
Paper Plane
katiecoart
PRO
4
54k
Transcript
「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