Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Check to see if your ClamAV signatures are current.
Current Version
1.2
Last Release Date
2008-02-24
Owner
Darren Spruell
License
Other
Compatible With
check_clamav plugin v1.2
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.
: **2007-05-26 - 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. : **2008-02-24 - update to v1.2** : Updated to run correctly with -w switch and ''use strict''. Thanks to Dennis Hoppe for catching missing variable declarations.
Hello, When I execute the script I got this error: ./check_clamav -w 3 -c 4 -v DEBUG: Found clamd at /usr/sbin/clamd DEBUG: Threshhold values: warning=3, critical=4 ERROR: Can't open/parse the config file /etc/clamd.conf query failed: NXDOMAIN Use of uninitialized value $local_latest_date in concatenation (.) or string at ./check_clamav line 179. DEBUG: Local daily.cvd dated Use of uninitialized value $local_latest_daily in concatenation (.) or string at ./check_clamav line 180. DEBUG: Local daily.cvd version = Use of uninitialized value $clamav_latest_daily in concatenation (.) or string at ./check_clamav line 184. DEBUG: Latest daily.cvd version = Use of uninitialized value $sig_rem in numeric ne (!=) at ./check_clamav line 88. Use of uninitialized value $sig_local in numeric ne (!=) at ./check_clamav line 88. DEBUG: Installed daily.cvd matches latest from clamav.net Use of uninitialized value $sig_local in concatenation (.) or string at ./check_clamav line 109. Use of uninitialized value $sig_date in concatenation (.) or string at ./check_clamav line 109. ClamAV OK: daily.cvd () is up to date
Using this plugin more than a year - and it works very fine, thanks :-) I was missing the clamd version checking - always had to wait for syslog-mess like "freshclam[2358]: DON'T PANIC! Read http://www.clamav.net/support/faq" My Version: diff /usr/lib/nagios/plugins/check_clamav ./check_clamav_1.2 28,31d27 hec_val = 0; # Default - override with --checkversion arg 109c104 $msg = "ClamAV " . $status_print . ": daily.cvd " . $sig_local . 114c109 $msg = "ClamAV OK: daily.cvd " . $sig_local . " (" . $sig_date . 123,124c118 $chec_val, 172,174d162 &print_debug("checking clamd program version"); 199,200d187 9,190 ($chec_val != 0) { ly running clamd version of this clamdresults[0]); _version=$clamdversion[1]; =$txtresults[0]; clamd program version local = $clamd_local_version - Latest = $clamd_latest_version"); ed clamd matches latest from clamav.net"); _version OK)"; &print_debug("Installed clamd is behind clamav.net"); CAL status tus_print = "CRITICAL"; RITICAL: local ver = $clamd_local_version - Latest = $clamd_latest_version)"
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!
You must be logged in to submit a review.
To:
From:
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!