Sign inSign up

pcuzner/ceph-spdk-exporter

By pcuzner

Updated almost 3 years ago

Prometheus exporter for Ceph/nvme-of gateway

Image
0

917

pcuzner/ceph-spdk-exporter repository overview

Overview

This container provides a prometheus exporter to expose NVMe-oF gateway performance statistics.

How to run

The container requires access to the nvme-of gateway's socket file to allow the exporter to use the standard rpc calls provided by the SPDK. This means you need to review the current unit.run file for the gateway, and if it doesn't contain -v /var/tmp:/var/tmp, you'll need to add it and restart your nvmeof gateway.

Once the gateway has the socket available to the host's filesystem, you can run the exporter with a command like this;

podman run -d --rm --net=host --name spdk-exporter -v /var/tmp:/var/tmp docker.io/pcuzner/ceph-spdk-exporter:latest

This will start the container, which listens on port 9202 for your Prometheus server to scrape from.

If the socket file is unavailable, the container will continue to run and just return the default prometheus client metrics.

Example Metrics

Here's an edited example of the kinds of metrics the exporter provides.

# HELP ceph_nvmeof_spdk_metadata SPDK Version information                                                                                                                                                                                     
# TYPE ceph_nvmeof_spdk_metadata gauge                                                                                                                                                                                                        
ceph_nvmeof_spdk_metadata{version="SPDK v23.01.1"} 1.0 
# HELP ceph_nvmeof_bdev_capacity_bytes BDEV Capacity                                                                                                                                                                                          
# TYPE ceph_nvmeof_bdev_capacity_bytes gauge                                                                                                                                                                                                  
ceph_nvmeof_bdev_capacity_bytes{bdev_name="clientdisk-10"} 1.2884901888e+011   
# HELP ceph_nvmeof_bdev_metadata BDEV Metadata                                                                                                                                                                                                
# TYPE ceph_nvmeof_bdev_metadata gauge                                                                                                                                                                                                        
ceph_nvmeof_bdev_metadata{bdev_name="clientdisk-10",pool_name="rbd",rbd_name="clientdisk-10"} 1.0    
# HELP ceph_nvmeof_bdev_reads_completed_total Total number of read operations completed                                                                                                                                                       
# TYPE ceph_nvmeof_bdev_reads_completed_total counter                                                                                                                                                                                         
ceph_nvmeof_bdev_reads_completed_total{bdev_name="clientdisk-10"} 2.0  
# HELP ceph_nvmeof_bdev_writes_completed_total Total number of write operations completed                                                                                                                                                     
# TYPE ceph_nvmeof_bdev_writes_completed_total counter                                                                                                                                                                                        
ceph_nvmeof_bdev_writes_completed_total{bdev_name="clientdisk-10"} 0.0   
# HELP ceph_nvmeof_bdev_read_bytes_total Total number of bytes read successfully                                                                                                                                                              
# TYPE ceph_nvmeof_bdev_read_bytes_total counter                                                                                                                                                                                              
ceph_nvmeof_bdev_read_bytes_total{bdev_name="clientdisk-10"} 36864.0  
# HELP ceph_nvmeof_bdev_written_bytes_total Total number of bytes written successfully                                                                                                                                                        
# TYPE ceph_nvmeof_bdev_written_bytes_total counter                                                                                                                                                                                           
ceph_nvmeof_bdev_written_bytes_total{bdev_name="clientdisk-10"} 0.0  
# HELP ceph_nvmeof_bdev_read_seconds_total Total time spent servicing READ I/O                                                                                                                                                                
# TYPE ceph_nvmeof_bdev_read_seconds_total counter                                                                                                                                                                                            
ceph_nvmeof_bdev_read_seconds_total{bdev_name="clientdisk-10"} 0.0015003634703196348   
# HELP ceph_nvmeof_bdev_write_seconds_total Total time spent servicing WRITE I/O                                                                                                                                                              
# TYPE ceph_nvmeof_bdev_write_seconds_total counter                                                                                                                                                                                           
ceph_nvmeof_bdev_write_seconds_total{bdev_name="clientdisk-10"} 0.0    
# HELP ceph_nvmeof_reactor_seconds_total time reactor thread active with I/O
# TYPE ceph_nvmeof_reactor_seconds_total counter
ceph_nvmeof_reactor_seconds_total{mode="busy",name="nvmf_tgt_poll_group_0"} 0.0019276739726027396
ceph_nvmeof_reactor_seconds_total{mode="idle",name="nvmf_tgt_poll_group_0"} 106.39914978904109
# HELP ceph_nvmeof_subsystem_metadata Metadata describing the subsystem configuration
# TYPE ceph_nvmeof_subsystem_metadata gauge
ceph_nvmeof_subsystem_metadata{allow_any_host="no",model_number="SPDK bdev Controller",nqn="nqn.2016-06.io.spdk:ceph-nvmeof",serial_number="SPDK00000000000001"} 1.0                                                                         
# HELP ceph_nvmeof_subsystem_listener_count Number of listeners addresses used by the subsystem
# TYPE ceph_nvmeof_subsystem_listener_count gauge
ceph_nvmeof_subsystem_listener_count{nqn="nqn.2016-06.io.spdk:ceph-nvmeof"} 1.0
# HELP ceph_nvmeof_subsystem_host_count Number of hosts defined to the subsystem
# TYPE ceph_nvmeof_subsystem_host_count gauge
ceph_nvmeof_subsystem_host_count{nqn="nqn.2016-06.io.spdk:ceph-nvmeof"} 1.0
# HELP ceph_nvmeof_subsystem_namespace_limit Maximum namespaces supported
# TYPE ceph_nvmeof_subsystem_namespace_limit gauge
ceph_nvmeof_subsystem_namespace_limit{nqn="nqn.2016-06.io.spdk:ceph-nvmeof"} 32.0
# HELP ceph_nvmeof_subsystem_namespace_metadata Namespace information for the subsystem
# TYPE ceph_nvmeof_subsystem_namespace_metadata gauge
ceph_nvmeof_subsystem_namespace_metadata{bdev_name="clientdisk-1",name="clientdisk-1",nqn="nqn.2016-06.io.spdk:ceph-nvmeof",nsid="1"} 1.0  

Tag summary

Content type

Image

Digest

sha256:cac3e4675

Size

36.3 MB

Last updated

almost 3 years ago

docker pull pcuzner/ceph-spdk-exporter