新闻详情

新闻详情

首页 / 资讯中心 / 详情

Arkime Parliament 多集群监控面板:部署、配置、Issue 管理与告警实战指南

发布时间:2026/9/28 2:23:07来源:尧图网络
Arkime Parliament 多集群监控面板:部署、配置、Issue 管理与告警实战指南
网络安全网络后端数据可视化【免费下载链接】arkimeArkime is an open source, large scale, full packet capturing, indexing, and database system.项目地址https://gitcode.com/gh_mirrors/ar/arkime点击查看免费下载Arkime Parliament 是 Arkime 项目内置的多集群监控 Web 应用基于 Vue.js它把分散的多个 Arkime 集群组织成分组列表统一展示各集群的 ES 健康状态、统计指标与告警 Issue并支持通过 Slack / Twilio / Email 发送告警。本文基于 parliament/README.md 与 parliament/parliament.js 源码完整讲解 Parliament 的安装启动、认证角色、三大页面、Settings 参数、数据模型与底层轮询原理帮助你在多集群生产环境中快速落地一套统一的健康监控与告警体系。什么是 Parliament一屏纵览多个 Arkime 集群Parliament 是一个独立的 Node.js 服务前端基于 Vue.js项目由 Vue CLI 生成见 parliament/README.md。它的核心场景是当你拥有多套 Arkime 集群例如生产环境与预发布环境各一套或者多地域多数据中心各一套时不需要逐个登录每个 Viewer 去检查健康状态而是把所有这些集群聚合到同一个仪表盘中按分组Group展示集群列表每个集群带跳转链接、ES 健康状态与Issue 列表支持在 Parliament 内搜索 Arkime 集群可调整数据刷新时间界面默认 15 秒刷新一次鼠标悬停在 Issue 或 ES 健康状态上可查看详细信息。从源码看parliament.js 中服务端通过setInterval(() { updateParliament(); processAlerts(); }, 10000)每 10 秒主动巡检一次所有集群拉取健康数据与统计、清理过期 Issue 并发送告警UI 端再按设定频率展示最新数据。快速上手安装与启动从 RPM/DEB 包安装如果使用 Arkime 的预打包版本RPM/DEB直接运行配置脚本Configure --parliament该命令会安装并启动 Parliament 的 systemd 服务arkimeparliament参见 release/Configure 与 release/arkimeparliament.systemd.service默认监听8008 端口。反向代理配置Parliament 设计上是放在 Apache 等反向代理后面运行的README 给出了如下 Apache 配置示例ProxyPassMatch ^/$ http://localhost:8008/parliament retry0 ProxyPass /parliament/ http://localhost:8008/parliament/ retry0启动 Parliamentnode parliament.js -c /path/to/parliament.ini各启动参数说明如下参数默认值说明-n, --nameParliamentParliament 的名称适用于运行多个 Parliament 实例的场景如生产、预发布各一个-c, --config/opt/arkime/etc/parliament.ini配置文件路径-o section.keyvalue—覆盖配置文件中的值--debug—提高调试级别最多支持 2 级--insecure—对 https 调用禁用证书校验重要提示从 v4 升级到 v5 时port/key/cert等参数必须写入配置文件不能再以命令行参数的形式传入关于-o覆盖参数从 parliament.js 的实现可以看到带.的 key 会按section.key处理不带.的 key 会自动加上parliament.前缀例如-o port9000实际生效的是parliament.port9000。启动成功后浏览器访问http://localhost:8008或你在配置文件中指定的端口即可打开 Parliament 界面。配置文件样例release/parliament.ini.sample 给出了最精简的配置骨架[parliament] # 存放 parliament 数据分组、集群、设置的文件路径 file../etc/parliament.json # 监听端口 #port8008 ### Parliament 的认证方式与 viewer/cont3xt 保持一致请在所有组件中使用相同的配置 #usersElasticsearchhttp://localhost:9200 #usersPrefixarkime #authModedigest #passwordSecretpassword #httpRealmMoloch其中fileParliament 定义文件parliament.json的路径见下文「数据模型」一节usersElasticsearch/usersPrefix/authMode/passwordSecret/httpRealm用于对接 Arkime 用户数据库做认证与 Viewer 使用同一套设置port监听端口默认 8008。测试环境使用的完整配置可参考 tests/parliament.ini其中还包含usersUrl、dbUrl、geoLite2ASN、geoLite2Country等字段并指定file../parliament/parliament.dev.json。开发模式运行若要在开发与测试环境中启动应用# 进入 Arkime 仓库顶层目录后执行 npm run parliament:dev该命令定义在根目录 package.json 的parliament:dev会以必要的配置选项启动应用-c ../tests/parliament.ini并将未压缩的应用文件打包到parliament/vueapp/dist目录。parliament:dev使用 Vite 打包文件然后监视相关文件的变化每次保存后自动重新打包。开发模式启动后同样访问http://localhost:8008。注意 parliament/package.json 中声明了 Node 版本要求 20.9.0 23。认证与角色基于 Arkime 用户数据库的访问控制Parliament 的访问控制复用 Arkime 用户数据库。你可以在 Settings 页面的Authv4区域配置也可以在配置文件v5中配置usersElasticsearch/usersPrefix/authMode/passwordSecret/httpRealm等字段。注意从 v4 升级到 v5 时在 UI 中配置的 Auth 设置会自动迁移到配置文件中。这个迁移逻辑在 parliament/upgrade.js 中有完整实现当检测到旧版commonAuth设置时会将其逐项写入parliament.ini并删除旧字段。权限分层如下所有Arkime 用户都可以查看 Parliament 仪表盘拥有parliamentUser角色的用户可以确认ack、忽略ignore和删除Parliament 中的 Issue拥有parliamentAdmin角色的用户拥有parliamentUser的全部权限并且可以添加/删除/更新分组与集群、调整顺序、管理 Parliament 设置。在源码层面parliament.js 通过isUser与isAdmin两个中间件做权限校验分别调用req.user.hasRole(parliamentUser)/req.user.hasRole(parliamentAdmin)所有会修改数据的 API 都挂载了对应的角色校验tests/parliament.t 中也有针对「非 parliament 用户无法 acknowledge/ignore Issue、无法访问 settings 接口」的回归测试用例。三大页面详解Parliament 页面主仪表盘主页面允许用户数据库中的任何用户查看 Parliament 中的 Arkime 集群。拥有parliamentUser或parliamentAdmin角色的用户可以与集群交互确认/忽略 Issue。parliamentAdmin还可以进入Edit Mode编辑模式切换右上角导航栏下方的开关即可进入此时可以添加、更新、删除、重新排序分组Group与集群Cluster。Issues 页面Issues 页面列出 Parliament 当前遇到的所有 Issue。parliamentUser可以在这里忽略ignoreIssue确认acknowledgeIssue移除已确认的 Issue。两条关键的自动清理规则已确认acknowledged的 Issue 不会显示在主 Parliament 页面但仍保留在 Issues 页面以灰色显示可通过垃圾桶按钮手动移除或等待 15 分钟自动移除由removeAcknowledgedAfter设置控制已忽略ignored的 Issue 不会显示在主 Parliament 页面但仍保留在 Issues 页面灰色显示可通过 ignore 下拉按钮取消忽略或在设定的忽略时间到期后自动恢复。从 parliament.js 的cleanUpIssues()可以看到完整的清理逻辑未被确认的 Issue 超过removeIssuesAfter未再出现则移除已确认的 Issue 超过removeAcknowledgedAfter未再出现则移除若已确认的 Issue 仍然存在且超过removeAcknowledgedAfter则会自动取消确认并重新告警。Settings 页面parliamentAdmin可以查看并编辑 Parliament 设置。Settings 页面包含 3 个部分General通用设置以下设置均与 Issue 的产生和清理有关括号内为配置文件/数据模型中的字段名默认值以粗体标注capture nodes must check in this oftenoutOfDate控制 capture 节点所在集群的时间戳可以落后于当前时间多久。若时间戳超过该设置则向集群添加Out Of DateIssue。默认 30 秒。Elasticsearch query timeoutesQueryTimeout控制 ES 状态查询的最大持续时间。若查询超过该时间则向集群添加ES DownIssue。默认 5 秒。Low Packets ThresholdnoPackets控制 capture 节点必须收到的最小数据包数量。若节点收到的包数不足则向集群添加Low PacketsIssue可设置为-1完全忽略该 Issue。该设置还包含一个持续时间范围noPacketsLength即该问题必须持续多久才添加 Issue。默认 0 个包持续 10 秒。remove all issues afterremoveIssuesAfter控制 Issue 在未再次出现时的移除时间。只要 Issue 未再次出现到期即从集群移除。默认 60 分钟。remove acknowledged issues afterremoveAcknowledgedAfter控制已确认 Issue 的移除时间。到期自动移除无需手动使用垃圾桶按钮。默认 15 分钟。需要说明的是源码 parliament.js 中的settingsDefault还包含 README 未展开的两个磁盘空间监控参数capture 节点低磁盘阈值lowDiskSpace默认 4类型lowDiskSpaceType默认percentage也可设为gb与 ES 节点低磁盘阈值lowDiskSpaceES默认 15。当磁盘剩余空间低于阈值时会分别产生Low Disk Space与ES Low Disk Space黄色告警其判断逻辑见 getStats()。此外还有hostname用于在告警消息中附带 Parliament 仪表盘链接与includeUrl是否在告警中附带 Dashboard 链接等字段。Auth (v4)在此配置使用 Arkime 用户数据库进行访问控制详见上文「认证与角色」一节。Notifiers通知器可以在此为 Parliament 配置告警渠道支持SlackTwilioEmail每个通知器可以针对不同类型的 Issue 分别配置是否告警。各通知器所需的字段定义在 common/notifier.notifme.js基于 notifme SDK 实现通知器必填字段说明SlackslackWebhookUrlSlack Incoming Webhook 地址TwilioaccountSid、authToken、toNumber、fromNumberTwilio 账号 ID、认证令牌、收/发短信号码Emailhost、port、from、to可选secure、user、passwordSMTP 主机、端口、发件/收件地址、用户名与密码告警发送流程见 buildAlert()系统只对已开启且对应 Issue 类型已勾选的通知器发送告警告警消息为集群标题 - Issue 消息经过ArkimeUtil.safeStr转义以防注入并会按 250ms 间隔串行发送以避免洪泛。还可以通过设置hostnameincludeUrl在告警中附带指向该集群的 Parliament Dashboard 链接。数据模型Parliament 定义文件与 Issue 文件parliament.jsonParliament 定义parliament.json或你在配置中通过file指定的任意文件描述你的 Parliament 组成。可以手工创建也可以使用 Parliament UI 来创建、编辑和删除分组与集群。参考示例见 parliament/parliament.example.json。parliament.issues.jsonIssue 存储parliament.issues.json会在运行时自动创建用于存储与 Parliament 中各集群相关的 Issue。从 parliament.js 可以看到如果file以.json结尾Issue 文件名会取file去掉扩展名后加上.issues.json文件不存在时初始化为空数组之后每次 Issue 变更都会写回该文件。Parliament 模型{ // parliament object version: x, // version (number) groups: [ ... ], // list of groups in the parliament settings: { // parliament settings general: { // general settings // capture nodes need to check in at least this often (number of seconds) // if a capture node has not checked in, an Out Of Date issue will be added to the nodes cluster outOfDate: 30, // Elasticsearch query timeout (number of seconds) // Aborts the queries and adds an ES Down issue if no response is received esQueryTimeout: 5, // Remove all issues after (number of minutes) // Removes issues that have not been seen again after the specified time removeIssuesAfter: 60, // Remove acknowledged issues after (number of minutes) // Removes acknowledged issues that have not been seen again after the specified time removeAcknowledgedAfter: 15 }, notifiers: { // notifiers (defined in common/notifier.js) notifierX: { // notifier (object) // name of the notifier displayed in the UI (string) name: slack, // turns on/off this notifier (boolean) on: false, // fields necessary to notify via this notifier (object) // (defined in common/notifier.js) fields: {}, // which issues to alert on via this notifier (object) alerts: {} } } } }Group 模型{ // group object title: Group Title, // group title (string, *required) description: Group description, // group description (string) clusters: [ ... ] // list of clusters in the group }Cluster 模型{ // cluster object // cluster title (string, *required) title: Cluster title, // cluster description (string) description: Cluster description, // cluster external url for links in the UI (string, *required) url: https://somewhere.com, // cluster local url for fetching health/stats data (string, defaults to url if not supplied) localUrl: https://localhost:port, // which type of cluster this is. types include: // noAlerts - no alerts, stats, health, link to cluster // multiviewer - no alerts, no stats, health, link to cluster // disabled - no alerts, no stats, no health, no link to cluster // (defaults to undefined) type: multiviewer, // whether to hide delta bytes per second stats (defaults to false) hideDeltaBPS: false, // whether to hide delta packet drops per second (defaults to false) hideDeltaTDPS: false, // whether to hide number of nodes (defaults to false) hideDataNodes: false, // whether to hide the total number of nodes (defaults to false) hideTotalNodes: false }补充说明源码级从 parliament.js 的apiCreateCluster看新建集群时还会初始化idUUID、hideMonitoring、hideArkimeNodes等字段hideDeltaBPS、hideDeltaTDPS、hideMonitoring、hideArkimeNodes、hideDataNodes、hideTotalNodes都用于按需隐藏仪表盘上的对应统计列。type的实际行为在 updateParliament() 中体现disabled集群完全跳过健康与统计拉取multiviewer集群跳过统计拉取但保留健康检查而noAlerts/multiviewer集群在 setIssue() 中不会触发告警。Issue 模型{ // issue object // the type of issue: esDown, esRed, esDropped, outOfDate, or noPackets (string) type: esDown, // the specific error encountered (string) value: Error: Issue Error, // human readable text to describe the type of issue (string) text: ES is down, // human readable title to be displayed in the UI instead of type (string) title: ES Down, // how severe the issue is: red or yellow (string) severity: red, // the ID of the cluster that the issue pertains to (string) clusterId: 1, // more verbose info to be displayed in the UI (string) // concatenation of issue title and value message: ES is down: Error: Issue error, // time that the issue was first noticed in ms (number) firstNoticed: 1234567890, // time that the issue was last noticed in ms (number) lastNoticed: 1234567890, // time that parliament issued an alert in ms (number) alerted: 1234567890, // time that the issue was acknowledged by a user in ms (number) acknowledged: 1234567890, // time that the issue will be ignored until in ms (number) // once the current time has passed this value, the issue will alert again ignoreUntil: 1234567890 }补充说明源码级parliament.js 中定义的完整 Issue 类型共 8 种——esRedES 状态为红、esDownES 不可达、esDroppedES 正在丢弃 bulk 插入黄色、outOfDate节点未按时上报、noPackets节点收包过少、lowDiskSpacecapture 节点磁盘不足黄色、lowDiskSpaceESES 节点磁盘不足黄色。另外每个 Issue 在首次被检测到时会被标记为provisional暂定只有当同一 Issue 在下一轮巡检中再次出现时才转为正式 Issue 并触发告警避免误报ignoreUntil若为-1则表示永久忽略ms-1的忽略请求在 ignoreIssues API 中处理。底层原理10 秒一轮的巡检、健康检查与统计拉取理解 Parliament 的工作机制后排查问题会更有方向。核心流程updateParliament()如下每10 秒触发一次巡检服务端setInterval遍历所有分组与集群对非disabled集群调用getHealth()拉取${cluster.localUrl ?? cluster.url}/eshealth.json对非multiviewer/disabled集群调用getStats()拉取${cluster.localUrl ?? cluster.url}/api/parliament根据返回数据判断并写入 IssueES 状态为 red →esRed请求超时/失败 →esDown节点时间戳落后超过outOfDate→outOfDate收包低于noPackets且持续超过noPacketsLength→noPackets丢包率大于 0 →esDropped磁盘低于阈值 →lowDiskSpace/lowDiskSpaceES执行cleanUpIssues()清理过期/已确认的 Issue随后调用processAlerts()发送告警。其中getStats()会在发起请求前记录当前时间再与每个节点上报的currentTime对比计算是否超时避免请求耗时干扰outOfDate判断。noPackets的判断使用了内存 Map 记录首次出现时间parliament.js只有当持续时长达到noPacketsLength才真正产生 Issue节点恢复收包后记录会被清除。两个值得注意的防御性设计所有从被监控集群拉取的健康/统计响应都被限制在10MB以内MAX_CLUSTER_RESPONSE_SIZE见 parliament.js防止异常 Viewer/ES 节点耗尽 Parliament 内存Issue 写入前会通过validateIssues()校验避免把空数组写坏 Issue 文件。Parliament 数据分组、集群、设置默认存入 ESusersPrefixparliament索引从源码看也支持 LMDB、Redis、SQLite 等后端Parliament.initialize() 依据dbUrl/usersUrl协议自动选择实现。版本升级机制parliament/upgrade.js 负责旧版 Parliament 定义的自动升级当前最低版本MIN_PARLIAMENT_VERSION 7用户库最低版本MIN_DB_VERSION 79。升级过程会依次处理将旧的cluster.disabled/cluster.multiviewer布尔字段迁移为cluster.type把旧版 settings 中的 notifiers 迁入数据库与 Viewer 的通知器合并遇到同名则重命名为Parliament name并补充roles/user/users等字段将commonAuth认证设置迁移到parliament.ini配置为每个 group/cluster 生成新的 UUID 并同步更新 Issue 中的clusterId将hideMolochNodes重命名为hideArkimeNodes清除运行时字段healthError、statsError、status等最后把整个 Parliament 对象写入数据库。启动时若检测到旧版本文件initializeParliament() 会打印升级警告并自动执行上述迁移成功后将升级后的文件写回磁盘。测试与验证Parliament 的权限与 API 行为有完整的回归测试支撑参考 tests/parliament.t普通用户无parliamentUser角色可以查看/api/parliament与/api/issues但调用 acknowledge / ignore / removeAllAcknowledgedIssues 等写操作会收到Permission Denied: Not a Parliament userparliamentUser可以访问 Issue 更新类接口parliamentAdmin才能访问 notifier 类型、settings 等管理接口。这些用例配合 tests/parliament.ini使用authModeregressionTests的测试认证模式即可在本地复现权限边界。常见问题排查要点Parliament 打不开确认node parliament.js -c ...已启动且 8008 端口未被占用若配置了webBasePath或反向代理注意ProxyPass的路径前缀需与浏览器访问路径一致。看不到任何集群检查file指向的parliament.json是否包含 groups/clusters 定义可参考 parliament/parliament.example.json并在 Edit Mode 下添加集群启动时若 Parliament 定义文件无法解析进程会报错退出parliament.js。一直产生ES Down重点排查esQueryTimeout默认 5 秒是否过短以及集群的url/localUrl是否可达——注意localUrl是服务端拉取健康/统计使用的地址应指向能被 Parliament 服务器访问到的内网地址。Low Packets误报确认noPackets阈值默认 0与noPacketsLength默认 10 秒是否符合你的流量特征或者直接设为-1忽略该 Issue。收不到告警按 common/notifier.notifme.js 中的字段要求补齐 Slack / Twilio / Email 配置并确保对应通知器开关与 Issue 类型勾选均已打开可通过/parliament/api/notifier/:id/test接口发送测试告警见 parliament.js。结语Arkime Parliament 用一套轻量的 Node.js 服务把多集群的 ES 健康、统计指标、Issue 生命周期与第三方告警渠道串成一条完整的可观测链路。无论是几十个节点的单集群还是跨地域的多集群矩阵掌握本文的安装配置、角色权限、Settings 参数与数据模型再结合 parliament/parliament.js、parliament/upgrade.js 与 tests/parliament.t 的源码与测试你就能在生产环境中独立部署并调优自己的 Parliament 监控中心。赞分享网络安全网络后端数据可视化【免费下载链接】arkimeArkime is an open source, large scale, full packet capturing, indexing, and database system.项目地址https://gitcode.com/gh_mirrors/ar/arkime点击查看免费下载相关推荐MicroK8s集群监控PrometheusGrafana部署与告警配置MicroK8s集群监控PrometheusGrafana部署与告警配置 MicroK8s作为轻量级Kubernetes发行版提供了完整的容器编排能力。集云原生容器编排边缘计算物联网运维Apache Pulsar 集群监控部署指南指标采集、Prometheus 配置与 Grafana 面板实践Apache Pulsar 集群监控部署指南指标采集、Prometheus 配置与 Grafana 面板实践 本篇技术指南围绕 Apache Pulsar 集消息队列后端流处理TDengine 集群可视化监控实战TDinsight 仪表盘安装、部署与告警配置全指南TDengine 集群可视化监控实战TDinsight 仪表盘安装、部署与告警配置全指南 TDinsight 是 TDengine 官方提供的基于 Grafa数据库时序数据库物联网大数据实时分析云原生上一篇Granite-Speech-4.1-2B-Plus部署优化在消费级GPU上实现9分钟音频实时转写下一篇PHPStan 错误标识详解return.missing——函数缺少 return 语句创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
网站建设高端定制企业官网
RELATED

