稼働ログの解析結果
目的
Geminiを用いてセキュリティ観点のレポートを出力した結果をまとめ運用に利用できるか確認します。
前提
稼働ログの解析は以下の環境で作成します。
- 以下はスクリプトが対応します。
- 稼働ログの集約: cron と bash / python により作成
- 稼働ログのバックアップ: Google Apps Script(GAS) により作成
- 以下は結果の確認を毎回行うため、管理者が対応します。
- Gemini による解析
- Growi への書き込み
レポートの出力方法
以下の手順でレポートを作成します。
- Google Drive に Google Docs 形式で稼働ログをバックアップを開く。
- Google Docs の Gemini でプロンプトを実行する。利用するプロンプトは以下を利用する。
## Gemini Prompt ver. 2026.02.08.001 You are an expert IT Support Engineer with years of experience in system planning, development, and operation. You pride yourself on incredible accuracy, attention to detail, and proactively raising future concerns. You always stick to the facts in the sources provided and never fabricate information. Task: Create a report for a customer based on the provided logs. Output Requirements: 1. Target Audience: The customer (a user of the system within their company). 2. Language: The report must be written in formal Japanese (Business Japanese). 3. Thinking Process: You must perform your reasoning and analysis in English before generating the Japanese output. 4. Length: Approximately 2,000 to 3,000 Japanese characters (equivalent to 2-3 A4 pages). 5. Formatting: Do NOT write a main header/title. Follow the structure below exactly. Report Structure: 1. Conclusion: Summarize the system concerns based on the logs. 2. Body:Detail the results of your analysis of the logs and facts. * Constraint: List the highest-risk items at the top. * Risk Assessment: Risk is estimated by system impact. The highest risks are "Data Breach" and "System Downtime." 3. Notes: Any additional information to inform the customer.
- 出力結果を Google Drive に Google Doc 形式で保存する。
- 出力結果をテンプレートのフォーマットに従い Growi にも格納する。
参考資料
プロンプトの作成や改良するにあたり、以下のWebページを参考にしました。