blob: 03be95550570ab48a108ada4f3b4c5cc0415fd17 [file] [log] [blame]
<!doctype html>
<html lang="zh-cn" dir="ltr" class="docs-wrapper docs-doc-page docs-version-current plugin-docs plugin-id-default docs-doc-id-start/ssl-cert-practice">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v2.3.1">
<title data-rh="true">SSL证书过期监控使用案例 | 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/docs/start/ssl-cert-practice"><meta data-rh="true" name="docusaurus_locale" content="zh-cn"><meta data-rh="true" name="docsearch:language" content="zh-cn"><meta data-rh="true" name="keywords" content="monitor, apm, 监控, 开源, uptime, opensource"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="SSL证书过期监控使用案例 | HertzBeat"><meta data-rh="true" name="description" content="现在大部分网站都默认支持 HTTPS,我们申请的证书一般是3个月或者1年,很容易随着时间的流逝SSL证书过期了我们却没有第一时间发现,或者在过期之前没有及时更新证书。"><meta data-rh="true" property="og:description" content="现在大部分网站都默认支持 HTTPS,我们申请的证书一般是3个月或者1年,很容易随着时间的流逝SSL证书过期了我们却没有第一时间发现,或者在过期之前没有及时更新证书。"><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/docs/start/ssl-cert-practice"><link data-rh="true" rel="alternate" href="https://hertzbeat.apache.org/zh-cn/docs/start/ssl-cert-practice" hreflang="zh-cn"><link data-rh="true" rel="alternate" href="https://hertzbeat.apache.org/docs/start/ssl-cert-practice" hreflang="en"><link data-rh="true" rel="alternate" href="https://hertzbeat.apache.org/docs/start/ssl-cert-practice" 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 aria-current="page" class="navbar__item navbar__link navbar__link--active" href="/zh-cn/docs/">文档中心</a><a class="navbar__item navbar__link" 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 aria-current="page" class="dropdown__link dropdown__link--active" href="/zh-cn/docs/start/ssl-cert-practice">v1.5.x</a></li><li><a class="dropdown__link" href="/zh-cn/docs/v1.4.x/start/ssl-cert-practice">v1.4.x</a></li><li><a class="dropdown__link" href="/zh-cn/docs/v1.3.x/start/ssl-cert-practice">v1.3.x</a></li><li><a class="dropdown__link" href="/zh-cn/docs/v1.1.x/start/ssl-cert-practice">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/docs/start/ssl-cert-practice" target="_self" rel="noopener noreferrer" class="dropdown__link dropdown__link--active" lang="zh-cn">中文(中国)</a></li><li><a href="/docs/start/ssl-cert-practice" 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 docsWrapper_BCFX"><button aria-label="回到顶部" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docPage__5DB"><aside class="theme-doc-sidebar-container docSidebarContainer_b6E3"><div class="sidebarViewport_Xe31"><div class="sidebar_njMd"><nav aria-label="文档侧边栏" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" aria-expanded="true" href="/zh-cn/docs/">快速入门</a></div><ul style="display:block;overflow:visible;height:auto" class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/">介绍</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/start/quickstart">快速开始</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/start/docker-deploy">Docker方式部署</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/start/package-deploy">安装包方式部署</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/start/rainbond-deploy">Rainbond方式部署</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a href="https://artifacthub.io/packages/helm/hertzbeat/hertzbeat" target="_blank" rel="noopener noreferrer" class="menu__link menuExternalLink_NmtK" tabindex="0">Kubernetes Helm部署<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="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/start/upgrade">版本更新指引</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/start/victoria-metrics-init">使用VictoriaMetrics存储指标数据(推荐)</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/start/iotdb-init">使用IoTDB存储指标数据(可选)</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/start/tdengine-init">使用TDengine存储指标数据(可选)</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/start/greptime-init">使用GreptimeDB存储指标数据(可选)</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/start/influxdb-init">使用InfluxDB存储指标数据(可选)</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/start/mysql-change">元数据使用Mysql存储(可选)</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/start/postgresql-change">元数据使用PostgreSQL存储(可选)</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/start/account-modify">配置修改账户密码(可选)</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/zh-cn/docs/start/custom-config">常见参数配置</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/zh-cn/docs/start/ssl-cert-practice">使用案例</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-cn/docs/advanced/extend-point">自定义监控</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/zh-cn/docs/template">监控模版</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-cn/docs/help/guide">帮助文档</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" aria-expanded="false" href="/zh-cn/docs/others/developer">其它</a></div></li></ul></nav></div></div></aside><main class="docMainContainer_gTbr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="页面路径"><ul class="breadcrumbs" itemscope="" itemtype="https://schema.org/BreadcrumbList"><li class="breadcrumbs__item"><a aria-label="主页面" class="breadcrumbs__link" href="/zh-cn/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">快速入门</span><meta itemprop="position" content="1"></li><li itemscope="" itemprop="itemListElement" itemtype="https://schema.org/ListItem" class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link" itemprop="name">使用案例</span><meta itemprop="position" content="2"></li></ul></nav><span class="theme-doc-version-badge badge badge--secondary">版本:v1.5.x</span><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">本页总览</button></div><div class="theme-doc-markdown markdown"><header><h1>SSL证书过期监控使用案例</h1></header><p>现在大部分网站都默认支持 HTTPS,我们申请的证书一般是3个月或者1年,很容易随着时间的流逝SSL证书过期了我们却没有第一时间发现,或者在过期之前没有及时更新证书。</p><p>这篇文章介绍如果使用 hertzbeat 监控系统来检测我们网站的SSL证书有效期,当证书过期时或证书快过期前几天,给我们发告警消息。</p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="hertzbeat是什么">HertzBeat是什么<a href="#hertzbeat是什么" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h4><p>HertzBeat 一个拥有强大自定义监控能力,无需Agent的实时监控工具。网站监测,PING连通性,端口可用性,数据库,操作系统,中间件,API监控,阈值告警,告警通知(邮件微信钉钉飞书)。</p><p>github: <a href="https://github.com/dromara/hertzbeat" target="_blank" rel="noopener noreferrer">https://github.com/dromara/hertzbeat</a><br>
<!-- -->gitee: <a href="https://gitee.com/dromara/hertzbeat" target="_blank" rel="noopener noreferrer">https://gitee.com/dromara/hertzbeat</a></p><h4 class="anchor anchorWithStickyNavbar_LWe7" id="安装-hertzbeat">安装 HertzBeat<a href="#安装-hertzbeat" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h4><p>1.如果不想安装可以直接使用云服务 <a href="https://console.tancloud.cn" target="_blank" rel="noopener noreferrer">TanCloud探云 console.tancloud.cn</a></p><ol start="2"><li><code>docker</code> 环境仅需一条命令即可安装</li></ol><p><code>docker run -d -p 1157:1157 --name hertzbeat tancloud/hertzbeat</code></p><ol start="3"><li>安装成功浏览器访问 <code>localhost:1157</code> 即可开始,默认账号密码 <code>admin/hertzbeat</code></li></ol><h4 class="anchor anchorWithStickyNavbar_LWe7" id="监控ssl证书">监控SSL证书<a href="#监控ssl证书" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h4><ol><li>点击新增SSL证书监控</li></ol><blockquote><p>系统页面 -&gt; 监控菜单 -&gt; SSL证书 -&gt; 新增SSL证书</p></blockquote><p><img loading="lazy" src="/zh-cn/assets/images/ssl_1-1ca043d3cdd151bd01ac35bcd8dc9f1e.png" width="1862" height="702" class="img_ev3q"></p><ol start="2"><li>配置监控网站</li></ol><blockquote><p>我们这里举例监控百度网站, 配置监控host域名,名称,采集间隔等。<br>
<!-- -->点击确定 注意⚠️新增前默认会先去测试网站连接性,连接成功才会新增,当然也可以把<strong>是否测试</strong>按钮置灰。</p></blockquote><p><img loading="lazy" src="/zh-cn/assets/images/ssl_2-5b6dd90f079ca240edda3c84af84885a.png" width="1867" height="807" class="img_ev3q"></p><ol start="3"><li>查看检测指标数据</li></ol><blockquote><p>在监控列表可以查看任务状态,进监控详情可以查看指标数据图表等。</p></blockquote><p><img loading="lazy" src="/zh-cn/assets/images/ssl_3-2be15d288750161ef733c372661a873b.png" width="1736" height="716" class="img_ev3q"></p><p><img loading="lazy" src="/zh-cn/assets/images/ssl_11-fa46c0a1cb0fd4029a8b5fb1d609b172.png" width="1905" height="910" class="img_ev3q"></p><ol start="4"><li>设置阈值(证书过期时触发)</li></ol><blockquote><p>系统页面 -&gt; 告警 -&gt; 告警阈值 -&gt; 新增阈值</p></blockquote><p><img loading="lazy" src="/zh-cn/assets/images/ssl_4-a70d80785671dd659d88d6600b4a512b.png" width="1894" height="609" class="img_ev3q"></p><blockquote><p>配置阈值,选择SSL证书指标对象,配置告警表达式-当指标<code>expired</code><code>true</code>触发,即<code>equals(expired,&quot;true&quot;)</code> , 设置告警级别通知模版信息等。</p></blockquote><p><img loading="lazy" src="/zh-cn/assets/images/ssl_5-a860222c6d3355f138f01da107eeb335.png" width="1710" height="931" class="img_ev3q"></p><blockquote><p>关联阈值与监控, 在阈值列表设置此阈值应用于哪些监控。</p></blockquote><p><img loading="lazy" src="/zh-cn/assets/images/ssl_6-8dce70b6caf5dc58718ce8a6707711db.png" width="1487" height="605" class="img_ev3q"></p><ol start="5"><li>设置阈值(证书过期前一周触发)</li></ol><blockquote><p>同理如上,新增配置阈值,配置告警表达式-当指标有效期时间戳 <code>end_timestamp</code><code>now()</code>函数为当前时间戳,若配置提前一周触发告警即:<code>end_timestamp &lt;= (now() + 604800000)</code> , 其中 <code>604800000</code> 为7天总时间差毫秒值。</p></blockquote><p><img loading="lazy" src="/zh-cn/assets/images/ssl_7-832596aa87845c2f31f1873f98f14357.png" width="1617" height="828" class="img_ev3q"></p><blockquote><p>最终可以在告警中心看到已触发的告警。</p></blockquote><p><img loading="lazy" src="/zh-cn/assets/images/ssl_8-8ff18a53d95e83e1ac04ca098d13aff7.png" width="1917" height="869" class="img_ev3q"></p><ol start="6"><li>告警通知(通过钉钉微信飞书等及时通知)</li></ol><blockquote><p>监控系统 -&gt; 告警通知 -&gt; 新增接收人</p></blockquote><p><img loading="lazy" src="/zh-cn/assets/images/ssl_9-696465905c19f5a6a7ae8b589416515f.png" width="1781" height="734" class="img_ev3q"></p><p>钉钉微信飞书等token配置可以参考帮助文档</p><p><a href="https://hertzbeat.apache.org/docs/help/alert_dingtalk" target="_blank" rel="noopener noreferrer">https://hertzbeat.apache.org/docs/help/alert_dingtalk</a><br>
<a href="https://tancloud.cn/docs/help/alert_dingtalk" target="_blank" rel="noopener noreferrer">https://tancloud.cn/docs/help/alert_dingtalk</a></p><blockquote><p>告警通知 -&gt; 新增告警通知策略 -&gt; 将刚才配置的接收人启用通知</p></blockquote><p><img loading="lazy" src="/zh-cn/assets/images/ssl_10-c1f682943a3ef8730606c0e766005d8b.png" width="1651" height="853" class="img_ev3q"></p><ol start="7"><li>OK 当阈值触发后我们就可以收到对应告警消息啦,如果没有配通知,也可以在告警中心查看告警信息。</li></ol><hr><h4 class="anchor anchorWithStickyNavbar_LWe7" id="完">完!<a href="#完" class="hash-link" aria-label="标题的直接链接" title="标题的直接链接"></a></h4><p>监控SSL证书的实践就到这里,当然对hertzbeat来说这个功能只是冰山一角,如果您觉得hertzbeat这个开源项目不错的话欢迎给我们在GitHub Gitee star哦,灰常感谢。感谢老铁们的支持。笔芯!</p><p><strong>github: <a href="https://github.com/dromara/hertzbeat" target="_blank" rel="noopener noreferrer">https://github.com/dromara/hertzbeat</a></strong></p><p><strong>gitee: <a href="https://gitee.com/dromara/hertzbeat" target="_blank" rel="noopener noreferrer">https://gitee.com/dromara/hertzbeat</a></strong></p></div><footer class="theme-doc-footer docusaurus-mt-lg"><div class="theme-doc-footer-edit-meta-row row"><div class="col"><a href="https://github.com/apache/hertzbeat/edit/master/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/start/sslcert-practice.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><div class="col lastUpdated_vwxv"></div></div></footer></article><nav class="pagination-nav docusaurus-mt-lg" aria-label="文档分页导航"><a class="pagination-nav__link pagination-nav__link--prev" href="/zh-cn/docs/start/custom-config"><div class="pagination-nav__sublabel">上一页</div><div class="pagination-nav__label">常见参数配置</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/zh-cn/docs/advanced/extend-point"><div class="pagination-nav__sublabel">下一页</div><div class="pagination-nav__label">自定义监控</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"></div></div></div></div></main></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>