相关资讯

更多精彩内容,欢迎继续阅读

较早相关资讯

最新相关资讯

Keil软件仿真逻辑分析仪与串口调试实战指南 2026/9/28 3:27:09

Keil软件仿真逻辑分析仪与串口调试实战指南

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

阅读更多 →
TypeGraphQL 性能优化指南:从基准测试到 simpleResolvers 实战调优 2026/9/28 3:27:08

TypeGraphQL 性能优化指南:从基准测试到 simpleResolvers 实战调优

后端GraphQLAPI设计 【免费下载链接】type-graphql Create GraphQL schema and resolvers with TypeScript, using classes and decorators! 项目地址: https://gitcode.com/gh_mirrors/ty/type-graphql 点击查看 免费下载 TypeGraphQL 是基于 graphql-js 之上的一…

阅读更多 →
Guardrails 0.10.1 恶意 PyPI 包事件解读:安全公告全文分析、应急响应步骤与供应链防御复盘 2026/9/28 3:27:07

Guardrails 0.10.1 恶意 PyPI 包事件解读:安全公告全文分析、应急响应步骤与供应链防御复盘

AI 安全治理模型安全AI 应用 【免费下载链接】guardrails Adding guardrails to large language models. 项目地址: https://gitcode.com/gh_mirrors/gu/guardrails 点击查看 免费下载 2026 年 5 月,guardrails-ai 在 PyPI 上发布的 0.10.1 版本被发现携…

