夜莺-Nightingale
夜莺V6
项目介绍 架构介绍
快速开始
黄埔营
安装部署
升级
采集器
使用手册
API
数据库表结构
FAQ
夜莺专业版
开源生态
Prometheus
版权声明
第1章:天降奇兵
第2章:探索PromQL
第3章:Prometheus告警处理
第4章:Exporter详解
第5章:数据与可视化
第6章:集群与高可用
第7章:Prometheus服务发现
第8章:监控Kubernetes
第9章:Prometheus Operator
参考资料

netstat采集插件

netstat采集插件

设置disable_summary_stats=false时,会采集/proc/net/sockstat 生成以下指标(内核版本不同,指标可能会有差异)

netstat_sockets_used # 所有类型的socket数量
netstat_tcp_inuse # tcp 正在使用的tcp数量
netstat_tcp_orphan # tcp 孤儿连接数量(已经不占有fd)等待销毁
netstat_tcp_tw # tcp timewait 连接数量
netstat_tcp_alloc # tcp 各个状态的连接总数量
netstat_tcp_mem # tcp 连接已分配的内存(内存页)
netstat_udp_inuse # 正在使用的udp数量
netstat_udp_mem # udp 已经分配的内存(内存页)
netstat_udplite_inuse # 正在使用的udp lite数量
netstat_raw_inuse #  正在使用的raw socket数量 
netstat_frag_inuse # ip fragement数量
netstat_frag_memory # ip fragement 已经分配的内存(byte)

设置disable_connection_stats=false时,会采集/proc/net/{tcp,tcp6,udp,udp6,unix...} 生成以下指标(内核版本不同,指标可能会有差异)

连接数多的场景下,这类指标计算很消耗cpu, 建议不要开启 /proc/下获取所有pid ,然后 读取/proc/{pid}/fd 所有socket类型的inode 然后读取/proc/net/{tcp,tcp6,udp,udp6,unix…} 每个inode都要计算一遍

netstat_udp_socket
netstat_tcp_established
netstat_tcp_syn_sent
netstat_tcp_fin_wait1
netstat_tcp_time_wait
netstat_tcp_last_ack
netstat_tcp_none
netstat_tcp_syn_recv
netstat_tcp_fin_wait2
netstat_tcp_close
netstat_tcp_close_wait
netstat_tcp_listen
netstat_tcp_closing

设置tcp_ext=true/proc/net/netstat中采集TcpExt以下指标(内核版本不同,指标可能会有差异)

