SSL/TLS证书到期监控与Slack告警
中级
这是一个SecOps领域的自动化工作流,包含 7 个节点。主要使用 If, Code, Slack, HttpRequest, ScheduleTrigger 等节点。 带Slack告警的SSL/TLS证书到期监控
前置要求
- •Slack Bot Token 或 Webhook URL
- •可能需要目标 API 的认证凭证
分类
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"id": "N8lYj0OOkpuJcota",
"meta": {
"instanceId": "a287613f1596da776459594685fbf4e2b4a12124f80ab8c8772f5e37bff103ae",
"templateCredsSetupCompleted": true
},
"name": "SSL/TLS 证书到期监控与 Slack 告警",
"tags": [],
"nodes": [
{
"id": "6123946e-b16c-46e4-9fba-3d923a607289",
"name": "定时触发器",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-224,
-16
],
"parameters": {
"rule": {
"interval": [
{}
]
}
},
"typeVersion": 1.2
},
{
"id": "977d3ca9-ed8e-42d0-98c4-5bbbf40a7e7d",
"name": "监控域名列表",
"type": "n8n-nodes-base.code",
"position": [
0,
-16
],
"parameters": {
"jsCode": "const domainsToMonitor = [\n \"your-company.com\",\n \"mail.your-company.com\",\n \"api.your-company.com\"\n];\n\nreturn domainsToMonitor.map(domain => ({ json: { domain } }));"
},
"typeVersion": 2
},
{
"id": "200ddf00-400e-478c-9380-06c416bc154b",
"name": "检查证书到期时间",
"type": "n8n-nodes-base.httpRequest",
"position": [
224,
-16
],
"parameters": {
"url": "=https://api.certspotter.com/v1/certinfo?domain={{ $json.domain }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "060cb358-a136-4653-b82b-1546ae87351b",
"name": "证书即将到期?",
"type": "n8n-nodes-base.if",
"position": [
448,
-16
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "a73d70ba-5324-4964-8212-46c32caa4750",
"operator": {
"type": "number",
"operation": "lt"
},
"leftValue": "={{ new Date($json.result.expires) }}",
"rightValue": "={{ new Date(Date.now() + 30 * 24 * 60 * 60 * 1000) }}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "a71bec8f-aa12-4eed-b67f-b28a94577f30",
"name": "YOUR_SECURITY_ALERT_CHANNEL_ID",
"type": "n8n-nodes-base.slack",
"position": [
672,
-16
],
"webhookId": "977718e1-8480-48f0-a6f8-238371e66fa4",
"parameters": {
"text": "=🚨 *URGENT: SSL Certificate Expiry Alert!* 🚨\n\nDomain: *{{ $json.domain }}*\nExpires on: *{{ new Date($json.result.expires).toLocaleDateString() }}*\n\nPlease renew this certificate immediately to avoid downtime!",
"user": {
"__rl": true,
"mode": "id",
"value": "123123"
},
"select": "user",
"otherOptions": {}
},
"credentials": {
"slackApi": {
"id": "AFKF0YsguyhsagR0",
"name": "temp"
}
},
"typeVersion": 2.3
},
{
"id": "eb0a1434-9d97-4744-8a60-61debe8ea595",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-304,
-64
],
"parameters": {
"color": 3,
"width": 1184,
"height": 240,
"content": "## 流程"
},
"typeVersion": 1
},
{
"id": "2a070150-1bef-4e3c-aac5-093b9804f224",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-304,
208
],
"parameters": {
"color": 5,
"width": 1184,
"height": 1184,
"content": "### 💡 SSL/TLS 证书到期监控 🗓️"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "b8997d0d-d03b-424e-baeb-cda8afc9dd4c",
"connections": {
"Schedule Trigger": {
"main": [
[
{
"node": "List Domains to Monitor",
"type": "main",
"index": 0
}
]
]
},
"List Domains to Monitor": {
"main": [
[
{
"node": "Check Certificate Expiry",
"type": "main",
"index": 0
}
]
]
},
"Check Certificate Expiry": {
"main": [
[
{
"node": "Is Certificate Expiring?",
"type": "main",
"index": 0
}
]
]
},
"Is Certificate Expiring?": {
"main": [
[
{
"node": "YOUR_SECURITY_ALERT_CHANNEL_ID",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
中级 - 安全运维
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
基于Slack的自动化域名/IP黑名单监控
使用Slack警报监控AbuseIPDB黑名单中的域名和IP
If
Code
Slack
+3
7 节点Marth
安全运维
使用HIBP API的自动化数据泄露监控
使用HIBP API监控邮箱数据泄露并发送Slack警报
If
Code
Slack
+3
7 节点Marth
安全运维
带Slack的简单日志异常检测器
监控安全日志中的失败登录尝试并通过Slack发送警报
If
Code
Slack
+3
7 节点Marth
安全运维
简单网络安全品牌/漏洞提及监控器
监控X平台网络安全品牌提及并发送警报到Slack
If
Code
Slack
+4
8 节点Marth
安全运维
使用 DocuSign 和 Trello 的自动化候选人管理与反馈系统
使用 Slack、DocuSign、Trello 和 Gmail 通知的自动化招聘流程
If
Code
Wait
+9
29 节点Marth
人力资源
带RSS源的自动化漏洞新闻摘要
使用RSS源和Slack通知监控CISA关键漏洞警报
If
Code
Slack
+3
7 节点Marth
安全运维
工作流信息
难度等级
中级
节点数量7
分类1
节点类型6
作者
Marth
@marthSimplifying Business with Smart Automation. I create and share user-friendly, highly efficient n8n workflow templates for SMEs, focusing on digital marketing, sales, and operational excellence. Get ready to automate, innovate, and elevate your business. Connect me on Linkedin for custom solutions.
外部链接
在 n8n.io 查看 →
分享此工作流