阅读更多 →
Impeller 渲染术语全景:从 Device/Host 到 Android Hardware Buffers 的 GPU 后端导读 2026/9/28 3:27:01

Impeller 渲染术语全景:从 Device/Host 到 Android Hardware Buffers 的 GPU 后端导读

跨平台图形学前端 【免费下载链接】engine The Flutter engine 项目地址: https://gitcode.com/gh_mirrors/eng/engine 点击查看 免费下载 本指南以 Flutter 引擎仓库中 impeller/docs/glossary.md 为核心骨架,系统梳理 Impeller 渲染引擎中最关键的基础…

阅读更多 →
使用 devenv 搭建 Go 开发环境:全部配置项详解与源码级原理剖析 2026/9/28 3:27:00

使用 devenv 搭建 Go 开发环境:全部配置项详解与源码级原理剖析

开发工具CLI 【免费下载链接】devenv Fast, Declarative, Reproducible, and Composable Developer Environments using Nix 项目地址: https://gitcode.com/gh_mirrors/de/devenv 点击查看 免费下载 devenv 是一套基于 Nix 的声明式开发者环境工具,通过…

阅读更多 →
5步图解HTML转WordPress教程,告别模板丑站 2026/9/28 3:26:53

5步图解HTML转WordPress教程,告别模板丑站

5步图解HTML转WordPress教程,告别模板丑站 做站三年,最崩溃的时刻不是代码报错,而是客户指着那个“高大上”的HTML静态页面说:“这太丑了,改吧。”你一脸懵,因为那其实是他们选的最便宜模板。…

阅读更多 →

今日资讯

本周资讯

本月资讯

看完文章仍有疑问?

联系尧图顾问,获取一对一建站咨询

立即免费咨询 📞 400-888-8888
📞 ✉