netstat_tcpext_TCPPureAcks
netstat_tcpext_TCPRenoRecoveryFail
netstat_tcpext_TCPRetransFail
netstat_tcpext_TCPHystartTrainDetect
netstat_tcpext_ListenDrops
netstat_tcpext_TCPHPAcks
netstat_tcpext_TCPFullUndo
netstat_tcpext_TCPOFOQueue
netstat_tcpext_TCPFastOpenPassive
netstat_tcpext_TCPFastOpenBlackhole
netstat_tcpext_DelayedACKLocked
netstat_tcpext_TCPACKSkippedSynRecv
netstat_tcpext_TCPOFOMerge
netstat_tcpext_TCPHPHits
netstat_tcpext_TCPLostRetransmit
netstat_tcpext_TCPFastOpenListenOverflow
netstat_tcpext_TCPFastOpenCookieReqd
netstat_tcpext_TCPWantZeroWindowAdv
netstat_tcpext_TCPSynRetrans
netstat_tcpext_TCPACKSkippedSeq
netstat_tcpext_SyncookiesFailed
netstat_tcpext_PAWSActive
netstat_tcpext_TCPSackRecovery
netstat_tcpext_TCPLossProbeRecovery
netstat_tcpext_TCPDSACKRecv
netstat_tcpext_TCPFromZeroWindowAdv
netstat_tcpext_OfoPruned
netstat_tcpext_ListenOverflows
netstat_tcpext_TCPDSACKUndo
netstat_tcpext_IPReversePathFilter
netstat_tcpext_SyncookiesSent
netstat_tcpext_TCPSackRecoveryFail
netstat_tcpext_TCPRcvCollapsed
netstat_tcpext_TCPChallengeACK
netstat_tcpext_TCPFastRetrans
netstat_tcpext_TCPRenoReorder
netstat_tcpext_TCPLossFailures
netstat_tcpext_TCPTimeouts
netstat_tcpext_TCPOFODrop
netstat_tcpext_BusyPollRxPackets
netstat_tcpext_TCPToZeroWindowAdv
netstat_tcpext_PAWSEstab
netstat_tcpext_ArpFilter
netstat_tcpext_TWRecycled
netstat_tcpext_DelayedACKs
netstat_tcpext_TCPKeepAlive
netstat_tcpext_TCPWqueueTooBig
netstat_tcpext_RcvPruned
netstat_tcpext_TCPLossProbes
netstat_tcpext_TCPRcvCoalesce
netstat_tcpext_TCPFastOpenActive
netstat_tcpext_TCPPartialUndo
netstat_tcpext_PruneCalled
netstat_tcpext_TCPTSReorder
netstat_tcpext_TCPDSACKOldSent
netstat_tcpext_TCPDSACKOfoSent
netstat_tcpext_TCPReqQFullDrop
netstat_tcpext_TCPHystartDelayCwnd
netstat_tcpext_TCPACKSkippedPAWS
netstat_tcpext_EmbryonicRsts
netstat_tcpext_TCPACKSkippedChallenge
netstat_tcpext_TCPMTUPFail
netstat_tcpext_TCPACKSkippedTimeWait
netstat_tcpext_TCPSACKReneging
netstat_tcpext_TCPSackFailures
netstat_tcpext_TCPSlowStartRetrans
netstat_tcpext_TCPTimeWaitOverflow
netstat_tcpext_TCPHystartTrainCwnd
netstat_tcpext_TCPMTUPSuccess
netstat_tcpext_SyncookiesRecv
netstat_tcpext_DelayedACKLost
netstat_tcpext_TCPSACKReorder
netstat_tcpext_TCPLossUndo
netstat_tcpext_TCPDeferAcceptDrop
netstat_tcpext_TCPAutoCorking
netstat_tcpext_LockDroppedIcmps
netstat_tcpext_TCPRenoFailures
netstat_tcpext_TCPDSACKOfoRecv
netstat_tcpext_TCPAbortOnData
netstat_tcpext_TCPAbortOnClose
netstat_tcpext_TCPReqQFullDoCookies
netstat_tcpext_TCPFastOpenActiveFail
netstat_tcpext_OutOfWindowIcmps
netstat_tcpext_TCPFastOpenPassiveFail
netstat_tcpext_TCPSpuriousRtxHostQueues
netstat_tcpext_TCPOrigDataSent
netstat_tcpext_TCPHystartDelayDetect
netstat_tcpext_TCPWinProbe
netstat_tcpext_TCPRenoRecovery
netstat_tcpext_TWKilled
netstat_tcpext_TCPSYNChallenge
netstat_tcpext_TCPACKSkippedFinWait2
netstat_tcpext_TW

设置ip_ext=true/proc/net/netstat中采集IpExt,生成以下指标(内核版本不同,指标可能会有差异)

netstat_ipext_InNoRoutes
netstat_ipext_OutMcastOctets
netstat_ipext_InBcastOctets
netstat_ipext_InECT1Pkts
netstat_ipext_InMcastOctets
netstat_ipext_InNoECTPkts
netstat_ipext_InMcastPkts
netstat_ipext_OutMcastPkts
netstat_ipext_InBcastPkts
netstat_ipext_OutBcastPkts
netstat_ipext_InOctets
netstat_ipext_OutBcastOctets
netstat_ipext_InECT0Pkts
netstat_ipext_InCEPkts
netstat_ipext_ReasmOverlaps
netstat_ipext_InTruncatedPkts
netstat_ipext_OutOctets
netstat_ipext_InCsumErrors
开源版
Flashcat
Flashduty