> For the complete documentation index, see [llms.txt](https://livlog-llc.gitbook.io/engineering-handbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://livlog-llc.gitbook.io/engineering-handbook/riburoguno/7-incident-response.md).

# 7. 障害対応と保守

リブログのプロダクトは小規模に作られることが多いですが、公開している以上、障害対応と保守の考え方は必要です。

このページでは、障害が起きたときの基本的な対応と、日常的な保守の方針を整理します。

## 障害対応の基本姿勢

障害対応では、原因追及よりも先に、利用者への影響を減らすことを優先します。

1. 影響範囲を確認する
2. 復旧を優先する
3. 原因を調査する
4. 再発防止策を整理する
5. 記録を残す

## 確認すること

障害が疑われる場合は、次を確認します。

* サイトが表示されるか
* APIが応答するか
* DBに接続できるか
* 外部APIが止まっていないか
* データファイルが壊れていないか
* デプロイ直後の変更が影響していないか
* 証明書やドメインの期限が切れていないか

## 障害メモに残すこと

障害対応後は、簡単でよいので記録を残します。

* 発生日時
* 影響範囲
* 原因
* 対応内容
* 復旧日時
* 再発防止策
* 未対応の課題

## 保守の対象

リブログでは、コードだけではなく、データ、外部API、ドキュメントも保守対象です。

* ソースコード
* データベース
* GeoJSON / CSV / JSON
* Markdown記事
* 写真・画像
* 外部API連携
* ドメイン
* SSL証明書
* デプロイ環境
* README / docs

## 小規模サービスの保守方針

すべてのプロダクトを同じ頻度で保守する必要はありません。

サービスの重要度や利用状況に応じて、次のように扱います。

* 継続的に改善するプロダクト
* 必要に応じて更新するプロダクト
* アーカイブとして残すプロダクト
* 将来的に統合するプロダクト

重要なのは、現在どういう状態なのかを分かるようにしておくことです。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://livlog-llc.gitbook.io/engineering-handbook/riburoguno/7-incident-response.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
