search
数据采集 采集源配置 nfsstat 指标采集

nfsstat 指标采集

简介

采集 nfsstat 数据指标上报到 DataFlux 中。

前置条件

配置

NFS Server 安装完成后,运行命令 nfsstat -s 会打印部分指标,并在 /proc/net/rpc/ 目录下生成 nfsd 虚拟文件。

注意:本采集器只采集 NFS Server 指标数据,不采集 NFS Client 数据。

进入 DataKit 安装目录下的 conf.d/nfsstat 目录,复制 nfsstat.conf.sample 并命名为 nfsstat.conf。示例如下:

示例配置及说明如下:

[inputs.nfsstat]
    # nfsstat 文件所在位置,如果为空则使用默认值 "/proc/net/rpc/nfsd"
    location = "/proc/net/rpc/nfsd"

    # 采集间隔,格式为 数字+单位,不能小于等于 0
    # 有效的时间单位:"ns", "us" (or "µs"), "ms", "s", "m", "h"
    # 必填
    interval = "60s"

    # 自定义 tags
    # [inputs.nfsstat.tags]
    # tags1 = "value1"

指标说明:

tags 以用户配置为第一优先

采集器会补充 location 字段为 nfsd 文件位置。

采集指标

指标名 类型 单位
location tags string
nfs_filehandles_anonlookups fields int64
nfs_filehandles_dirnocache fields int64
nfs_filehandles_nodirnocache fields int64
nfs_filehandles_stale fields int64
nfs_filehandles_totallookups fields int64
nfs_inputoutput_read fields int64
nfs_inputoutput_write fields int64
nfs_network_netcount fields int64
nfs_network_tcpconnect fields int64
nfs_network_tcpcount fields int64
nfs_network_udpcount fields int64
nfs_readaheadcache_cachesize fields int64
nfs_readaheadcache_notfound fields int64
nfs_replycache_hits fields int64
nfs_replycache_misses fields int64
nfs_replycache_nocache fields int64
nfs_serverrpc_badauth fields int64
nfs_serverrpc_badcint fields int64
nfs_serverrpc_badcnt fields int64
nfs_serverrpc_badfmt fields int64
nfs_serverrpc_rpccount fields int64
nfs_serverv4stats_compound fields int64
nfs_serverv4stats_null fields int64
nfs_threads_fullcnt fields int64
nfs_threads_threads fields int64
nfs_v2stats_create fields int64
nfs_v2stats_fsstat fields int64
nfs_v2stats_getattr fields int64
nfs_v2stats_link fields int64
nfs_v2stats_lookup fields int64
nfs_v2stats_mkdir fields int64
nfs_v2stats_null fields int64
nfs_v2stats_read fields int64
nfs_v2stats_readdir fields int64
nfs_v2stats_readlink fields int64
nfs_v2stats_remove fields int64
nfs_v2stats_rename fields int64
nfs_v2stats_rmdir fields int64
nfs_v2stats_root fields int64
nfs_v2stats_setattr fields int64
nfs_v2stats_symlink fields int64
nfs_v2stats_wrcache fields int64
nfs_v2stats_write fields int64
nfs_v3stats_access fields int64
nfs_v3stats_commit fields int64
nfs_v3stats_create fields int64
nfs_v3stats_fsinfo fields int64
nfs_v3stats_fsstat fields int64
nfs_v3stats_getattr fields int64
nfs_v3stats_link fields int64
nfs_v3stats_lookup fields int64
nfs_v3stats_mkdir fields int64
nfs_v3stats_mknod fields int64
nfs_v3stats_null fields int64
nfs_v3stats_pathconf fields int64
nfs_v3stats_read fields int64
nfs_v3stats_readdir fields int64
nfs_v3stats_readdirplus fields int64
nfs_v3stats_readlink fields int64
nfs_v3stats_remove fields int64
nfs_v3stats_rename fields int64
nfs_v3stats_rmdir fields int64
nfs_v3stats_setattr fields int64
nfs_v3stats_symlink fields int64
nfs_v3stats_write fields int64
nfs_v4ops_access fields int64
nfs_v4ops_close fields int64
nfs_v4ops_commit fields int64
nfs_v4ops_create fields int64
nfs_v4ops_delegpurge fields int64
nfs_v4ops_delegreturn fields int64
nfs_v4ops_getattr fields int64
nfs_v4ops_getfh fields int64
nfs_v4ops_link fields int64
nfs_v4ops_lock fields int64
nfs_v4ops_lockt fields int64
nfs_v4ops_locku fields int64
nfs_v4ops_lookup fields int64
nfs_v4ops_lookuproot fields int64
nfs_v4ops_nverify fields int64
nfs_v4ops_op0unused fields int64
nfs_v4ops_op1unused fields int64
nfs_v4ops_op2future fields int64
nfs_v4ops_open fields int64
nfs_v4ops_openattr fields int64
nfs_v4ops_openconfirm fields int64
nfs_v4ops_opendgrd fields int64
nfs_v4ops_putfh fields int64
nfs_v4ops_putpubfh fields int64
nfs_v4ops_putrootfh fields int64
nfs_v4ops_read fields int64
nfs_v4ops_readdir fields int64
nfs_v4ops_readlink fields int64
nfs_v4ops_rellockowner fields int64
nfs_v4ops_remove fields int64
nfs_v4ops_rename fields int64
nfs_v4ops_renew fields int64
nfs_v4ops_restorefh fields int64
nfs_v4ops_savefh fields int64
nfs_v4ops_secinfo fields int64
nfs_v4ops_setattr fields int64
nfs_v4ops_verify fields int64
nfs_v4ops_write fields int64

