Home Directory Plugins Anti-Virus ClamAV ClamAV check plugin

ClamAV check plugin

Bookmark and Share

Rating
3 votes
Favoured:
1
Hits
61632
Files:
FileDescription
check_clamavcheck_clamav plugin v1.2
Check to see if your ClamAV signatures are current.
This check plugin is a Perl script which compares your local signature database (daily.cvd) version to the version advertised from the ClamAV site. It verifies the latest ClamAV revision using a DNS TXT query against current.cvd.clamav.net.

Examples:

Normal execution:

$ /usr/local/libexec/nagios/check_clamav
ClamAV CRITICAL: daily.cvd 1517 out of date by 3 revisions.


Plugin supports a debug mode and adjustable variance thresholds:

$ /usr/local/libexec/nagios/check_clamav -w 3 -c 4 -v
DEBUG: Found clamd at /usr/local/sbin/clamd
DEBUG: Threshhold values: warning=3, critical=4
DEBUG: Removing extraneous quotes from returned TXT record (dig workaround.)
DEBUG: Local daily.cvd dated Tue Jun 6 17:05:07 2006
DEBUG: Local daily.cvd version = 1517
DEBUG: Latest daily.cvd version = 1520
DEBUG: Installed daily.cvd is behind clamav.net
ClamAV WARNING: daily.cvd 1517 out of date by 3 revisions.


: **5/26/07 - update to v1.1** : check_clamav now uses Perl http://www.net-dns.org/ Net::DNS modules instead of relying on external programs for resolution.
: **2/24/08 - update to v1.2** : Updated to run correctly with -w switch and ''use strict''. Thanks to Dennis Hoppe for catching missing variable declarations.
Reviews (1)
byPsichoD, August 8, 2012
Thank you for a nice plugin!

In order to make it work on Fedora 16/17, that has a clamd config file at "/etc/clamd.d/scan.conf", I had to add a new variable called "$clamd_config" and change line 167:

+ my $clamd_conf = "/etc/clamd.d/scan.conf";

- chomp(my $clamd_ver = `$clamd_cmd -V`);
+chomp(my $clamd_ver = `$clamd_cmd -V -c $clamd_conf`);

Works great!