NameNode自定义监控

本文详细介绍了HBase39集群中HDFS NameNode的各项监控指标,包括文件系统详细信息、JVM指标、操作信息及RPC信息等。通过对这些核心指标的解读,有助于更好地理解NameNode的工作状态并进行有效监控。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

采集指标的地址(以HBase39集群的HDFS为例):http://xxxxxx:50070/jmx?qry=Hadoop:service=NameNode,name=*


一、NameNode文件系统详细信息(核心指标

Hadoop:service=NameNode,name=FSNamesystem
Hadoop:service=NameNode,name=FSNamesystemStat
MetricType(GAUGE,COUNTER)类型业务意义备注
MissingBlocks
GAUGE
 Current number of missing blocks 
ExpiredHeartbeats
GAUGE
 Total number of expired heartbeats 
TransactionsSinceLastCheckpoint
GAUGE
 Total number of transactions since last checkpoint 
TransactionsSinceLastLogRoll
GAUGE
 Total number of transactions since last edit log roll 
LastCheckpointTime
GAUGE
msTime in milliseconds since epoch of last checkpoint 
CapacityTotal
GAUGE
Byte Current raw capacity of DataNodes in bytes 
CapacityUsedGAUGEByteCurrent used capacity across all DataNodes in bytes 
CapacityRemaining
GAUGEByteCurrent remaining capacity in bytes 
TotalLoad
GAUGE Current number of connections 
SnapshottableDirectoriesGAUGE Current number of snapshottable directories 
SnapshotsGAUGE Current number of snapshots 
BlocksTotal
 
GAUGE  块数量 
FilesTotal
 
GAUGE 文件数量  
NumLiveDataNodes
 
GAUGE  活跃的DN数量  
NumDeadDataNodes
GAUGE  死掉的DN数量  
 
NumDecomLiveDataNodes
GAUGE 活跃的DN中处于“ Decommission”的数量  
NumDecomDeadDataNodes
 
GAUGE  死亡的DN中处于“ Decommission”的数量 

二、NameNode JvmMetrics详细信息(核心指标)

Hadoop:service=NameNode,name=JvmMetrics

MetricType(GAUGE,COUNTER)类型业务意义备注
GcCountParNew
COUNTER
 新生代GC次数 
GcTimeMillisParNew
COUNTER
ms新生代GC耗时(ms) 
GcCountConcurrentMarkSweep
COUNTER
 老年代GC次数 
GcTimeMillisConcurrentMarkSweep
COUNTER
ms老年代GC耗时(ms) 
GcCount
COUNTER
 总的GC次数 
GcTimeMillis
COUNTER
ms总的GC耗时(ms) 

三、NameNode操作信息(核心指标)

Hadoop:service=NameNode,name=NameNodeActivity
MetricType(GAUGE,COUNTER)类型业务意义备注
CreateFileOps
COUNTER
 Total number of files created 
FilesCreated
COUNTER  Total number of files and directories created by create or mkdir operations  
FilesAppended 
COUNTER  Total number of files appended  
GetBlockLocations
COUNTER  Total number of getBlockLocations operations  
FilesRenamed
COUNTER  Total number of rename operations (NOT number of files/dirs renamed)  
GetListingOps  COUNTER Total number of directory listing operations  
DeleteFileOps  COUNTER Total number of delete operations  
FilesDeleted  COUNTER Total number of files and directories deleted by delete or rename operations  
FileInfoOps  COUNTER Total number of getFileInfo and getLinkFileInfo operations  
AddBlockOps COUNTER  Total number of addBlock operations succeeded  
GetAdditionalDatanodeOps COUNTER  Total number of getAdditionalDatanode operations  
CreateSymlinkOps COUNTER  Total number of createSymlink operations 
GetLinkTargetOps COUNTER  Total number of getLinkTarget operations  
FilesInGetListingOps  COUNTER Total number of files and directories listed by directory listing operations  
AllowSnapshotOps  COUNTER Total number of allowSnapshot operations  
DisallowSnapshotOpsCOUNTER Total number of disallowSnapshot operations 
CreateSnapshotOpsCOUNTER Total number of createSnapshot operations 
DeleteSnapshotOpsCOUNTER Total number of deleteSnapshot operations 
RenameSnapshotOpsCOUNTER Total number of renameSnapshot operations 
ListSnapshottableDirOpsCOUNTER Total number of snapshottableDirectoryStatus operations 
SnapshotDiffReportOpsCOUNTER Total number of getSnapshotDiffReport operations 
TransactionsNumOpsCOUNTER Total number of Journal transactions 
TransactionsAvgTimeGAUGEmsAverage time of Journal transactions in milliseconds 
SyncsNumOpsCOUNTER Total number of Journal syncs 
SyncsAvgTimeGAUGEmsAverage time of Journal syncs in milliseconds 
TransactionsBatchedInSyncCOUNTER Total number of Journal transactions batched in sync 
BlockReportNumOpsCOUNTER Total number of processing block reports from DataNode 
BlockReportAvgTimeGAUGEmsAverage time of processing block reports in milliseconds 
CacheReportNumOpsCOUNTER Total number of processing cache reports from DataNode 
CacheReportAvgTimeGAUGEmsAverage time of processing cache reports in milliseconds 
SafeModeTimeGAUGEmsThe interval between FSNameSystem starts and the last time safemode leaves in milliseconds.   
FsImageLoadTimeGAUGE Time loading FS Image at startup in milliseconds 
GetEditNumOpsCOUNTER Total number of edits downloads from SecondaryNameNode 
GetEditAvgTimeGAUGEmsAverage edits download time in milliseconds 
GetImageNumOpsCOUNTER Total number of fsimage downloads from SecondaryNameNode 
GetImageAvgTimeGAUGEmsAverage fsimage download time in milliseconds 
PutImageNumOpsCOUNTER Total number of fsimage uploads to SecondaryNameNode 
PutImageAvgTimeGAUGEmsAverage fsimage upload time in milliseconds 

 

 

四、NameNode RPC详细信息(非核心指标,暂不采集)

hadoop:service=NameNode,name=RpcDetailedActivityForPort*

MetricType(GAUGE,COUNTER)类型业务意义备注
SetSafeModeNumOps
COUNTER
   
SetSafeModeAvgTime
GAUGEms  
GetFileInfoNumOps
 COUNTER Total number of getFileInfo and getLinkFileInfo operations 
GetFileInfoAvgTime
 GAUGEms  
GetBlockLocationsNumOps
 COUNTER   
GetBlockLocationsAvgTime
 GAUGEms  
GetListingNumOps
 COUNTER   
GetListingAvgTime
 GAUGEms  
GetContentSummaryNumOps
 COUNTER   
GetContentSummaryAvgTime
 GAUGEms  
MkdirsNumOps
 COUNTER   
MkdirsAvgTime
 GAUGEms  
SetPermissionNumOps
 COUNTER   
SetPermissionAvgTime
 GAUGEms  
CreateNumOps
 COUNTER   
CreateAvgTime
 GAUGEms  
 
AddBlockNumOps
 COUNTER   
AddBlockAvgTime
 GAUGEms  
 
GetServerDefaultsNumOps
 COUNTER   
 
GetServerDefaultsAvgTime
 GAUGEms  
 
CompleteNumOps
 COUNTER   
CompleteAvgTime
GAUGEms  
DeleteNumOps
COUNTER   
DeleteAvgTime
GAUGEms  
AppendNumOps
COUNTER   
AppendAvgTime
GAUGEms  
RenameNumOps
COUNTER   
RenameAvgTime
GAUGEms  
FileNotFoundExceptionNumOps
COUNTER   
FileNotFoundExceptionAvgTime
GAUGEms  
SetOwnerNumOps
COUNTER   
SetOwnerAvgTime
GAUGEms  
     
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值