r3kzi / clamav-prometheus-exporter

Prometheus-Exporter for ClamAV
Apache License 2.0
26 stars 21 forks source link

clamav_mem_.* returns NaN #11

Open MateLord opened 2 years ago

MateLord commented 2 years ago

Hi,

I've deployed clamav recently and started scraping from prometheus. There is an issue i found that mem gauges are returning "NaN" instead memory usage.

Has anyone experienced such a thing?

Example:

# HELP clamav_build_info Shows ClamAV Build Info
# TYPE clamav_build_info gauge
clamav_build_info{clamav_version="0.104.2",database_version="26532"} 1
# HELP clamav_mem_heap_bytes Shows heap memory usage in bytes
# TYPE clamav_mem_heap_bytes gauge
clamav_mem_heap_bytes NaN
# HELP clamav_mem_mmap_bytes Shows mmap memory usage in bytes
# TYPE clamav_mem_mmap_bytes gauge
clamav_mem_mmap_bytes NaN
# HELP clamav_mem_used_bytes Shows used memory in bytes
# TYPE clamav_mem_used_bytes gauge
clamav_mem_used_bytes NaN
quantranhong1999 commented 1 year ago

I have this too:

# HELP clamav_build_info Shows ClamAV Build Info
# TYPE clamav_build_info gauge
clamav_build_info{clamav_version="0.104.3",database_version="26666"} 1
# HELP clamav_database_age Shows ClamAV signature database age in seconds
# TYPE clamav_database_age gauge
clamav_database_age 69803.230596573
# HELP clamav_mem_heap_bytes Shows heap memory usage in bytes
# TYPE clamav_mem_heap_bytes gauge
clamav_mem_heap_bytes NaN
# HELP clamav_mem_mmap_bytes Shows mmap memory usage in bytes
# TYPE clamav_mem_mmap_bytes gauge
clamav_mem_mmap_bytes NaN
# HELP clamav_mem_used_bytes Shows used memory in bytes
# TYPE clamav_mem_used_bytes gauge
clamav_mem_used_bytes NaN

The clamav version 0.102.4 was OK, the issue likely is for later 0.104.x version.

quantranhong1999 commented 1 year ago

This is more a ClamAV issue: https://github.com/Cisco-Talos/clamav/issues/706

shaileshlaghane commented 1 month ago

Installed clamav v1.3.1, installed exporter, however in metrics getting NaN

# HELP clamav_mem_heap_bytes Shows heap memory usage in bytes
# TYPE clamav_mem_heap_bytes gauge
clamav_mem_heap_bytes NaN
# HELP clamav_mem_mmap_bytes Shows mmap memory usage in bytes
# TYPE clamav_mem_mmap_bytes gauge
clamav_mem_mmap_bytes NaN
# HELP clamav_mem_used_bytes Shows used memory in bytes
# TYPE clamav_mem_used_bytes gauge
clamav_mem_used_bytes NaN