Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions hertzbeat-manager/src/main/resources/define/app-mongodb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -464,3 +464,53 @@ metrics:
authenticationDatabase: ^_^authenticationDatabase^_^
command: hostInfo.extra
timeout: ^_^timeout^_^

- name: user_info
priority: 13
i18n:
zh-CN: 用户信息
en-US: User Info
ja-JP: ユーザー情報
fields:
- field: user
type: 1
label: true
i18n:
zh-CN: 用户名
en-US: User
ja-JP: ユーザー名
- field: db
type: 1
label: true
i18n:
zh-CN: 数据库
en-US: Database
ja-JP: データベース
- field: roles
type: 1
i18n:
zh-CN: 角色
en-US: Roles
ja-JP: ロール
- field: mechanisms
type: 1
i18n:
zh-CN: 认证机制
en-US: Auth Mechanisms
ja-JP: 認証メカニズム
- field: passwordDisgest
type: 1
i18n:
zh-CN: 密码摘要
en-US: Password Digest
ja-JP: パスワードダイジェスト
protocol: mongodb
mongodb:
host: ^_^host^_^
port: ^_^port^_^
username: ^_^username^_^
password: ^_^password^_^
database: admin
authenticationDatabase: ^_^authenticationDatabase^_^
command: usersInfo
timeout: ^_^timeout^_^
12 changes: 12 additions & 0 deletions home/docs/help/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,15 @@ keywords: [ open source monitoring tool, open source database monitoring tool, m
| pageSize | none | Size of a memory page in bytes. |
| numPages | none | Total number of memory pages. |
| maxOpenFiles | none | Maximum number of open files allowed. |

#### Metric set:user_info

| Metric name | Metric unit | Metric help description |
|----------------------|-------------|------------------------------------------------------------------------------------|
| user | none | MongoDB database user account name |
| db | none | Authentication database for the user |
| roles | none | Roles assigned to the user (JSON format) |
| mechanisms | none | Authentication mechanisms available for the user (e.g., SCRAM-SHA-256) |
| passwordDisgest | none | Password digest method (client or server-side) |

**Note**: This metric provides visibility into database user accounts, roles, and authentication settings. Use it to audit user permissions, track authentication mechanisms, and maintain security compliance. Configure alerts for unauthorized user creation or role changes to enhance database security monitoring.
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,16 @@ keywords: [ 开源监控系统, 开源数据库监控, MongoDB数据库监控 ]
| pageSize | 无 | 内存页大小 |
| numPages | 无 | 内存页数量 |
| maxOpenFiles | 无 | 系统中允许打开的最大文件数 |


#### 指标集合:用户信息

| 指标名称 | 指标单位 | 指标帮助描述 |
|---------------------|------|----------------------------------------|
| user | 无 | MongoDB 数据库用户账户名 |
| db | 无 | 用户的认证数据库 |
| roles | 无 | 分配给用户的角色(JSON格式) |
| mechanisms | 无 | 用户可用的认证机制(如 SCRAM-SHA-256) |
| passwordDisgest | 无 | 密码摘要方法(客户端或服务器端) |

**说明**:此指标提供数据库用户账户、角色和认证设置的可见性。用于审计用户权限、跟踪认证机制和维护安全合规性。可配置告警规则监测未授权的用户创建或角色变更,增强数据库安全监控。
Loading