Metrics in Linux monitoring with Prometheus

April 25, 2024

Summary: This article contains details about the metrics collected by the node_exporter.

The next table contains details about the metrics collected by the node_exporter.

File system metrics

metric group: node_filesystem

metric type description
device LABEL Device of the filesystem
mountpoint LABEL Mount point of the filesystem
fstype LABEL The type of filesystem
size_bytes GAUGE Filesystem size in bytes
avail_bytes GAUGE Filesystem space available to non-root users in bytes
free_bytes GAUGE Filesystem free space in bytes.
files GAUGE Filesystem total file nodes
files_free GAUGE Filesystem total free file nodes
device_error GAUGE Whether an error occurred while getting statistics for the given device
readonly GAUGE Filesystem read-only status.

Disk metrics

metric group: node_disk

metric type description
flush_requests_time_seconds_total COUNTER This is the total number of seconds spent by all flush requests.
flush_requests_total COUNTER The total number of flush requests completed successfully.
io_time_seconds_total COUNTER Total seconds spent doing I/Os.
read_bytes_total COUNTER The total number of bytes read successfully.
read_time_seconds_total COUNTER The total number of seconds spent by all reads.
reads_completed_total COUNTER The total number of reads completed successfully.
reads_merged_total COUNTER The total number of reads merged.
write_time_seconds_total COUNTER This is the total number of seconds spent by all writes.
writes_completed_total COUNTER The total number of writes completed successfully.
writes_merged_total COUNTER The number of writes merged.
written_bytes_total COUNTER The total number of bytes written successfully.

Memory metrics

metric group: node_memory

metric type description
Active_bytes GAUGE The amount of memory that has been used more recently and is usually not reclaimed unless absolutely necessary.
Bounce_bytes GAUGE The amount of memory used for the block device “bounce buffers”.
Buffers_bytes GAUGE The amount of temporary storage for raw disk blocks.
Cached_bytes GAUGE The amount of physical RAM used as cache memory.
CommitLimit_bytes GAUGE The total amount of memory currently available to be allocated on the system based on the overcommit ratio (vm.overcommit_ratio). This limit is only adhered to if strict overcommit accounting is enabled (mode 2 in vm.overcommit_memory).
Committed_AS_bytes GAUGE The total amount of memory, estimated to complete the workload. This value represents the worst case scenario value, and also includes swap memory.
Dirty_bytes GAUGE The total amount of memory, waiting to be written back to the disk.
HugePages_Free GAUGE The total number of hugepages available for the system.
HugePages_Rsvd GAUGE The number of unused huge pages reserved for hugetlbfs.
HugePages_Surp GAUGE The number of surplus huge pages.
HugePages_Total GAUGE The total number of hugepages for the system. The number is derived by dividing Hugepagesize by the megabytes set aside for hugepages specified in /proc/sys/vm/hugetlb_pool.
Hugepagesize_bytes GAUGE The size for each hugepages unit. By default, the value is 4096 KB on uniprocessor kernels for 32 bit architectures. For SMP, hugemem kernels, and AMD64, the default is 2048 KB. For Itanium architectures, the default is 262144 KB.
Hugetlb_bytes GAUGE This is the total amount of memory, consumed by huge pages of all sizes. If huge pages of different sizes are in use, this number will exceed HugePages_Total * Hugepagesize.
Inactive_bytes GAUGE The amount of memory that has been used less recently and is more eligible to be reclaimed for other purposes.
Mapped_bytes GAUGE The memory used for files that have been mmaped, such as libraries.
MemAvailable_bytes GAUGE An estimate of how much memory is available for starting new applications, without swapping.
MemFree_bytes GAUGE The amount of physical RAM left unused by the system.
MemTotal_bytes GAUGE Total amount of usable RAM, which is physical RAM minus a number of reserved bits and the kernel binary code.
PageTables_bytes GAUGE The total amount of memory dedicated to the lowest page table level.
Shmem_bytes GAUGE The total amount of memory, used by shared memory (shmem) and tmpfs.
SwapCached_bytes GAUGE The amount of memory that has once been moved into swap, then back into the main memory, but still also remains in the swapfile. This saves I/O, because the memory does not need to be moved into swap again.
SwapFree_bytes GAUGE The total amount of swap free.
SwapTotal_bytes GAUGE The total amount of swap available.
WritebackTmp_bytes GAUGE The amount of memory used by FUSE for temporary writeback buffers.
Writeback_bytes GAUGE The total amount of memory actively being written back to the disk.

Network metrics

metric group: node_network

metric type description
mtu_bytes GAUGE The maximum transmission unit. IP datagrams larger than MTU bytes will be fragmented into multiple Ethernet frames.
receive_bytes_total COUNTER The total number of bytes of data received by the interface.
receive_compressed_total COUNTER The number of compressed packets received by the device driver.
receive_drop_total COUNTER The total number of packets dropped by the device driver.
receive_errs_total COUNTER The total number of receive errors detected by the device driver.
receive_fifo_total COUNTER The number of FIFO buffer errors.
receive_frame_total COUNTER The number of packet framing errors.
receive_multicast_total COUNTER The number of multicast frames received by the device driver.
receive_packets_total COUNTER The total number of packets of data received by the interface.
speed_bytes GAUGE The speed of the network device.
transmit_bytes_total COUNTER The total number of bytes of data transmitted by the interface.
transmit_carrier_total COUNTER The number of carrier losses detected by the device driver.
transmit_colls_total COUNTER The number of collisions detected on the interface.
transmit_compressed_total COUNTER The number of compressed packets transmitted by the device driver.
transmit_drop_total COUNTER The total number of packets dropped by the device driver.
transmit_errs_total COUNTER The total number of transmit errors detected by the device driver.
transmit_fifo_total COUNTER The number of FIFO buffer errors.
transmit_packets_total COUNTER The total number of packets of data transmitted by the interface.
transmit_queue_length GAUGE The length of the transmit queue of the device.

See more

Metrics in PostgreSQL monitoring with Prometheus

Monitoring Linux Servers with Node Exporter

PostgreSQL Monitoring

comments powered by Disqus