Skip to content

Latest commit

 

History

History
66 lines (53 loc) · 3.05 KB

README.md

File metadata and controls

66 lines (53 loc) · 3.05 KB

ClamAV Exporter

tests Go Reference Go Report Card codecov

Export ClamAV daemon stats via a TCP socket to Prometheus.

To run it:

make
./clamav_exporter [flags]

Exported metrics

Metric Meaning Labels
clamav_up Was the last scrape successful.
clamav_db_version Currently installed ClamAV Virus Database version.
clamav_db_timestamp_seconds Unix timestamp of the ClamAV Virus Database build time.
clamav_pool_state State of the thread pool. index, primary
clamav_pool_live_threads Number of live threads in the pool. index, primary
clamav_pool_idle_threads Number of idle threads in the pool. index, primary
clamav_pool_max_threads Maximum number of threads in the pool. index, primary
clamav_pool_idle_timeout_threads Number of idle timeout threads in the pool. index, primary
clamav_pool_queue_length Number of items in the pool queue. index, primary
clamav_memory_heap_bytes Number of bytes allocated on the heap.
clamav_memory_mmap_bytes Number of bytes currently allocated using mmap.
clamav_memory_used_bytes Number of bytes used by in-use allocations.
clamav_memory_free_bytes Number of bytes in free blocks.
clamav_memory_releasable_bytes Number of bytes releasable at the heap.
clamav_memory_pools_used_bytes Number of bytes currently used by all pools.
clamav_memory_pools_total_bytes Number of bytes available to all pools.

Pool state mapping

Name State value
INVALID 0
VALID 1
EXIT 2

Flags

./clamav_exporter --help
  • clamav.address: ClamAV daemon socket address. Example: tcp://127.0.0.1:3310.
  • clamav.timeout: ClamAV daemon socket timeout.
  • clamav.retries: ClamAV daemon socket connect retries. 0 by default.
  • web.listen-address: Address to listen on for web interface and telemetry.
  • web.telemetry-path: Path under which to expose metrics.
  • log.level: Logging level. info by default.
  • log.format: Set the log target and format. Example: logger:syslog?appname=bob&local=7 or logger:stdout?json=true.

TLS and basic authentication

The clamav_exporter supports TLS and basic authentication. To use TLS and/or basic authentication, you need to pass a configuration file using the --web.config.file parameter. The format of the file is described in the exporter-toolkit repository.