SRE Conference
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Help
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# SRE 經驗分享 - 從事故分析、精準監控到自動化維運 - 謝政廷 (Duran) ###### tags: `2023` {%hackmd @sre-conf/H1pCafrG3 %} 心得 ~~驗屍經驗分享~~ ~~避免被call起來尿尿指南~~ ## 事故分析 ### 事故三種類型-效益 #### 使用者報案 > 有可能代表監控不夠 #### 監控與警告 > 稍微成熟的產品,已經可以在user發現前就收到通知 #### 團隊預先察覺 > 成熟的監控與警告機制才有較高的機率預先察覺事故發生 ### 事故階段 - 盡可能不要採用沒測試過的修復計畫與步驟 - 在相依複雜的系統環境可能導致服務中斷時間更長 - 不要往極不可能的方向調查 - 不要想太多,優先考慮最簡單的跡象` ### 驗屍工作:理解文化事故,找出原因,檢視是否有更加解決方案避免再次發生,「非常」耗成本 - 事故描述 - 根本原因 - 解決方案 - 正式文件 - 不責難文化 - 識別與預防 #### 何時進行事故分析 - 使用者體驗受影響 (SLO) - 不穩定的功能 - 無法使用服務 - 使用者 - 資料遺失 - 指派任務 ### 事故分析階段 - 不要單獨/隨時對外回報調查進度 - 資訊不完整,錯誤用詞,無法重現可能導致錯誤訊息傳遞,確認資訊與文件一致再公布 #### 檢討報告 日期資訊等 / 採取作為 / 時間軸 / 執行摘要 / 問題摘要 / 從中學習 * 後續追蹤,以避免下次發生相同情況 - Ex. 一個月後要做什麼事情?三個月後要做什麼? - 能不能建立監控指標 - 不能的話要做什麼防範措施 #### 後續檢討工作 1. 建立標準解決流程 2. 檢視事故回應與監控指標 3. 主動測試 4. 案例分享:將經驗分享出去 >查案中執行的Script,Query 盡可能留下來 - 事件結束後,必須回顧看事件聯繫紀錄與步驟,以確保過程沒有發生任何問題 - 開讀書會or群組分享事件內容 ### 事故分析分享 #### 建立標準解決流程 ##### 文件 - 簡單易懂的用詞 - 實用:實作步驟、指令、截圖 - 共同編輯與評論(持續維護) ##### 團隊參與並持續演練 - 測試環境模擬 - 根據文件實作 - 持續確認是否符合需求 ##### 檢視監控指標 - 能否完整解決問題 - 能否被監控 - 能否建立預警規則 - 能否自動修復 ##### 檢視事故回應 - 事故判斷是否正確 - 能否在第一線、第二線就解決 - 能否快速且正確聯絡受影響的團隊 #### 主動測試 - 範圍擴大 - 跨團隊測試 - 邀請使用者 - 更多實務測試案例 - 累積操作流程與經驗 - 事故發生時有更多解決方案 #### 案例分享 鼓勵積極參與 - 讀書會 - SRE 工作群組或會議 - 回報技術更新、issues...etc - Ex. mongodb更新,新增了什麼樣的新功能? - 建立 V-Team > 社群方式經營是個不錯的方式 ### 不咎責文化 - 高層支持 - 鼓勵面對錯誤 - 建設性批評 - 確保流程改善 **犯錯的人不是惡意的,解決問題比較重要** - 其實有點(ㄏㄣˇ)難 - 完全不咎責可能導致無法正常溝通與績效難以管理 - 團隊的人都要有一定的心理建設來面對批評 - 團隊成員要先對錯誤有心理建設,但還是要講 ## 監控指標 [Google SRE - The Four Golden Signals](https://sre.google/sre-book/monitoring-distributed-systems/#xref_monitoring_golden-signals) - ERROR 系統錯誤內容與發生頻率 - Saturation 系統各項資源負載 - Traffic 系統容量需求 - Latency 服務請求所需時間 - 正確的監控指標必須經過長時間觀察與測試 - 能透過監控預防事故發生或是事故後執行自動化維運是相當困難的 > 太依賴模板反而會使監控包含過多雜訊 ### 目標明確的指標 - 說明指標含義(每個產品的指標不同,某指標一直都穩定可以不用列) - 數值異常時可能的影響或事故 - 保留實用的指標 - 好的監控指標來自事故分析,很明確但通常不容易被發現 - 多數情況不會呈現只有單一指標,建立良好除錯指標可以更快診斷問題所在 - 事故並非呈現在單一指標,很多事故無法明確監控 - 驗屍工作只有疑似原因 ## 自動化維運 ### 自動化維運目的與前提 SRE工作不應投資超過50%在瑣事上,建立自動化或半自動化維運相當重要,但是有以下前提: - 維運資料標準化 - CI/CD流程標準化 - 使用一致的工具 - 消除無效率的操作與管理 - 減少人為錯誤發生 - 有效降低成本 - 減少聯繫與等待時間 ### 自動化維運要點 - 減少瑣事 - 使用正確的工具 - 識別高價值流程 - 檢視團隊技能 不是每個團隊成員都有技能做自動化流程 #### 明確指標與消除誤報 - 多數情況下,事件發生時不是呈現在單一指標,建立良好除錯指標可以更快診斷問題所在 --- --- ====== 聊天室 ===== 程式法醫 簡報好快@@手要跟不上了 好多人在打還是好難追

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully