邱昊
    • Create new note
    • Create a note from template
      • 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
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • 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
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy 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
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • 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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Datadog 监控 ## 处理人联系方式 - 王健江 `183318287@qq.com` - 姜富耀 `three3body@gmail.com` - 邱昊 `qiuhao951@gmail.com` - 倪永胜 `714275326@qq.com` - slack `data-warn-bot` ## 服务状态监听 监听对外服务的api接口,由datadog轮询api接口,某些服务需要对api返回的结果进行条件判断。 1. price服务 - 轮询频次:10分钟/定时 - 预警条件: 1. CMC轮询获取的价格失败/获取为0 2. 链上轮询获取的价格失败/获取为0 3. 用户请求接口失败/获取到的价格为0 - 预警等级:p1 - 预警方式: + slack + 王健江 + 姜富耀 + 邱昊 + 倪永胜 ## 链上数据监听 需要一个中间服务,向datadog推送需要监听的事件或者提供链上存储状态的api查询接口。 1. __KSM账本对账__ `Kusama` 网络上 `Parachain Account` 的 `KSM` 余额 (`result1`), `Karura`网络上 `KSM` 的 `total_insurance`s 数量 (`result2`) - 轮询频次:5分钟/定时 - 链上事件:无 - 预警条件: 1. result1比result2多出3%以上 - 预警等级:p1 - 预警方式: + slack + 王健江 + 姜富耀 2. __大额跨链转出__ - 轮询频次:链长链接监听 - 链上事件:xTokens.transfer - 预警条件: 1. lastestHeader.amount > 1000 && lastestHeader.token == KSM - 预警等级:p2 - 预警方式:slack 3. __节点状态__ 监听链接点的存活状态 - 轮询频次:链长链接监听 - 链上事件:无 - 预警条件: 1. 长链接连接失败 2. 长链接十分钟未有最新高度推送 - 预警等级:p2 - 预警方式:slack 4. __大额转账(currencies)__ - 轮询频次:链长链接监听 - 链上事件:currencies.Transferred - 预警条件: 1. amount * price > 300000 - 预警等级:p2 - 预警方式:slack 5. __非常用交易调用__ - 轮询频次:链长链接监听 - 链上事件:polkadotXcm.x - 预警条件: 1. 所有section=polkadotXcm的extrinsics - 预警等级:p4 - 预警方式:slack 6. __大额流动性提取__ - 轮询频次:链长链接监听 - 链上事件:dex.removeLiquidity - 预警条件: 1. 提取的流动性占总流动池的5%以上; - 预警等级:p2 - 预警方式:slack 7. __RedeemRequest超时__ - 轮询频次:8小时/定时 - 预警条件: 1. 超过时间8天 - 预警等级:p3 - 预警方式:slack 8. __危险债仓__ - 轮询频次:8小时/定时 - 预警条件: 1. 抵押率小于安全抵押率 - 预警等级:p3 - 预警方式:slack 9. __dex警告__ exchange_rate_dex = poolA : poolB 的相对价格. market_price = priceA :priceB rate = (exchange_rate_dex - market_price) / market_price - 轮训频次: 5分钟/定时 - 预警条件: 1. 不含 kUSD 的交易对在偏差 =< -10% || >= 10% 2. 含 kUSD 的交易对在偏差 =< -15% || >= 15%时 - 预警等级:p1 - 预警方式:All <!-- 1. 大额转账 - 监听 tokens.transfer 事件,通知转账金额超过 $10000 的转账 // 没有找到这个事件 3. swap - 监听 swap.swap 事件, input 和 output 金额差距不应该超过 10% 4. lona - 监听 lona 债仓,报告抵押品价值小于债务价值的错误债仓 - 监听正在拍卖的各种资产金额,防止出现积压拍卖 1. 实时监控 dex 中所有 enabled 状态的交易对, 计算 exchange_rate_dex = poolA : poolB 的相对价格 2. 取市场中 A 和 B的价格, 计算 market_price = priceA :priceB 3. 计算偏差率 rate = (exchange_rate_dex - market_price) / market_price, 如果 rate 为正数 , 说明相对市场价格, dex 的A-B交易对中的 A 价格偏低(或者B价格偏高), 如果 rate 为负, dex 的A-B交易对中的 A 价格偏高(或者B价格偏低) 4. 某些资产没有市场价,比如kUSD, 系统认为kUSD的市场价格始终是1 美金, LKSM 则可以根据系统的公式和KSM市场价格计算出。 5. 当偏差大于一定范围再进行报警, 比如不含 kUSD的交易对在偏差 =< -10% 或者 >= 10%时报警, 含有kUSD的交易对相对特殊,因为供需关系,kUSD在dex中相对不够稳定, 含 kUSD的交易对 可以在偏差 偏差 =< -15% 或者 >= 15%时报警 6. 要求警报时, 顺便将市场价格信息, dex交易对中出现偏差的交易对 的兑换比例给出

    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