#
#   Package name:   recap
#   Author:         Jacob Walcik
#                   Carl Thompson
#                   David King
#
#   Maintainer:     Brent Oswald
#                   Benjamin Graham
#                   Simone Soldateschi
#
#   License:        GPL 2.0
#
#   Homepage:   https://github.com/rackerlabs/recap/
#

# If this variable is defined, the reports will be emailed the address
# specified in addition to being written to the file system
MAILTO=

############
# RECAPLOG #
############
# compress old log files
LOG_COMPRESS=1
# Log files will be deleted after LOG_EXPIRY days
LOG_EXPIRY=15
# should recap send email in case of problems?
EMAIL_ON_ERROR=1
# recipients in case of problems
EMAIL_ON_ERROR_RECIPIENTS="root@localhost"
# email subject in case of problems
EMAIL_ON_ERROR_SUBJECT="recaplog error"

###########
# REPORTS #
###########

# PS REPORT
# Adds the output of "ps auxww" to a file named ps.log (default: yes)
USEPS=yes

# RESOURCES REPORT
# This will create a resources.log file with the output of uptime, free, vmstat, and a few other pieces. (default: yes)
USERESOURCES=yes
# The following reports all require USERESOURCES to be set to "yes".
# The following variables can be set to yes or no to enable or disable
# specific optional output
# Use "sar"
USESAR=no
# Use "sar -r"
USESARR=no
# Use "sar -q"
USESARQ=no
# Use "service httpd fullstatus"
# Please ensure that the Apache is configured to allow access to the
# http://localhost/server-status URL before enabling this option
USEFULLSTATUS=yes

# Optional pstree output
# Use "pstree". This will create a pstree.log file. (default: no)
USEPSTREE=no

# NETSTAT REPORT
# Use "netstat -ntulpae" output. This is required in order to use any of the other netstat output options.
# This will create a netstat.log file. (default: no)
USENETSTAT=yes
# Use "netstat -s" output (requires USENETSTAT to be set to "yes")
USENETSTATSUM=no

# MYSQL REPORT
# Use "mysqladmin status" output. This is required in order to use any of the other MySQL output options.
# This will create a mysql.log file. Please ensure that the root user's .my.cnf is configured with appropriate
# credentials before enabling this option. One way to test this is to run "mysql" in a root shell and see if
# you get a "mysql> " prompt. (default: yes)
USEMYSQL=yes
# Use "mysqladmin processlist" output.
USEMYSQLPROCESSLIST=yes
# Provide information on InnoDB (default: no)
USEINNODB=no
# List custom .my.cnf path, default is /root/.my.cnf
DOTMYDOTCNF=/root/.my.cnf
# display mysql process list in a 'table' or 'vertical'
MYSQL_PROCESS_LIST=table

# DF REPORT
# Use "df -h" output. This will show you a trend of disk space available on the drives. (default: yes)
USEDF=yes

# SLABTOP REPORT
# Use printf "name\tactive\tnum_obj\tobj_size\thuh\n"; tail -n+2 /proc/slabinfo | awk 'size=$3*$4 {print $1"\t"$2"\t"$3"\t"$4"\t"size/1048576}' | sort -k5gr output. This will show you more information on the slab table. (default: no)
USESLAB=no

# MMon REPORT
# Common Managed Monitoring commands such as the following:
# tail /var/log/httpd/error_log
# history
# service httpd status
# netstat -antp | awk '$4 ~ /:80$/ {c++;print $5|"cut -f1 -d:|sort |uniq -c|sort -rn |head -10"} END {print c" Total Connections to port 80"}'
# tail /var/log/httpd/error_log
# tail /var/log/messages
# tail /var/log/mysqld.log
# tail /var/log/maillog
# tail /usr/local/psa/var/log/maillog
# tail /var/log/secure
# grep Failed /var/log/secure | sed -e "s/^.*from //g" | sed -e "s/ port.*$//g" | sort -n | uniq -c | sort -nr | head -20
# pstree -G
# df -h

# FDISK REPORT
USEFDISK=no

# backup items
BACKUP_ITEMS="fdisk mysql netstat ps pstree resources"

# minimum free disk space in Megabytes
MIN_FREE_SPACE=0

# max load - abort if load is higher than this value
#MAXLOAD=1000

###########################
# DEFAULT COMMAND OPTIONS #
###########################
OPTS_DF="-x nfs"
OPTS_FDISK="-l"
OPTS_FREE=""
OPTS_IOSTAT="-t -x 1 3"
OPTS_IOTOP="-b -o -t -n 3"
OPTS_NETSTAT="-ntulpae"
OPTS_NETSTAT_SUM="-s"
OPTS_PS="auxfww"
OPTS_PSTREE=""
OPTS_VMSTAT="-S M 1 3"
