#   Copyright (C) 2017 Rackspace, Inc.
#
#   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 2 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, write to the Free Software Foundation, Inc.,
#   51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#

### settings shared by recap scripts

# BASEDIR - Directory where the logs are saved.
# Example, to log in a different location: BASEDIR="/opt/recap"
#BASEDIR="/var/log/recap"

# BACKUP_ITEMS - Is the list of reports generated and used by recap scripts
# Example, just enable network stats: BACKUP_ITEMS="netstat"
#BACKUP_ITEMS="fdisk mysql netstat ps pstree resources"

### settings used only by recaplog

# LOG_COMPRESS - Enable or disable log compression.
# Example, to disable: LOG_COMPRESS=0
#LOG_COMPRESS=1

# LOG_EXPIRY - Log files will be deleted after LOG_EXPIRY days
# Example: LOG_EXPIRY=30
#LOG_EXPIRY=15


### settings used only by recap

# MAILTO - Send a report to the email defined.
# Example: MAILTO="user@example.com"
#MAILTO=""

# MIN_FREE_SPACE - Minimum free space (in MB) required in ${BASEDIR} to
# run recap, a value of 0 deactivates this check.
# Example, ensure there are at least 5MB: MIN_FREE_SPACE=5
#MIN_FREE_SPACE=0

# MAXLOAD - Maximum load allowed to run recap, abort if load is higher
# than this value.
# Example, don't run recap if server load is above 4: MAXLOAD=4
#MAXLOAD=10


### recap Reports

## Report: fdisk
# USEFDISK - Generates logs from "fdisk ${OPTS_FDISK}"
# Options can be modified in OPTS_FDISK
# Example, to enable: USEFDISK="yes"
#USEFDISK="no"

## Report: mysql
# USEMYSQL - Generates logs from "mysqladmin status"
# makes use of DOTMYDOTCNF.
# Required by: USEMYSQLPROCESSLIST, USEINNODB
# Example, to enable: USEMYSQL="yes"
#USEMYSQL="no"

# USEMYSQLPROCESSLIST - Generates logs from "mysqladmin processlist"
# Makes use of DOTMYDOTCNF and MYSQL_PROCESS_LIST
# requires: USEMYSQL
# Example, to enable: USEMYSQLPROCESSLIST="yes"
#USEMYSQLPROCESSLIST="no"

# USEINNODB - Generates logs from "mysql show engine innodb status"
# Makes use of DOTMYDOTCNF
# requires: USEMYSQL
# Example, to enable: USEINNODB="yes"
#USEINNODB="no"

## Report: netstat
# USENETSTAT - Generates network stats from "netstat ${OPTS_NETSTAT}"
# Required by: USENETSTATSUM
# Example, to disable: USENETSTATSUM="no"
#USENETSTAT="yes"

# USENETSTATSUM - Generates logs from "netstat ${OPTS_NETSTAT_SUM}".
# requires: USENETSTAT
# Example, to enable: USENETSTATSUM="yes"
#USENETSTATSUM="no"

## Report: ps
# USEPS - Generates logs from "ps"
# Options can be modified in OTPS_PS
# Example, to disable: USEPS="no"
#USEPS="yes"

## Report: pstree
# USEPSTREE - Generates logs from pstree
# Options can be modified in OTPS_PSTREE
# Example, to enable: USEPSTREE="yes"
#USEPSTREE="no"

## Report: resources
# USERESOURCES - Generates "resources"(uptime, free, vmstat, iostat, iotop) log
# Required by: USEDF, USESLAB, USESAR, USESARQ, USESARR, USEFULLSTATUS
# Example, to disable: USERESOURCES="no"
#USERESOURCES="yes"

# USEDF - Generates logs from df
# requires: USERESOURCES
# Options can be modified in OPTS_DF
# Example, to disable: USEDF="no"
#USEDF="yes"

# USESLAB - Generates logs from the slab table.
# requires: USERESOURCES
# Example, to enable: USESLAB="yes"
#USESLAB="no"

