Git Product home page Git Product logo

clamav-prometheus-exporter's Introduction

About Me ๐Ÿ‘‹

Hey There! I'm Christian Niehoff.

I'm currently working as a Cloud Infrastructure Engineer at dwpbank.

Find Me Elsewhere ๐Ÿ’ป

TwitterLinkedIn

Most Important Projects ๐Ÿ“

๐Ÿ’ป ubuntu-provisioning - Provisioning Ubuntu with ansible

A ansible playbook to set up a local ubuntu machine.

๐Ÿ’ป clamav-prometheus-exporter - ClamAV Prometheus Exporter

Exports metrics from ClamAV as Prometheus metrics.

๐Ÿ’ป aws-elasticsearch-provisioner - Provisioning AWS Elasticsearch Service using AWS Signature V4

You want to provision your AWS Elasticsearch Service Cluster and you're using an IAM Master User with Fine-Grained Access Control? You can't use Ansible because it doesn't allow you to sign your HTTP requests with AWS Signature V4? Fear no more! I've built something!

clamav-prometheus-exporter's People

Contributors

0x63lv avatar ldubut avatar micah avatar r3kzi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

clamav-prometheus-exporter's Issues

clamav_mem_.* returns NaN

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

Container crashes when clamav TCP port under load

Hi, I was doing some testing running as a sidecar to a pod running clamav and a http interface, the http interface is using the same TCP port to send scan requests, when I ran some tests the exporter would exit causing its container to restart. Interested if there is a way we could handle this.

Container does not terminate on host reboot/shutdown

Apparently clamav-prometheus-exporter does not react properly to kill -SIGTERM

So far with old containerd < v1.5 this did not matter, as containerd did not react properly on reboot when used in docker v20.10.x with live-restore. (containerd/containerd#5502)

Now that this is fixed, clamav-prometheus-exporter is the last container hanging.

When I enter the container and send kill -SIGTERM nothing happens.

Can you try and clarify, if that is something I can fix on my side?

Thank You!

Push a new image

Hi,
would it be possible to push a new image to dockerhub and/or configure automated builds if it's available to you please?

For now I've rebuilt a docker image manually on my end which I use :)

socket connection

We connect to our clamd via sockets, and in order to use your exporter, we'd need to turn on TCP listening. Since an exporter typically runs on the same machine as the thing that it is exporting, it might be a useful change to provide a socket connection capability to speak to clamd as an alternative to the TCP based one.

Index out of range on start, causing crash

Using current head of the branch, when I try to run the exporter, I get this error:

 panic: runtime error: index out of range [2] with length 1
 goroutine 26 [running]:
 github.com/r3kzi/clamav-prometheus-exporter/pkg/collector.(*Collector).Collect(0xc0001ae100, 0xc000055f60?)
         /usr/pkg/mod/github.com/r3kzi/[email protected]/pkg/collector/collector.go:139 +0x1452
 github.com/prometheus/client_golang/prometheus.(*Registry).Gather.func1()
         /usr/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:444 +0xfb
 created by github.com/prometheus/client_golang/prometheus.(*Registry).Gather
         /usr/pkg/mod/github.com/prometheus/[email protected]/prometheus/registry.go:455 +0x4c5

undefined: os.ReadFile

When I try to install, I'm getting the following:

GOPATH=/usr go get github.com/r3kzi/clamav-prometheus-exporter
# github.com/prometheus/procfs/internal/util
usr/src/github.com/prometheus/procfs/internal/util/parse.go:69:15: undefined: os.ReadFile
usr/src/github.com/prometheus/procfs/internal/util/parse.go:78:15: undefined: os.ReadFile
usr/src/github.com/prometheus/procfs/internal/util/readfile.go:36:9: undefined: io.ReadAll

grafana dashboard example?

Thanks for making this! I was doing this the harder way.

Do you have a grafana dashboard that you use for these values? Would be nice if you did and it was included in the examples directory!

clamav_database_age should be a timestamp

I would suggest changing
clamav_database_age 13580.878680335
to a full timestamp in seconds
clamav_database_age 1677590624770.1213
as it is a value that doesn't change over time and has the same content.
Users can calculate the delta at query time easily enough.

Metric Request - Infected Files

Hi there! First off thanks so much for this exporter. I am hoping to put in a request to add a metric for Infected Files so that I may create an alert around it. I am currently sending an email from a shell script if an infected file is found on an instance, however I believe a more robust solution would be to implement the monitor and alert within Prometheus/Grafana. I have looked at the collector.go file and wonder if my idea and request is a possibility?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.