数据采集 采集源配置 MongoDB 监控指标采集
MongoDB 监控指标采集
简介
采集 MongoDB 监控指标上报到 DataFlux 中
前置条件
- 已安装 DataKit(DataKit 安装文档)
配置
进入 DataKit 安装目录下的 conf.d/db
目录,参照其中的 mongodb.conf.sample
编辑一个 mongodb.conf
文件。示例如下:
[[inputs.mongodb]]
interval = "300s"
servers = ['mongodb://user:pass@host:port']
gather_perdb_stats = true
gather_col_stats = false
[inputs.mongodb.tags]
instance_name='DBA团队自建MongoDB单实例'
project='SuperCloud'
配置好后,重启 DataKit 即可。
采集指标
access log 指标
指标 | 描述 | 类型 | 单位 | Tag |
---|---|---|---|---|
active_reads |
执行读取操作的活跃客户端的数量 | int | - | hostname,node_type |
active_writes |
执行写入操作的活跃客户端的数量 | int | - | hostname,node_type |
commands |
每秒执行的数据库命令的数量 | int | - | hostname,node_type |
connections_current |
当前的连接数 | int | - | hostname,node_type |
connections_available |
还可以使用的连接数量 | int | - | hostname,node_type |
connections_total_created |
总共创建的连接数 | int | - | hostname,node_type |
cursor_timed_out_count |
过期的游标的数量 | int | - | hostname,node_type |
cursor_no_timeout_count |
未过期的游标的数量 | int | - | hostname,node_type |
cursor_pinned_count |
固定游标的数量 | int | - | hostname,node_type |
cursor_total_count |
游标总数量 | int | - | hostname,node_type |
deletes |
每秒删除的次数 | int | - | hostname,node_type |
document_deleted |
删除的文档总数 | int | - | hostname,node_type |
document_inserted |
插入的文档总数 | int | - | hostname,node_type |
document_returned |
返回的文档总数 | int | - | hostname,node_type |
document_updated |
更新的文档总数 | int | - | hostname,node_type |
flushes |
刷新所有写操作到磁盘的次数 | int | - | server |
flushes_total_time_ns |
mongod 进程花费在写数据到磁盘的总共时间 | int | ns | hostname,node_type |
getmores |
每秒执行 getmores 操作的次数 | int | - | hostname,node_type |
inserts |
每秒插入的次数 | int | - | hostname,node_type |
jumbo_chunks |
特大数据块的数量 | int | - | hostname,node_type |
member_status |
副本集状态 | int | - | hostname,node_type |
net_in_bytes_count |
MongoDB 实例接收的网络流量 | int | bytes | hostname,node_type |
net_out_bytes_count |
MongoDB 实例发送的网络流量 | int | bytes | server |
open_connections |
打开的连接数 | int | - | hostname,node_type |
percent_cache_dirty |
有脏数据的 cache 的百分比 | float | - | hostname,node_type |
percent_cache_used |
已使用的 cache 的百分比 | float | - | hostname,node_type |
queries |
数据库从启动后查询操作的总数 | int | - | hostname,node_type |
queued_reads |
等待读锁的队列中操作数目 | int | - | hostname,node_type |
queued_writes |
等待写锁的队列中操作数目 | int | - | hostname,node_type |
repl_commands |
数据库从启动后执行复制数据库命令操作的总数 | int | - | hostname,node_type |
repl_deletes |
数据库从启动后复制删除操作的总数 | int | - | hostname,node_type |
repl_getmores |
数据库从启动后执行复制 getmore 操作的总数,这里的值可能大于 query 的值 | int | - | hostname,node_type |
repl_inserts |
数据库从启动后复制插入操作的总数 | int | - | hostname,node_type |
repl_lag |
复制延时 | int | s | hostname,node_type |
repl_queries |
数据库从启动后复制查询操作的总数 | int | - | hostname,node_type |
repl_updates |
数据库从启动后复制更新操作的总数 | int | - | hostname,node_type |
repl_oplog_window_sec |
复制 oplog 的窗口大小 | int | - | hostname,node_type |
resident_megabytes |
MongoDB 使用的常驻内存的大小 | int | MB | hostname,node_type |
state |
服务器状态 | string | - | hostname,node_type |
total_available |
从当前 mongod/mongos 实例到当前正在使用的分片集群或副本集的其他成员的传出连接总数 | int | - | hostname,node_type |
total_created |
数据库总共创建的连接数,包括已经关闭的连接 | int | - | server |
total_in_use |
从当前 mongod/mongos 实例到当前正在使用的分片集群或副本集的其他成员的传出连接总数 | int | - | hostname,node_type |
total_refreshing |
从当前 mongod/mongos 实例到当前正在刷新的分片集群或副本集的其他成员的传出连接总数 | int | - | hostname,node_type |
ttl_deletes |
过期的删除数量 | int | - | hostname,node_type |
ttl_passes |
TTL 检查通过的数量 | int | - | hostname,node_type |
updates |
数据库从启动后更新操作的数量 | int | - | hostname,node_type |
vsize_megabytes |
mongodb 使用的虚拟内存的大小 | int | MB | hostname,node_type |
wtcache_app_threads_page_read_count |
应用线程读取 wiredTiger cache 中的 page 数 | int | - | server |
wtcache_app_threads_page_read_time |
应用线程读取wiredTiger cache 中 page 的时间 | int | - | hostname,node_type |
wtcache_app_threads_page_write_count |
应用线程读取wiredTiger cache 中 page 的时间 | float | - | hostname,node_type |
wtcache_bytes_read_into |
数据库每秒写入 wiredTiger cache 的字节数 | float | - | hostname,node_type |
wtcache_bytes_written_from |
数据库每秒从 wiredTiger cache 写入到磁盘的字节数 | float | - | hostname,node_type |
wtcache_pages_read_into |
数据库写入 wiredTiger cache 的 page 数 | int | - | hostname,node_type |
wtcache_pages_requested_from |
从 wiredTiger cache 请求的 page 数 | int | - | hostname,node_type |
wtcache_current_bytes |
数据库写入 wiredTiger cache 的总字节数 | int | - | hostname,node_type |
wtcache_max_bytes_configured |
数据库最大可写入 wiredTiger cache 的总字节数 | int | - | hostname,node_type |
wtcache_internal_pages_evicted |
wiredTiger cache 淘汰的内部 page 数 | int | - | hostname,node_type |
wtcache_modified_pages_evicted |
wiredTiger cache 淘汰的被修改过的 page 数 | int | - | hostname,node_type |
wtcache_unmodified_pages_evicted |
wiredTiger cache 淘汰的未被修改过的 page 数 | int | - | hostname,node_type |
wtcache_pages_evicted_by_app_thread |
wiredTiger cache 被应用线程淘汰的 page 数 | int | - | hostname,node_type |
wtcache_pages_queued_for_eviction |
wiredTiger cache 队列中待淘汰的 page 数 | int | - | hostname,node_type |
wtcache_server_evicting_pages |
wiredTiger cache 淘汰的 page 总数 | int | - | hostname,node_type |
wtcache_tracked_dirty_bytes |
wiredTiger cache 追踪的脏数据字节数 | int | - | hostname,node_type |
wtcache_worker_thread_evictingpages |
wiredTiger cache 工作线程淘汰的 page 数 | int | - | hostname,node_type |