# USERSAR - Generates logs from sar.
# requires: USERESOURCES
# Example, to disable: USESAR="no"
#USESAR="yes"

# USESARQ - Generates logs from "sar -q" (logs queue lenght, load data)
# requires: USERESOURCES
# Example, to enable: USESARQ="yes"
#USESARQ="no"

# USESARR - Generates logs from"sar -r" (logs memory data)
# requires: USERESOURCES
# Example, to enable: USESARR="yes"
#USESARR="no"

# USEFULLSTATUS - Performs an http request(GET) to the URL defined in
# OPTS_STATUSURL. Needs a webserver configured to respond to this request.
# Nginx(nginx_status) and Apache HTTPD(server-stats) offer this functionality
# that needs to be enabled.
# requires: USERESOURCES
# Example, to enable: USEFULLSTATUS="yes"
#USEFULLSTATUS="no"

### Options used by the tools generating the reports

# DOTMYDOTCNF - Defines the path to the mysql client configuration file
# Required by: USEMYSQL, USEMYSQLPROCESSLIST, USEINNODB
# Example: DOTMYDOTCNF="/root/.my_alternative.cnf"
#DOTMYDOTCNF="/root/.my.cnf"

# MYSQL_PROCESS_LIST - Format  to  display MySQL process list, options are
# "table" or  "vertical".  This  requires  that  USEMYSQLPROCESSLIST be set
# "yes".
# Required by: USEMYSQLPROCESSLIST
# Example, generate vertical output: MYSQL_PROCESS_LIST="vertical"
#MYSQL_PROCESS_LIST="table"

# OPTS_CURL - Options used by curl, when using USEFULLSTATUS
# Required by: USEFULLSTATUS
# Example: OPTS_CURL="-skLv"
#OPTS_CURL="-Ls"

# OPTS_DF - df options
# Required by: USEDF
# Example: OPTS_DF="-PhT -x nfs"
#OPTS_DF="-x nfs"

# OPTS_FDISK - Option used by USEFDISK.
# Required by: USEFDISK
# Example: OPTS_FDISK="-o gpt -l"
#OPTS_FDISK="-l"

# OPTS_FREE - free options
# Required by: USEFREE
# Example: OPTS_FREE="-lwt"
#OPTS_FREE=""

# OPTS_IOSTAT - iostat options
# Required by: USERESOURCES
# used by "iostat"
# Example: OPTS_IOSTAT="-Ntx 3 3"
#OPTS_IOSTAT="-t -x 1 3"

# OPTS_IOTOP - iotop options
# Required by: USERESOURCES
# used by "iotop"
# Example: OPTS_IOTOP="-botqn3 -d3"
#OPTS_IOTOP="-b -o -t -n 3"

# OPTS_NETSTAT - netstat options
# Required by: USENETSTAT
# Example: OPTS_NETSTAT="-punteCola"
#OPTS_NETSTAT="-ntulpae"

# OPTS_NETSTAT_SUM - netstat statistics options
# Required by: USENETSTATSUM
# Example: OPTS_NETSTAT_SUM="-stuUSw"
#OPTS_NETSTAT_SUM="-s"

# OPTS_PS - ps options
# Required by: USEPS
# Example: OPTS_PS="-Laef"
#OPTS_PS="auxfww"

# OPTS_PSTREE - pstree options
# Required by: USEPSTREE
# Example: OPTS_PSTREE="-cApu"
#OPTS_PSTREE="-p"

# OPTS_STATUSURL - URL to perform the http request  when USEFULLSTATUS is
# enabled
# Required by: USEFULLSTATUS
# Example: OPTS_STATUSURL="http://localhost/nginx_status"
#OPTS_STATUSURL="http://localhost:80/"

# OPTS_VMSTAT - vmstat options
# Required by: USERESOURCES
# used by "vmstat"
# Example: OPTS_VMSTAT="-aSM 3 3"
#OPTS_VMSTAT="-S M 1 3"