示例输出

nfsstat,location=/proc/net/rpc/nfsd nfs_filehandles_anonlookups=0i,nfs_filehandles_dirnocache=0i,nfs_filehandles_nodirnocache=0i,nfs_filehandles_stale=0i,\
nfs_filehandles_totallookups=0i,nfs_inputoutput_read=0i,nfs_inputoutput_write=0i,nfs_network_netcount=355i,nfs_network_tcpconnect=1i,nfs_network_tcpcount=355i,\
nfs_network_udpcount=0i,nfs_readaheadcache_cachesize=32i,nfs_readaheadcache_notfound=0i,nfs_replycache_hits=0i,nfs_replycache_misses=0i,nfs_replycache_nocache=355i,\
nfs_serverrpc_badauth=0i,nfs_serverrpc_badcint=0i,nfs_serverrpc_badcnt=0i,nfs_serverrpc_badfmt=0i,nfs_serverrpc_rpccount=355i,nfs_serverv4stats_compound=354i,\
nfs_serverv4stats_null=1i,nfs_threads_fullcnt=0i,nfs_threads_threads=8i,nfs_v2stats_create=0i,nfs_v2stats_fsstat=0i,nfs_v2stats_getattr=0i,nfs_v2stats_link=0i,nfs_v2stats_lookup=0i,\
nfs_v2stats_mkdir=0i,nfs_v2stats_null=0i,nfs_v2stats_read=0i,nfs_v2stats_readdir=0i,nfs_v2stats_readlink=0i,nfs_v2stats_remove=0i,nfs_v2stats_rename=0i,nfs_v2stats_rmdir=0i,\
nfs_v2stats_root=0i,nfs_v2stats_setattr=0i,nfs_v2stats_symlink=0i,nfs_v2stats_wrcache=0i,nfs_v2stats_write=0i,nfs_v3stats_access=0i,nfs_v3stats_commit=0i,nfs_v3stats_create=0i,\
nfs_v3stats_fsinfo=0i,nfs_v3stats_fsstat=0i,nfs_v3stats_getattr=0i,nfs_v3stats_link=0i,nfs_v3stats_lookup=0i,nfs_v3stats_mkdir=0i,nfs_v3stats_mknod=0i,nfs_v3stats_null=0i,\
nfs_v3stats_pathconf=0i,nfs_v3stats_read=0i,nfs_v3stats_readdir=0i,nfs_v3stats_readdirplus=0i,nfs_v3stats_readlink=0i,nfs_v3stats_remove=0i,nfs_v3stats_rename=0i,nfs_v3stats_rmdir=0i,\
nfs_v3stats_setattr=0i,nfs_v3stats_symlink=0i,nfs_v3stats_write=0i,nfs_v4ops_access=4i,nfs_v4ops_close=0i,nfs_v4ops_commit=0i,nfs_v4ops_create=0i,nfs_v4ops_delegpurge=0i,\
nfs_v4ops_delegreturn=0i,nfs_v4ops_getattr=39i,nfs_v4ops_getfh=4i,nfs_v4ops_link=0i,nfs_v4ops_lock=0i,nfs_v4ops_lockt=0i,nfs_v4ops_locku=0i,nfs_v4ops_lookup=4i,\
nfs_v4ops_lookuproot=0i,nfs_v4ops_nverify=0i,nfs_v4ops_op0unused=0i,nfs_v4ops_op1unused=0i,nfs_v4ops_op2future=0i,nfs_v4ops_open=0i,nfs_v4ops_openattr=0i,nfs_v4ops_openconfirm=0i,\
nfs_v4ops_opendgrd=0i,nfs_v4ops_putfh=40i,nfs_v4ops_putpubfh=0i,nfs_v4ops_putrootfh=2i,nfs_v4ops_read=0i,nfs_v4ops_readdir=1i,nfs_v4ops_readlink=0i,nfs_v4ops_rellockowner=0i,\
nfs_v4ops_remove=0i,nfs_v4ops_rename=0i,nfs_v4ops_renew=0i,nfs_v4ops_restorefh=0i,nfs_v4ops_savefh=0i,nfs_v4ops_secinfo=0i,nfs_v4ops_setattr=0i,nfs_v4ops_verify=0i,\
nfs_v4ops_write=0i 1595492020876038989