-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
69 lines (58 loc) · 2.04 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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 <http://www.gnu.org/licenses/>.
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 libswitch-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
}