Exports metrics from ClamAV as Prometheus metrics.
- ClamAVBuildInfo
- ClamAVDatabaseAge
- ClamAVMemHeap
- ClamAVMemMmap
- ClamAVMemUsed
- ClamAVPoolsTotal
- ClamAVPoolsUsed
- ClamAVQueue
- ClamAVThreadsIdle
- ClamAVThreadsLive
- ClamAVThreadsMax
- ClamAVUp
# HELP clamav_build_info Shows ClamAV Build Info
# TYPE clamav_build_info gauge
clamav_build_info{clamav_version="0.102.4",database_version="26091"} 1
# HELP clamav_database_age Shows ClamAV signature database age in seconds
# TYPE clamav_database_age gauge
clamav_database_age 447408.4671055
# HELP clamav_mem_heap_bytes Shows heap memory usage in bytes
# TYPE clamav_mem_heap_bytes gauge
clamav_mem_heap_bytes 1.090783104e+06
# HELP clamav_mem_mmap_bytes Shows mmap memory usage in bytes
# TYPE clamav_mem_mmap_bytes gauge
clamav_mem_mmap_bytes 1.076747264e+06
# HELP clamav_mem_used_bytes Shows used memory in bytes
# TYPE clamav_mem_used_bytes gauge
clamav_mem_used_bytes 1.076783104e+06
# HELP clamav_pools_total_bytes Shows total memory allocated by memory pool allocator for the signature database in bytes
# TYPE clamav_pools_total_bytes gauge
clamav_pools_total_bytes 1.076783104e+06
# HELP clamav_pools_used_bytes Shows memory used by memory pool allocator for the signature database in bytes
# TYPE clamav_pools_used_bytes gauge
clamav_pools_used_bytes 1.076747264e+06
# HELP clamav_queue_length Shows queued items
# TYPE clamav_queue_length gauge
clamav_queue_length 0
# HELP clamav_threads_idle Shows idle threads
# TYPE clamav_threads_idle gauge
clamav_threads_idle 0
# HELP clamav_threads_live Shows live threads
# TYPE clamav_threads_live gauge
clamav_threads_live 1
# HELP clamav_threads_max Shows max threads
# TYPE clamav_threads_max gauge
clamav_threads_max 10
# HELP clamav_up Shows UP Status
# TYPE clamav_up gauge
clamav_up 1
ClamAV Prometheus Exporter requires a supported release of Go.
$ go get -u github.com/r3kzi/clamav-prometheus-exporterTo find out where clamav-prometheus-exporter was installed you can run $ go list -f {{.Target}} github.com/r3kzi/clamav-prometheus-exporter.
For clamav-prometheus-exporter to be used globally add that directory to the $PATH environment setting.
You could also build the binary yourself running:
$ make buildClamAV server to connect to:
Usage of clamav-prometheus-exporter:
-clamav-address string
ClamAV address to use (default "localhost")
-clamav-port int
ClamAV port to use (default 3310)
-log-level string
Set the level of logging. (options: trace, debug, info, warn, error, fatal, panic) (default "info")
-network string
Network mode to use, typically tcp or unix (socket) (default "tcp")Just scrape this, e.g.:
scrape_configs:
- job_name: 'clamav-prometheus-exporter'
static_configs:
- targets: ['localhost:9810']For a new version of the application, bump version in the VERSION file.
Note
The version in the file must follow the Semantic Version pattern: X.Y.Z.
This will trigger a GitHub Action that will be responsible
for creating a new image on DockerHub
in the pattern: rekzi/clamav-prometheus-exporter:X.Y.Z
In addition, a Release will be created in the repository in addition to the version patch increment,
following the pattern: X.Y.Z-snapshot
Pull requests are welcome.
