B
Briese
Guest
srvreport unter Debian.
Installation klappte super aber habe folgendes Problem,
beim Testaufruf von "srvreport" mit ./srvreport.pl --test=1 bekomm ich ne Mail, so wie es sein sollte.
Jedoch mit dem Aufruf ./srvreport.pl kommt nix ! Da der Cron ja so auch gestartet wird, hab ich da nen Prob.
Anbei mal meine "srvreport.conf":
Hat jemand nen Tip ?
Thx
Installation klappte super aber habe folgendes Problem,
beim Testaufruf von "srvreport" mit ./srvreport.pl --test=1 bekomm ich ne Mail, so wie es sein sollte.
Jedoch mit dem Aufruf ./srvreport.pl kommt nix ! Da der Cron ja so auch gestartet wird, hab ich da nen Prob.
Anbei mal meine "srvreport.conf":
# SrvReport configuration file
# The general format is lines with "parameter = value" pairs.
# There must be a "space" between the "=" sign and parameter/value!
# GLOBAL PARAMETERS
# The locale specifies the locale of the output. It uses the normal
# two-char codes. For available langues see the bin/locales directory.
# HINT: If you set this, you MUST HAVE Perl 5.8 or later installed!
#
locale = de
# if set to 1, it will also display the time of the report-generation
ReportWithTime = 1
# with the following you can define the times, when the report will be generated
# it MUST be a time, when the srvreport.pl is run via crontab (- 1:30 and +2:30 min)
# so normally you specify times with xx:01 xx:16 xx:31 xx:46
# (if the crontab is created with "1-46/15 * * * * /root/srvreport-x.xx/bin/srvreport.pl")
#
# you can specify more than one time if your separate it with space
# if nothing is specified 0:01 is taken
#reportTime = 0:01 12:01
# if you want to specify more than one, speparate it with ", "
# like "a@b.c, d@e.f"
# you can also use an "readable" address like:
# "I am your server" <root@domain.org>
MailReport = meine@adresse.tld
#optional you can define your own CSS
MailCSS = ./mail.css
# optional you can specify the from-addr
# here you can also specify a "readable" address
# if not, the hostname will be used
#MailFrom = root@domain.org
# optional you can create a file-report in html-format (like the mail)
FileReport = ../web/html/%%YYYY-%%MM-%%DD.html
FileReportImgPath = ../../images/
# optional you can specify here an other CSS-file (only for file-report)
#FileCSS =
# if you change the following to 1, then a file-report will created on every call
FileReportCreateAlways = 0
# optional you can create the report in xml-format, so it can be
# used to generate weekly / monthly / yearly reports
# if you want weekly / monthly / yearly reports this MUST be enabled
xmlReport = ../data/xml/%%YYYY-%%MM-%%DD.xml
# 0: No TEST; normal behavior
# Bit 0 => 1: report-generation with the current day
# Bit 1 => 2: cyclic-call
# Bit 2 => 4: call reportFinished (only available if Bit 0 is also set)
# Bit 3 => 8: output to stdout
# Bit 4 => 16: generate xml-report
# Bit 5 => 32: generate xml-report to stdout
TEST = 0
# Default is WITHOUT "IpTables":
#order = Traffic IpTables CPUUsage WebServer FTPServer FTPLogs Postfix Warnings LastLogins SystemInfos
order = Traffic CPUUsage WebServer FTPServer FTPLogs Postfix Warnings LastLogins SystemInfos
[Traffic]
module = TrafficReport
description = Traffic report
file = /proc/net/dev
interface = eth0:
pattern = %interface %in %o %o %o %o %o %o %o %out
[CPUUsage]
module = CPUReport
description = CPU Usage
file = /usr/bin/uptime |
regex = load average:\s+\d\.\d\d,\s+\d\.\d\d,\s+(\d\.\d\d)
[LastLogins]
module = LogReport
description = Last logins
file = /usr/bin/last |
pattern = %o %o %o %o %time4
cssClass = logreport_left_fixed
[Warnings]
module = LogReport
description = Warnings
file = /var/log/warn
pattern = %time2
cssClass = logreport_left_fixed
#lineLimit = 20
#you can also defined your own custom regex
#regex = ^([^\s]+)\s+([^\s]+)\s+
#if you have a custom regex and you doe not want the whole file,
# you should specify the keys of the matches
# Known keys are at the moment:
# YEAR MONTH DAY HOUR MIN VHOST BYTES STATE INTERFACE OUT IN
# LogReport only uses YEAR MONTH and DAY
# but this syntax apllies to all modules (Httpd, Postfix CPU Traffic)
#regexkeys = MONTH DAY
# If you have a special pattern which you do not want to see,
# you can add it with the "exclude_regex" regualr-expression pattern
#exclude_regex = very\s+stupid\s+warning
[FTPLogs]
module = LogReport
description = FTP-Logs
file = /var/log/xferlog
pattern = %o %time1
cssClass = logreport_left_fixed
[WebServer]
module = HttpdReport
description = Web-Server
# variables in "file":
# %%YYYY: Year
# %%MM : Month (always 2 decimals, e.g. "02", "10")
# %%mm : Month (1 or 2 decimals, e.g. "2", "10")
# %%DD : Day (always 2 decimals, e.g. "06", "21")
# %%dd : Day (1 or 2 decimals, e.g. "6", "21")
#
# For apache2 use the following:
file = /var/log/apache2/srvreport_%%YYYY-%%MM-%%DD
#file = /var/log/httpd/srvreport_%%YYYY-%%MM-%%DD
wholeFile = 1
# Warning: The following will delete the file after the report is generated!!!
deleteFile = 1
showHTTPStatus = 1
# if the following is defined (or > 0), then the report is limited
# to the specified number of hosts (and the rest is display as "others")
limitHosts = 40
# if the following is > 0 then the hosts will be shown as (external) links
# default is: 1
hostAsLinks = 1
# Example:
# The following is the entry in the apache config-file:
# LogFormat "%v \"%{Host}i\" %h %t \"%r\" %>s %b" srvreport
#
# And here is an example of an log-entry:
# jesustotal.de "www.jesustotal.de" 66.196.72.81 [07/Jan/2004:00:07:09 +0100] "GET /impressum.php HTTP/1.0" 200 9719
#
# The following patterns can be used:
# %o: Ignored
# %time1: Time in the form of "May 18 09:05:21 2003"
# %time2: Time in the form of "May 18 09:05:21"
# %time3: Time in the form of "[07/Jan/2004:00:07:09 +0100]" (" +0100" is optional)
# %time4: Time in the form of "Max 18"
# %time5: Time in the form of "2004-01-30 15:34:11"
# %state: State of the request (e.g. 200)
# %bytes: Bytes transfered (e.g. 9719)
# %vhost: Virtual host
#
# If right after the percent (%) a apastrophe (") is found, then this is used as 'encapsulated' character
pattern = %o %"vhost %o %time3 %"o %state %bytes
[FTPServer]
module = HttpdReport
description = FTP-Server
file = /var/log/xferlog
# Sun May 18 09:05:21 2003 2 62.46.204.237 49 /html/images/empty.gif b _ i r web2 ftp 0 * c
pattern = %o %time1 %o %o %bytes %o %o %o %o %o %vhost %o %state %o %o
showHTTPStatus = 0
hostAsLinks = 0
[Postfix]
module = PostfixReport
description = Postfix
file = /var/log/mail.log
pattern = %time2
# the followinf will also show the client-name
# (only relevant in report "Bit 1 => (2)")
showClientName = 1
# showReject can contain 0 (no), 1 (only reject), 2 (complete message)), 3 (complete message encoded)
# be aware that if you have a content-spam-filter and you use 2;
# this report mail might also be rejected!
# (only relevant in report "Bit 1 => (2)")
showReject = 3
# with the following you can specify the report(s) that will be generated from the
# mail-log
# You can combine the values to get multiple statistics
# Bit 0 => 1: Overview
# Bit 1 => 2: Detailed list with all mail-IDs
# Bit 2 => 4: Grouped by "to"
# Bit 3 => 8: Popper-analyze
# Bit 4 => 16: Reject-report
# Bit 5 => 32: Graphical report with #Msgs / bytes per hour
# Bit 6 => 64: Table Report with #Msgs / bytes per hour
# Default is 1+4+8+16+32+64=125
mailReportType = 125
# if the following is set to > 0, then the "orig_to"-entry will be shown first
# and then the "to" entries.
# if the value is 0, then first the "to" entries will be shown (default)
# (only relevant in report "Bit 2 => (4)")
OrigToFirst = 0
# if the popperAnalyse is set to 1, then the pop3-logins will also shown
# (obosolete; see "mailReportType", value 8)
# popperAnalyze = 1
# with the following you can set the time-interval for popperAnalyse
# default is 5 (minutes), if not set
# if you set the value to 0, all checks will be shown
#popperInterval = 5
# OPTIONAL: Separat popper-file
# If you have a separat (q)popper file, then you can specify the following entries:
#popper_file = /var/log/popper
#popper_whole_file = 0
# either use 'pattern' or 'regex/regexkeys'
# for 'pattern' you can use the following special keys:
# %popper_user: will match something like: "popper[20455]: Stats: web24p1 0 0 0 0" and returns the user
# %imap_user: will match something like: "imapd: LOGIN, user=web1p3, " and returns the user
#popper_pattern = %time2 %o %popper_user
##popper_regex = ...
## the following keys are required: HOUR MIN USER, others are optional: MONTH DAY YEAR
##popper_regexkeys =
# EXIM-Support:
# Analyze-Mode
# 0: Postfix or sendmail (default)
# 1: exim (you also need to change "pattern" to "%time5" !)
#analyze_mode = 1
[ChkRootKit]
module = LogReport
description = Check for Rootkit
file = /root/scripts/chkrootkit-0.44/chkrootkit |
regex = INFECTED
cssClass = logreport_left
# Support for "iptables" chains
# for more info see header of "bin/lib/perl/SRVREPORT/IpTablesReport.pm"
#
[IpTables]
module = IpTablesReport
description = Traffic via iptables
file = /usr/sbin/iptables -vnx -L --line-numbers -t filter |
filereset = /usr/sbin/iptables -vnxZ -L --line-numbers -t filter |
#showlines = 1
[SystemInfos]
module = SysinfoReport
description = System information
# file-system infos:
df_file = /bin/df -TP |
# change color from green to orange if the usage is over xx percent:
df_warning = 80
#memory infos:
meminfo_file = /proc/meminfo
# meminfo_warning specifies the warning level in percent; if it is abouve this level,
# the image will change from green to orange
meminfo_warning = 80
# meminfo_restrictto restricts the output to the given names (seperated by semicolon)
# this is usefull to hide the 'Low' and 'High' sections if you have not enough ram ;-)
meminfo_restrictto = Mem;Swap
Hat jemand nen Tip ?
Thx