All Apps and Add-ons

What is the appropriate configuration for the ClamAV app to send data to Splunk?

p1rate5s
Explorer

We have setup the ClamAV app for Splunk and are tweaking the config of Clam on the clients to send the appropriate amount of data to Splunk to populate the dashboards. Has anyone done this and can offer the appropriate ClamAV config?

Tags (2)
0 Karma

pbalsley
Path Finder

Yes the easiest way is via syslog.

Run clamav on each host. I run it like this:

/usr/bin/clamscan -i -r $SCAN_DIR $EXCLUDE --log=$LOG_FILE --stdout | logger -i -t clamav -p auth.alert

Also make sure to update freshclam config
- Edit the /etc/freshclam.conf file
- Make sure setting LogSyslog yes is enabled.

If your host already sends all of it's syslog to splunk it should work for you.

woodcock
Esteemed Legend

Please elaborate. What does this command do? Does it need to be run only once? What are the environment variables supposed to have in them? This is a very incomplete answer.

0 Karma

pbalsley
Path Finder

A bit more clarity:

The default behavior of the app is to monitor the sourcetype syslog for CLAMAV logs and it looks for the keyword "clamav" in the syslog messages.

The example above will pipe all scan data to "logger" to send it into the syslog system with the correct keyword.

I run a few different clamscans via cron. Some once a day and others once a week. Just depends on how and what you want to scan. It is up to you on how you want to do this. There is no standard. Please read the man page to understand all possible uses.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...