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
OCI ロギングでカスタム・ログを収集する
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
yukitkns
February 20, 2024
Programming
860
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
68
OCI Stack Monitoringでリソース監視をする
yukitkns
1
840
WAFログの推奨ルールを確認する
yukitkns
0
63
多段接続について
yukitkns
0
81
「寺子屋Oracle Cloud:Win Story研究会『ハイブリッドクラウド・マルチクラウド』」に参加してみて
yukitkns
1
180
開発未経験者がはじめて DevOpsを触ってみた
yukitkns
0
190
「寺子屋Oracle Cloud:Win Story研究会『OCVSのリフト案件』」に参加してみて
yukitkns
0
190
ここがスゴいよ、OCM!!
yukitkns
1
180
Other Decks in Programming
See All in Programming
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
110
AIエージェント時代のコードレビューを設計する
nogu66
6
2.5k
Laravelのアプリケーションをどこにデプロイするか #ツナギメオフライン.9
akase244
0
120
Seeing Through Serverless: Observability for AWS Lambda with ADOT and CloudWatch Application Signals
seike460
PRO
1
120
Webエンジニアなのにブラウザの仕組みがわからないので、Pythonで自作してみた
tatsuki12
4
1.7k
XHTMLが残したもの
yosuke_furukawa
PRO
1
390
AIと壁打ちしながら進めるコスト管理
fufuhu
2
1.9k
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
670
MySQLとPostgreSQLって何が違うの?
akagami
PRO
0
160
KotlinConf Extended South Korea 2026 Keynote
l2hyunwoo
0
130
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
180
Hono + Inertia + React で LP を構築した話
oukayuka
2
210
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
From π to Pie charts
rasagy
0
350
Being A Developer After 40
akosma
91
590k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
590
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
440
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
42k
Automating Front-end Workflow
addyosmani
1369
210k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.7k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
How to train your dragon (web standard)
notwaldorf
97
6.8k
How STYLIGHT went responsive
nonsquared
100
6.3k
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