• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

node_exporter: Prometheus exporter for hardware and OS metrics exposed by *NIX k ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

node_exporter

开源软件地址:

https://gitee.com/AliyunContainerService/node_exporter

开源软件介绍:

Node exporter

CircleCIBuildkite statusDocker Repository on QuayDocker PullsGo Report Card

Prometheus exporter for hardware and OS metrics exposed by *NIX kernels, writtenin Go with pluggable metric collectors.

The WMI exporter is recommended for Windows users.

Collectors

There is varying support for collectors on each operating system. The tablesbelow list all existing collectors and the supported systems.

Collectors are enabled by providing a --collector.<name> flag.Collectors that are enabled by default can be disabled by providing a --no-collector.<name> flag.

Enabled by default

NameDescriptionOS
arpExposes ARP statistics from /proc/net/arp.Linux
bcacheExposes bcache statistics from /sys/fs/bcache/.Linux
bondingExposes the number of configured and active slaves of Linux bonding interfaces.Linux
boottimeExposes system boot time derived from the kern.boottime sysctl.Darwin, Dragonfly, FreeBSD, NetBSD, OpenBSD
conntrackShows conntrack statistics (does nothing if no /proc/sys/net/netfilter/ present).Linux
cpuExposes CPU statisticsDarwin, Dragonfly, FreeBSD, Linux
diskstatsExposes disk I/O statistics.Darwin, Linux
edacExposes error detection and correction statistics.Linux
entropyExposes available entropy.Linux
execExposes execution statistics.Dragonfly, FreeBSD
filefdExposes file descriptor statistics from /proc/sys/fs/file-nr.Linux
filesystemExposes filesystem statistics, such as disk space used.Darwin, Dragonfly, FreeBSD, Linux, OpenBSD
hwmonExpose hardware monitoring and sensor data from /sys/class/hwmon/.Linux
infinibandExposes network statistics specific to InfiniBand and Intel OmniPath configurations.Linux
ipvsExposes IPVS status from /proc/net/ip_vs and stats from /proc/net/ip_vs_stats.Linux
loadavgExposes load average.Darwin, Dragonfly, FreeBSD, Linux, NetBSD, OpenBSD, Solaris
mdadmExposes statistics about devices in /proc/mdstat (does nothing if no /proc/mdstat present).Linux
meminfoExposes memory statistics.Darwin, Dragonfly, FreeBSD, Linux, OpenBSD
netclassExposes network interface info from /sys/class/net/Linux
netdevExposes network interface statistics such as bytes transferred.Darwin, Dragonfly, FreeBSD, Linux, OpenBSD
netstatExposes network statistics from /proc/net/netstat. This is the same information as netstat -s.Linux
nfsExposes NFS client statistics from /proc/net/rpc/nfs. This is the same information as nfsstat -c.Linux
nfsdExposes NFS kernel server statistics from /proc/net/rpc/nfsd. This is the same information as nfsstat -s.Linux
sockstatExposes various statistics from /proc/net/sockstat.Linux
statExposes various statistics from /proc/stat. This includes boot time, forks and interrupts.Linux
textfileExposes statistics read from local disk. The --collector.textfile.directory flag must be set.any
timeExposes the current system time.any
timexExposes selected adjtimex(2) system call stats.Linux
unameExposes system information as provided by the uname system call.Linux
vmstatExposes statistics from /proc/vmstat.Linux
xfsExposes XFS runtime statistics.Linux (kernel 4.4+)
zfsExposes ZFS performance statistics.Linux

Disabled by default

NameDescriptionOS
buddyinfoExposes statistics of memory fragments as reported by /proc/buddyinfo.Linux
devstatExposes device statisticsDragonfly, FreeBSD
drbdExposes Distributed Replicated Block Device statistics (to version 8.4)Linux
interruptsExposes detailed interrupts statistics.Linux, OpenBSD
ksmdExposes kernel and system statistics from /sys/kernel/mm/ksm.Linux
logindExposes session counts from logind.Linux
meminfo_numaExposes memory statistics from /proc/meminfo_numa.Linux
mountstatsExposes filesystem statistics from /proc/self/mountstats. Exposes detailed NFS client statistics.Linux
ntpExposes local NTP daemon health to check timeany
processesExposes aggregate process statistics from /proc.Linux
qdiscExposes queuing discipline statisticsLinux
runitExposes service status from runit.any
supervisordExposes service status from supervisord.any
systemdExposes service and system status from systemd.Linux
tcpstatExposes TCP connection status information from /proc/net/tcp and /proc/net/tcp6. (Warning: the current version has potential performance issues in high load situations.)Linux
wifiExposes WiFi device and station statistics.Linux

Textfile Collector

The textfile collector is similar to the Pushgateway,in that it allows exporting of statistics from batch jobs. It can also be usedto export static metrics, such as what role a machine has. The Pushgatewayshould be used for service-level metrics. The textfile module is for metricsthat are tied to a machine.

To use it, set the --collector.textfile.directory flag on the Node exporter. Thecollector will parse all files in that directory matching the glob *.promusing the textformat.

To atomically push completion time for a cron job:

echo my_batch_job_completion_time $(date +%s) > /path/to/directory/my_batch_job.prom.$$mv /path/to/directory/my_batch_job.prom.$$ /path/to/directory/my_batch_job.prom

To statically set roles for a machine using labels:

echo 'role{role="application_server"} 1' > /path/to/directory/role.prom.$$mv /path/to/directory/role.prom.$$ /path/to/directory/role.prom

Filtering enabled collectors

The node_exporter will expose all metrics from enabled collectors by default. This is the recommended way to collect metrics to avoid errors when comparing metrics of different families.

For advanced use the node_exporter can be passed an optional list of collectors to filter metrics. The collect[] parameter may be used multiple times. In Prometheus configuration you can use this syntax under the scrape config.

  params:    collect[]:      - foo      - bar

This can be useful for having different Prometheus servers collect specific metrics from nodes.

Building and running

Prerequisites:

Building:

go get github.com/prometheus/node_exportercd ${GOPATH-$HOME/go}/src/github.com/prometheus/node_exportermake./node_exporter <flags>

To see all available configuration flags:

./node_exporter -h

Running tests

make test

Using Docker

The node_exporter is designed to monitor the host system. It's not recommendedto deploy it as a Docker container because it requires access to the host system.Be aware that any non-root mount points you want to monitor will need to be bind-mountedinto the container.If you start container for host monitoring, specify path.rootfs argument.This argument must match path in bind-mount of host root. The node_exporter will usepath.rootfs as prefix to access host filesystem.

docker run -d \  --net="host" \  --pid="host" \  -v "/:/host:ro,rslave" \  quay.io/prometheus/node-exporter \  --path.rootfs /host

On some systems, the timex collector requires an additional Docker flag,--cap-add=SYS_TIME, in order to access the required syscalls.

Using a third-party repository for RHEL/CentOS/Fedora

There is a community-supplied COPR repository which closely follows upstream releases.


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap