blob: bc9b306a493fcfdc01688101d0dbac154a118417 [file] [log] [blame]
<!doctype html>
<html lang="zh-cn" dir="ltr" class="blog-wrapper blog-post-page plugin-blog plugin-id-default">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v2.3.1">
<title data-rh="true">使用 HertzBeat 对物联网数据库 IoTDB 进行监控实践 | HertzBeat</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:image" content="https://hertzbeat.apache.org/zh-cn/img/hertzbeat-logo.svg"><meta data-rh="true" name="twitter:image" content="https://hertzbeat.apache.org/zh-cn/img/hertzbeat-logo.svg"><meta data-rh="true" property="og:url" content="https://hertzbeat.apache.org/zh-cn/blog/2023/01/05/monitor-iotdb"><meta data-rh="true" name="docusaurus_locale" content="zh-cn"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="zh-cn"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="使用 HertzBeat 对物联网数据库 IoTDB 进行监控实践 | HertzBeat"><meta data-rh="true" name="description" content="使用 HertzBeat 对物联网数据库 IoTDB 进行监控实践,5分钟搞定!"><meta data-rh="true" property="og:description" content="使用 HertzBeat 对物联网数据库 IoTDB 进行监控实践,5分钟搞定!"><meta data-rh="true" name="keywords" content="开源监控系统,开源数据库监控,IotDB数据库监控"><meta data-rh="true" property="og:type" content="article"><meta data-rh="true" property="article:published_time" content="2023-01-05T00:00:00.000Z"><meta data-rh="true" property="article:author" content="https://github.com/tomsun28"><meta data-rh="true" property="article:tag" content="opensource,practice"><link data-rh="true" rel="icon" href="/zh-cn/img/hertzbeat-logo.svg"><link data-rh="true" rel="canonical" href="https://hertzbeat.apache.org/zh-cn/blog/2023/01/05/monitor-iotdb"><link data-rh="true" rel="alternate" href="https://hertzbeat.apache.org/zh-cn/blog/2023/01/05/monitor-iotdb" hreflang="zh-cn"><link data-rh="true" rel="alternate" href="https://hertzbeat.apache.org/blog/2023/01/05/monitor-iotdb" hreflang="en"><link data-rh="true" rel="alternate" href="https://hertzbeat.apache.org/blog/2023/01/05/monitor-iotdb" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://JMM99UL1H5-dsn.algolia.net" crossorigin="anonymous"><link rel="alternate" type="application/rss+xml" href="/zh-cn/blog/rss.xml" title="HertzBeat RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/zh-cn/blog/atom.xml" title="HertzBeat Atom Feed">
<link rel="alternate" type="application/json" href="/zh-cn/blog/feed.json" title="HertzBeat JSON Feed">
<link rel="search" type="application/opensearchdescription+xml" title="HertzBeat" href="/zh-cn/opensearch.xml">
<link rel="icon" href="/zh-cn/img/hertzbeat-logo.svg">
<link rel="manifest" href="/zh-cn/manifest.json">
<meta name="theme-color" content="rgb(234, 90, 7)">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="#000">
<link rel="apple-touch-icon" href="/zh-cn/img/hertzbeat-logo.svg">
<link rel="mask-icon" href="/zh-cn/img/hertzbeat-logo.svg" color="rgb(234, 90, 7)">
<meta name="msapplication-TileImage" content="/zh-cn/img/hertzbeat-logo.svg">
<meta name="msapplication-TileColor" content="#000">
<script src="https://hm.baidu.com/hm.js?77fb03ed1c6c1267119fec6d84dd88f3" async></script><link rel="stylesheet" href="/zh-cn/assets/css/styles.d9b7538f.css">
<link rel="preload" href="/zh-cn/assets/js/runtime~main.d9d3ce85.js" as="script">
<link rel="preload" href="/zh-cn/assets/js/main.53e387bc.js" as="script">
</head>
<body class="navigation-with-keyboard">
<script>!function(){function e(e){document.documentElement.setAttribute("data-theme",e)}var t=function(){var e=null;try{e=localStorage.getItem("theme")}catch(e){}return e}();null!==t?e(t):window.matchMedia("(prefers-color-scheme: dark)").matches?e("dark"):(window.matchMedia("(prefers-color-scheme: light)").matches,e("light"))}()</script><div id="__docusaurus">
<div role="region" aria-label="跳到主要内容"><a class="skipToContent_fXgn" href="#docusaurus_skipToContent_fallback">跳到主要内容</a></div><nav aria-label="主导航" class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="切换导航栏" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/zh-cn/"><div class="navbar__logo"><img src="/zh-cn/img/hertzbeat-brand.svg" alt="An open source, real-time monitoring tool with custom-monitor and agentLess." class="themedImage_ToTc themedImage--light_HNdA"><img src="/zh-cn/img/hertzbeat-brand.svg" alt="An open source, real-time monitoring tool with custom-monitor and agentLess." class="themedImage_ToTc themedImage--dark_i4oU"></div><b class="navbar__title text--truncate">HertzBeat</b></a><a class="navbar__item navbar__link" href="/zh-cn/docs/">文档中心</a><a aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/zh-cn/blog/">博客</a><div class="navbar__item dropdown dropdown--hoverable"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link">其它信息</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/zh-cn/docs/others/contact">讨论交流</a></li><li><a class="dropdown__link" href="/zh-cn/docs/others/developer">开发者们</a></li><li><a class="dropdown__link" href="/zh-cn/docs/others/contributing">贡献者指南</a></li><li><a href="https://github.com/orgs/apache/projects/6" target="_blank" rel="noopener noreferrer" class="dropdown__link">项目看板<svg width="12" height="12" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li><a class="dropdown__link" href="/zh-cn/docs/others/sponsor">赞助我们</a></li><li><a class="dropdown__link" href="/zh-cn/docs/others/resource">相关资源</a></li></ul></div></div><div class="navbar__items navbar__items--right"><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a class="navbar__link" aria-haspopup="true" aria-expanded="false" role="button" href="/zh-cn/docs/">v1.5.x</a><ul class="dropdown__menu"><li><a class="dropdown__link" href="/zh-cn/docs/">v1.5.x</a></li><li><a class="dropdown__link" href="/zh-cn/docs/v1.4.x/">v1.4.x</a></li><li><a class="dropdown__link" href="/zh-cn/docs/v1.3.x/">v1.3.x</a></li><li><a class="dropdown__link" href="/zh-cn/docs/v1.1.x/">v1.1.x</a></li></ul></div><div class="navbar__item dropdown dropdown--hoverable dropdown--right"><a href="#" aria-haspopup="true" aria-expanded="false" role="button" class="navbar__link"><svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true" class="iconLanguage_nlXk"><path fill="currentColor" d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path></svg>中文(中国)</a><ul class="dropdown__menu"><li><a href="/zh-cn/blog/2023/01/05/monitor-iotdb" target="_self" rel="noopener noreferrer" class="dropdown__link dropdown__link--active" lang="zh-cn">中文(中国)</a></li><li><a href="/blog/2023/01/05/monitor-iotdb" target="_self" rel="noopener noreferrer" class="dropdown__link" lang="en">English</a></li></ul></div><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="切换浅色/暗黑模式(当前为浅色模式)" aria-label="切换浅色/暗黑模式(当前为浅色模式)" aria-live="polite"><svg viewBox="0 0 24 24" width="24" height="24" class="lightToggleIcon_pyhR"><path fill="currentColor" d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" class="darkToggleIcon_wfgR"><path fill="currentColor" d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"></path></svg></button></div><div class="searchBox_ZlJk"><button type="button" class="DocSearch DocSearch-Button" aria-label="搜索"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">搜索</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="docusaurus_skipToContent_fallback" class="main-wrapper mainWrapper_z2l0"><div class="container margin-vert--lg"><div class="row"><aside class="col col--3"><nav class="sidebar_re4s thin-scrollbar" aria-label="最近博文导航"><div class="sidebarItemTitle_pO2u margin-bottom--md">近期更新文章</div><ul class="sidebarItemList_Yudw clean-list"><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2024/01/18/hertzbeat-v1.4.4">HertzBeat v1.4.4 发布!</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2024/01/11/new-committer">热烈欢迎 HertzBeat 三位小伙伴新晋社区 Committer!</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2023/12/11/hertzbeat-v1.4.3">HertzBeat v1.4.3 发布,Prometheus兼容!</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2023/11/12/hertzbeat-v1.4.2">HertzBeat v1.4.2 版本发布,自定义消息通知模版</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2023/09/26/hertzbeat-v1.4.1">更好的用户体验, 开源实时监控 HertzBeat v1.4.1 发布</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2023/08/28/new-committer">热烈欢迎 HertzBeat 小伙伴新晋社区 Committer!</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2023/08/14/hertzbeat-v1.4.0">重磅更新,HertzBeat 集群版发布,易用友好的开源实时监控系统!</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2023/07/05/hertzbeat-v1.3.2">开源实时监控 HertzBeat v1.3.2 发布, 更稳定更易用</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2023/05/11/greptimedb-store">GreptimeDB &amp; HertzBeat, 使用开源时序数据库 GreptimeDB 存储开源实时监控 HertzBeat 的度量数据</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2023/05/09/hertzbeat-v1.3.1">50天36位贡献者,开源实时监控工具 HertzBeat v1.3.1 发布</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2023/03/22/monitor-springboot2">使用 HertzBeat 5分钟搞定 SpringBoot2 监控告警</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2023/03/15/hertzbeat-v1.3.0">重磅更新 开源实时监控工具 HertzBeat v1.3.0 发布 在线自定义来了</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2023/02/15/monitor-linux">使用开源实时监控 HertzBeat 监控 Linux 操作系统</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2023/02/11/monitor-mysql">使用开源实时监控工具 HertzBeat 对 Mysql 数据库监控告警实践</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2023/02/10/new-committer">恭喜 HertzBeat 又迎来了两位新晋社区 Committer</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2023/02/02/monitor-dynamic-tp">使用 HertzBeat 对 线程池框架 DynamicTp 的监控实践</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2023/01/08/monitor-shenyu">使用 HertzBeat 对 API 网关 Apache ShenYu 的监控实践</a></li><li class="sidebarItem__DBe"><a aria-current="page" class="sidebarItemLink_mo7H sidebarItemLinkActive_I1ZP" href="/zh-cn/blog/2023/01/05/monitor-iotdb">使用 HertzBeat 对物联网数据库 IoTDB 进行监控实践</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2022/12/28/hertzbeat-v1.2.3">HertzBeat v1.2.3 发布!支持Prometheus,ShenYu,IotDb</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2022/12/19/new-committer">恭喜 HertzBeat 迎来了两位新晋社区Committer</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2022/11/28/hertzbeat-v1.2.2">HertzBeat v1.2.2 发布!新增K8S监控等众多特性</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2022/10/08/hertzbeat-v1.2.0">HertzBeat v1.2.0 发布!易用友好的开源实时监控工具</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2022/09/10/ssl-practice">SSL证书过期监控最佳实践</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2022/09/04/hertzbeat-v1.1.3">云监控系统 HertzBeat v1.1.3 发布!</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2022/07/10/hertzbeat-v1.1.1">云监控系统 HertzBeat v1.1.1 发布!</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2022/06/22/one-step-up">云监控系统 HertzBeat v1.1.0 发布!一条命令即可开启监控之旅!</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2022/06/19/hertzbeat-v1.1.0">云监控系统 HertzBeat v1.1.0 发布!一条命令即可开启监控之旅!</a></li><li class="sidebarItem__DBe"><a class="sidebarItemLink_mo7H" href="/zh-cn/blog/2022/06/01/hertzbeat-v1.0">云监控系统 HertzBeat v1.0 正式发布啦</a></li></ul></nav></aside><main class="col col--7" itemscope="" itemtype="http://schema.org/Blog"><article itemprop="blogPost" itemscope="" itemtype="http://schema.org/BlogPosting"><header><h1 class="title_f1Hy" itemprop="headline">使用 HertzBeat 对物联网数据库 IoTDB 进行监控实践</h1><div class="container_mt6G margin-vert--md"><time datetime="2023-01-05T00:00:00.000Z" itemprop="datePublished">2023年1月5日</time> · <!-- -->阅读需 7 分钟</div><div class="margin-top--md margin-bottom--sm row"><div class="col col--6 authorCol_Hf19"><div class="avatar margin-bottom--sm"><a href="https://github.com/tomsun28" target="_blank" rel="noopener noreferrer" class="avatar__photo-link"><img class="avatar__photo" src="https://avatars.githubusercontent.com/u/24788200?s=400&amp;v=4" alt="tom"></a><div class="avatar__intro" itemprop="author" itemscope="" itemtype="https://schema.org/Person"><div class="avatar__name"><a href="https://github.com/tomsun28" target="_blank" rel="noopener noreferrer" itemprop="url"><span itemprop="name">tom</span></a></div><small class="avatar__subtitle" itemprop="description">tom</small></div></div></div></div></header><div id="post-content" class="markdown" itemprop="articleBody"><h2 class="anchor anchorWithStickyNavbar_LWe7" id="使用-hertzbeat-对物联网数据库-iotdb-进行监控实践5分钟搞定">使用 HertzBeat 对物联网数据库 IoTDB 进行监控实践,5分钟搞定!<a href="#使用-hertzbeat-对物联网数据库-iotdb-进行监控实践5分钟搞定" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h2><h3 class="anchor anchorWithStickyNavbar_LWe7" id="iotdb-介绍">IoTDB 介绍<a href="#iotdb-介绍" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><blockquote><p>Apache IoTDB (Internet of Things Database) 是一款时序数据库管理系统,可以为用户提供数据收集、存储和分析等服务。<br>
<!-- -->IoTDB由于其轻量级架构、高性能和高可用的特性,以及与 Hadoop 和 Spark 生态的无缝集成,满足了工业 IoT 领域中海量数据存储、高吞吐量数据写入和复杂数据查询分析的需求。 </p></blockquote><h3 class="anchor anchorWithStickyNavbar_LWe7" id="hertzbeat-介绍">HertzBeat 介绍<a href="#hertzbeat-介绍" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><blockquote><p>HertzBeat 是一款开源,易用友好的实时监控工具,无需Agent,拥有强大自定义监控能力。<br>
<!-- -->支持对应用服务,数据库,操作系统,中间件,云原生等监控,阈值告警,告警通知(邮件微信钉钉飞书)。<br>
<!-- -->HertzBeat 的强大自定义,多类型支持,易扩展,低耦合,希望能帮助开发者和中小团队快速搭建自有监控系统。</p></blockquote><h3 class="anchor anchorWithStickyNavbar_LWe7" id="在-hertzbeat-5分钟搞定监控-iotdb">在 HertzBeat 5分钟搞定监控 IoTDB<a href="#在-hertzbeat-5分钟搞定监控-iotdb" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><h4 class="anchor anchorWithStickyNavbar_LWe7" id="操作前提您已拥有-iotdb-环境和-hertzbeat-环境">操作前提,您已拥有 IoTDB 环境和 HertzBeat 环境。<a href="#操作前提您已拥有-iotdb-环境和-hertzbeat-环境" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h4><ul><li>IoTDB <a href="https://iotdb.apache.org/UserGuide/V0.13.x/QuickStart/QuickStart.html" target="_blank" rel="noopener noreferrer">部署安装文档</a> </li><li>HertzBeat <a href="https://hertzbeat.com/docs/start/docker-deploy" target="_blank" rel="noopener noreferrer">部署安装文档</a> </li></ul><h4 class="anchor anchorWithStickyNavbar_LWe7" id="一-在-iotdb-端开启metrics功能它将提供-prometheus-metrics-形式的接口数据">一. 在 IoTDB 端开启<code>metrics</code>功能,它将提供 prometheus metrics 形式的接口数据。<a href="#一-在-iotdb-端开启metrics功能它将提供-prometheus-metrics-形式的接口数据" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h4><ol><li>metric 采集默认是关闭的,需要先到 <code>conf/iotdb-metric.yml</code> 中修改参数打开后重启 server </li></ol><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain"># 是否启动监控模块,默认为false</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">enableMetric: true</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain" style="display:inline-block"></span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"># 数据提供方式,对外部通过jmx和prometheus协议提供metrics的数据, 可选参数:[JMX, PROMETHEUS, IOTDB],IOTDB是默认关闭的。</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">metricReporterList:</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> - JMX</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain"> - PROMETHEUS</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="复制代码到剪贴板" title="复制" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><ol start="2"><li>重启 IoTDB, 打开浏览器或者用curl 访问 http://ip:9091/metrics, 就能看到metric数据了。 </li></ol><h4 class="anchor anchorWithStickyNavbar_LWe7" id="二-在-hertzbeat-监控页面添加-iotdb-监控">二. 在 HertzBeat 监控页面添加 IoTDB 监控<a href="#二-在-hertzbeat-监控页面添加-iotdb-监控" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h4><ol><li>点击新增IoTDB监控 </li></ol><p>路径:菜单 -&gt; 数据库监控 -&gt; IoTDB监控 -&gt; 新增IoTDB监控 </p><p><img loading="lazy" alt="hertzbeat" src="/zh-cn/assets/images/monitor-iotdb-1-518ff666fb4994d0961f999e4185600f.png" width="4064" height="2166" class="img_ev3q"> </p><ol start="2"><li>配置监控IoTDB所需参数 </li></ol><p>在监控页面填写 IoTDB <strong>服务IP</strong><strong>监控端口</strong>(默认9091),最后点击确定添加即可。<br>
<!-- -->其他参数如<strong>采集间隔</strong><strong>超时时间</strong>等可以参考<a href="https://hertzbeat.com/docs/help/iotdb/" target="_blank" rel="noopener noreferrer">帮助文档</a> <a href="https://hertzbeat.com/docs/help/iotdb/" target="_blank" rel="noopener noreferrer">https://hertzbeat.com/docs/help/iotdb/</a> </p><p><img loading="lazy" alt="hertzbeat" src="/zh-cn/assets/images/monitor-iotdb-2-243561382bbdf6fec6bd9133bdc510a3.png" width="4064" height="2166" class="img_ev3q"> </p><ol start="3"><li>完成✅,现在我们已经添加好对 IoTDB 的监控了,查看监控列表即可看到我们的添加项。 </li></ol><p><img loading="lazy" alt="hertzbeat" src="/zh-cn/assets/images/monitor-iotdb-3-83c02b3121bbcac706c039c964eb3086.png" width="4064" height="2166" class="img_ev3q"> </p><ol start="4"><li>点击监控列表项的<strong>操作</strong>-&gt;<strong>监控详情图标</strong> 即可浏览 IoTDB的实时监控指标数据。 </li></ol><p><img loading="lazy" alt="hertzbeat" src="/zh-cn/assets/images/monitor-iotdb-4-20ca3228c2ff616977e1b266617fc33e.png" width="4064" height="2166" class="img_ev3q"> </p><ol start="5"><li>点击<strong>监控历史详情TAB</strong> 即可浏览 IoTDB的历史监控指标数据图表📈。 </li></ol><p><img loading="lazy" alt="hertzbeat" src="/zh-cn/assets/images/monitor-iotdb-5-eedef9c331cdd660090a0d078c851a83.png" width="4064" height="2166" class="img_ev3q"> </p><p><strong>完成DONE!通过上面几步,总结起来其实也就是两步</strong> </p><ul><li><strong>一步开启 IoTDB 端<code>metrics</code>功能</strong> </li><li><strong>另一步在 HertzBeat 监控页面配置IP端口添加监控即可</strong> </li></ul><p><strong>这样我们就完成了对 IoTDB 的监控,我们可以随时查看监控详情指标信息来观测其服务状态,但人不可能是一直去看,总有要休息的时候,监控往往伴随着告警,当监控指标发生异常,监控系统需要能及时通知到负责人</strong> </p><p><strong>接下来我们就来一步一步教您配置 HertzBeat 系统里的阈值告警通知</strong> </p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="三-在-hertzbeat-系统添加-iotdb-指标阈值告警">三. 在 HertzBeat 系统添加 IoTDB 指标阈值告警<a href="#三-在-hertzbeat-系统添加-iotdb-指标阈值告警" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h4><ol><li>对某个重要指标配置阈值告警 </li></ol><p>路径:菜单 -&gt; 告警阈值 -&gt; 新增阈值 </p><ul><li>选择配置的指标对象,IotDB监控有非常多的指标,其中有个指标关系到节点的状态 <code>cluster_node_status</code> -&gt; <code>status</code> (节点状态,1=online 2=offline)。 </li><li>这里我们就配置当此指标 <code>status==2</code> 时发出告警,告警级别为<strong>紧急告警</strong>,一次即触发,具体如下图。 </li></ul><p><img loading="lazy" alt="hertzbeat" src="/zh-cn/assets/images/monitor-iotdb-6-8050c598b8bac37904e0f0b63d309f95.png" width="4064" height="2166" class="img_ev3q"> </p><ol start="2"><li>新增消息通知接收人 </li></ol><p>路径:菜单 -&gt; 告警通知 -&gt; 告警接收人 -&gt; 新增接收人 </p><p>消息通知方式支持 <strong>邮件,钉钉,企业微信,飞书,WebHook,短信</strong>等,我们这里以常用的钉钉为例。 </p><ul><li>参照此<a href="https://hertzbeat.com/docs/help/alert_dingtalk" target="_blank" rel="noopener noreferrer">帮助文档</a> <a href="https://hertzbeat.com/docs/help/alert_dingtalk" target="_blank" rel="noopener noreferrer">https://hertzbeat.com/docs/help/alert_dingtalk</a> 在钉钉端配置机器人,设置安全自定义关键词<code>HertzBeat</code>,获取对应<code>access_token</code>值。 </li><li>在 HertzBeat 配置接收人参数如下。 </li></ul><p>【告警通知】-&gt;【新增接收人】 -&gt;【选择钉钉机器人通知方式】-&gt;【设置钉钉机器人ACCESS_TOKEN】-&gt; 【确定】</p><p><img loading="lazy" alt="hertzbeat" src="/zh-cn/assets/images/alert-notice-1-3bad6e06e2c870849bc656a2092d59ac.png" width="3436" height="890" class="img_ev3q"> </p><ol start="3"><li>配置关联的告警通知策略⚠️ 【新增通知策略】-&gt; 【将刚设置的接收人关联】-&gt; 【确定】 </li></ol><p><img loading="lazy" alt="hertzbeat" src="/zh-cn/assets/images/alert-notice-2-8025b90624873463fe0a3f75bd7efafa.png" width="3436" height="1088" class="img_ev3q"> </p><h3 class="anchor anchorWithStickyNavbar_LWe7" id="完毕现在坐等告警消息过来了叮叮叮叮">完毕,现在坐等告警消息过来了。叮叮叮叮<a href="#完毕现在坐等告警消息过来了叮叮叮叮" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h3><div class="codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#393A34;--prism-background-color:#f6f8fa"><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-text codeBlock_bY9V thin-scrollbar"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#393A34"><span class="token plain">[HertzBeat告警通知]</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">告警目标对象 : iotdb.cluster_node_status.status</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">所属监控任务ID : 205540620349696</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">所属任务名称 : IOTDB_localhost</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">告警级别 : 紧急告警</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">告警触发时间 : 2023-01-05 22:17:06</span><br></span><span class="token-line" style="color:#393A34"><span class="token plain">内容详情 : 监控到 IOTDB 节点 127.0.0.1 状态 OFFLINE, 请及时处理。</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="复制代码到剪贴板" title="复制" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg class="copyButtonIcon_y97N" viewBox="0 0 24 24"><path d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg class="copyButtonSuccessIcon_LjdS" viewBox="0 0 24 24"><path d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div><h2 class="anchor anchorWithStickyNavbar_LWe7" id="小结">小结<a href="#小结" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h2><p>这篇实践文章带我们体验了如何使用 HertzBeat 监控 IoTDB 数据库指标数据,可以发现将 监控-告警-通知 集一体的 HertzBeat 在操作与使用方面更加的便捷,在页面上简单点一点就能把 IoTDB 纳入监控,再也不需要部署多个组件,写多个有门槛的YML配置文件了。 </p><p>IoTDB Github: <a href="https://github.com/apache/iotdb" target="_blank" rel="noopener noreferrer">https://github.com/apache/iotdb</a><br>
<!-- -->HertzBeat Github: <a href="https://github.com/dromara/hertzbeat" target="_blank" rel="noopener noreferrer">https://github.com/dromara/hertzbeat</a> </p><p><strong>欢迎了解使用Star支持哦!</strong></p><p>只需要一条docker命令即可安装体验heartbeat :<br>
<code>docker run -d -p 1157:1157 --name hertzbeat tancloud/hertzbeat</code></p><p>注意⚠️HertzBeat v1.2.3 版本支持 IoTDB v0.12 v0.13, 由于其v1.0刚发布, 暂未对此版本全部指标兼容。</p></div><footer class="row docusaurus-mt-lg blogPostFooterDetailsFull_mRVl"><div class="col"><b>标签:</b><ul class="tags_jXut padding--none margin-left--sm"><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/zh-cn/blog/tags/opensource">opensource</a></li><li class="tag_QGVx"><a class="tag_zVej tagRegular_sFm0" href="/zh-cn/blog/tags/practice">practice</a></li></ul></div><div class="col margin-top--sm"><a href="https://github.com/apache/hertzbeat/edit/master/home/i18n/zh-cn/docusaurus-plugin-content-blog/2023-01-05-monitor-iotdb.md" target="_blank" rel="noreferrer noopener" class="theme-edit-this-page"><svg fill="currentColor" height="20" width="20" viewBox="0 0 40 40" class="iconEdit_Z9Sw" aria-hidden="true"><g><path d="m34.5 11.7l-3 3.1-6.3-6.3 3.1-3q0.5-0.5 1.2-0.5t1.1 0.5l3.9 3.9q0.5 0.4 0.5 1.1t-0.5 1.2z m-29.5 17.1l18.4-18.5 6.3 6.3-18.4 18.4h-6.3v-6.2z"></path></g></svg>编辑此页</a></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="博文分页导航"><a class="pagination-nav__link pagination-nav__link--prev" href="/zh-cn/blog/2023/01/08/monitor-shenyu"><div class="pagination-nav__sublabel">较新一篇</div><div class="pagination-nav__label">使用 HertzBeat 对 API 网关 Apache ShenYu 的监控实践</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/zh-cn/blog/2022/12/28/hertzbeat-v1.2.3"><div class="pagination-nav__sublabel">较旧一篇</div><div class="pagination-nav__label">HertzBeat v1.2.3 发布!支持Prometheus,ShenYu,IotDb</div></a></nav></main><div class="col col--2"><div class="tableOfContents_bqdL thin-scrollbar"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#使用-hertzbeat-对物联网数据库-iotdb-进行监控实践5分钟搞定" class="table-of-contents__link toc-highlight">使用 HertzBeat 对物联网数据库 IoTDB 进行监控实践,5分钟搞定!</a><ul><li><a href="#iotdb-介绍" class="table-of-contents__link toc-highlight">IoTDB 介绍</a></li><li><a href="#hertzbeat-介绍" class="table-of-contents__link toc-highlight">HertzBeat 介绍</a></li><li><a href="#在-hertzbeat-5分钟搞定监控-iotdb" class="table-of-contents__link toc-highlight">在 HertzBeat 5分钟搞定监控 IoTDB</a></li><li><a href="#完毕现在坐等告警消息过来了叮叮叮叮" class="table-of-contents__link toc-highlight">完毕,现在坐等告警消息过来了。叮叮叮叮</a></li></ul></li><li><a href="#小结" class="table-of-contents__link toc-highlight">小结</a></li></ul></div></div></div></div></div><footer class="footer"><div class="container container-fluid"><div class="row footer__links"><div class="col footer__col"><div class="footer__title">产品介绍</div><ul class="footer__items clean-list"><li class="footer__item"><a class="footer__link-item" href="/zh-cn/docs/start/quickstart">安装文档</a></li><li class="footer__item"><a class="footer__link-item" href="/zh-cn/docs/help/guide">帮助文档</a></li></ul></div><div class="col footer__col"><div class="footer__title">社区交流</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/apache/hertzbeat/discussions/" target="_blank" rel="noopener noreferrer" class="footer__link-item">社区讨论<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a class="footer__link-item" href="/zh-cn/docs/others/contact">联系交流</a></li></ul></div><div class="col footer__col"><div class="footer__title">相关资源</div><ul class="footer__items clean-list"><li class="footer__item"><a href="https://github.com/apache/hertzbeat" target="_blank" rel="noopener noreferrer" class="footer__link-item">Github仓库<svg width="13.5" height="13.5" aria-hidden="true" viewBox="0 0 24 24" class="iconExternalLink_nPIU"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"></path></svg></a></li><li class="footer__item"><a class="footer__link-item" href="/zh-cn/docs/others/resource">其它资源</a></li></ul></div></div><div class="footer__bottom text--center"><div class="margin-bottom--sm"><a href="https://github.com/apache/hertzbeat" rel="noopener noreferrer" class="footerLogoLink_BH7S"><img src="/zh-cn/img/hertzbeat-brand.svg" alt="HertzBeat" class="themedImage_ToTc themedImage--light_HNdA footer__logo"><img src="/zh-cn/img/hertzbeat-brand.svg" alt="HertzBeat" class="themedImage_ToTc themedImage--dark_i4oU footer__logo"></a></div><div class="footer__copyright">Copyright © 2024 Apache HertzBeat</div></div></div></footer></div>
<script src="/zh-cn/assets/js/runtime~main.d9d3ce85.js"></script>
<script src="/zh-cn/assets/js/main.53e387bc.js"></script>
</body>
</html>