An open API service indexing awesome lists of open source software.

https://github.com/vitexus/nagios-check-clamscan

package for Clamav Antivirus chceck and reporting via Nagios / Icinga
https://github.com/vitexus/nagios-check-clamscan

Last synced: 8 months ago
JSON representation

package for Clamav Antivirus chceck and reporting via Nagios / Icinga

Awesome Lists containing this project

README

          

check_clamscan
==============

check_clamscan: Nagios/Icinga plugin to check the results of a clamAV scan.

Copyright (C) 2012 Thomas-Krenn.AG,

This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details.

You should have received a copy of the GNU General Public License along with
this program; if not, see .

Requirements:
-------------
o Perl
o Required perl modules
* use strict;
* use warnings;
* use Getopt::Long qw(:config no_ignore_case);
* use Proc::ProcessTable;
* use File::stat;
* use Switch;
* use Date::Calc qw(Delta_Days);
* use Date::Calc qw(Delta_DHMS);
* use Date::Calc qw(Localtime);
o Nagios or Icinga

Installation Hints:
-------------------
On Debian/Ubuntu use
$ sudo apt-get install libproc-processtable-perl libclass-date-perl libdate-calc-perl
to install the module for accessing the process table and date functions.

Plugin parameters:
------------------
Call the plugin with
o The directory scanned by clamsscan
o The output log file (via stdout from clamsscan)
Example:
check_clamscan -sd /home/ -l /var/log/clamav/clamscan.log

Cron Job for Clamscan:
----------------------
$ touch /etc/cron.daily/clamscan
$ chmod +x /etc/cron.daily/clamscan

/etc/cron.daily/clamscan:
#!/bin/sh
logrotate -f /etc/logrotate_clamscan.conf
clamscan -r -i --stdout /home/ > /var/log/clamav/clamscan.log

Logrotate Job for Clamscan:
---------------------------
/etc/logrotate_clamscan.conf:
/var/log/clamav/clamscan.log {
rotate 30
daily
ifempty
missingok
nocompress
}