Skip to content

Commit

Permalink
Deprecate the use of OPT_CURL in favor of OPTS_LINKS
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyskapunk committed Oct 20, 2017
1 parent 7f7673c commit d5b4ea0
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Change Log
All notable changes to this project will be documented in this file.

## [unreleased]
- Deprecated the use of OPTS_CURL in favor of OPTS_LINKS
- Default changed for OPTS_STATUSURL

## [1.1.0] - 2017-09-01
- Align default settings on recap.conf to script defaults.
- Default setting changed for: USEDF, USENETSTAT, OPTS_PSTREE.
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,10 @@ Options used by the tools generating the reports

Default: `MYSQL_PROCESS_LIST="table"`

- **OPTS_CURL** - Options used by curl.
- **OPTS_LINKS** - Options used by links.
Required by: `USEFULLSTATUS`

Default: `OPTS_CURL="-Ls"`
Default: `OPTS_LINKS="-dump"`

- **OPTS_DF** - df options

Expand Down Expand Up @@ -324,7 +324,7 @@ Options used by the tools generating the reports

Required by: `USEFULLSTATUS`

Default: `OPTS_STATUSURL="http://localhost:80/"`
Default: `OPTS_STATUSURL="http://localhost:80/server-status"`

- **OPTS_VMSTAT** - vmstat options

Expand Down
8 changes: 4 additions & 4 deletions src/recap
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ USEINNODB="no"
USEMYSQLPROCESSLIST="no"

# Default command options(can be overriden in config file)
OPTS_CURL="-Ls"
OPTS_LINKS="-dump"
OPTS_DF="-x nfs"
OPTS_FDISK="-l"
OPTS_FREE=""
Expand All @@ -106,7 +106,7 @@ OPTS_NETSTAT_SUM="-s"
OPTS_PS="auxfww"
OPTS_PSTREE="-p"
OPTS_VMSTAT="-S M 1 3"
OPTS_STATUSURL="http://localhost:80/"
OPTS_STATUSURL="http://localhost:80/server-status"

# Functions

Expand Down Expand Up @@ -244,7 +244,7 @@ print_sar() {
print_http_fullstatus() {
local LOGFILE="$1"
echo "Web Status report" >> "${LOGFILE}"
curl ${OPTS_CURL} "${OPTS_STATUSURL}" 2>/dev/null >> "${LOGFILE}"
links ${OPTS_LINKS} "${OPTS_STATUSURL}" 2>/dev/null >> "${LOGFILE}"
}

# Print the output of "netstat -ntulpae" to the specified file
Expand Down Expand Up @@ -475,7 +475,7 @@ run_resources_report() {
fi

# check to see if webserver fullstatus should be run
type -p 'curl' > /dev/null
type -p 'links' > /dev/null
if [[ $? -eq 0 && "${USEFULLSTATUS,,}" == "yes" ]]; then
print_blankline "${ITEM_FILE}"
print_http_fullstatus "${ITEM_FILE}"
Expand Down
8 changes: 4 additions & 4 deletions src/recap.5
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,10 @@ Option required by USEMYSQL, USEMYSQLPROCESSLIST, USEINNODB, defines the path to
Format to display MySQL process list, options are "table" or "vertical". This requires that USEMYSQLPROCESSLIST be set "yes".
(default: table).

.IP \fBOPTS_CURL\fR
.IP \fBOPTS_LINKS\fR
.br
Options used by curl, when using USEFULLSTATUS
(default: '\-Ls')
Options used by links, when using USEFULLSTATUS
(default: '\-dump')

.IP \fBOPTS_DF\fR
.br
Expand Down Expand Up @@ -204,7 +204,7 @@ pstree options
.IP \fBOPTS_STATUSURL\fR
.br
URL to perform the http request when USEFULLSTATUS is enabled.
(default: "http://localhost:80/")
(default: "http://localhost:80/server-status")

.IP \fBOPTS_VMSTAT\fR
.br
Expand Down
8 changes: 4 additions & 4 deletions src/recap.conf
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@
# Example, generate vertical output: MYSQL_PROCESS_LIST="vertical"
#MYSQL_PROCESS_LIST="table"

# OPTS_CURL - Options used by curl, when using USEFULLSTATUS
# OPTS_LINKS- Options used by links, when using USEFULLSTATUS
# Required by: USEFULLSTATUS
# Example: OPTS_CURL="-skLv"
#OPTS_CURL="-Ls"
# Example: OPTS_LINKS="-dump -width 120 -codepage iso-8859-2"
#OPTS_LINKS="-dump"

# OPTS_DF - df options
# Required by: USEDF
Expand Down Expand Up @@ -213,7 +213,7 @@
# enabled
# Required by: USEFULLSTATUS
# Example: OPTS_STATUSURL="http://localhost/nginx_status"
#OPTS_STATUSURL="http://localhost:80/"
#OPTS_STATUSURL="http://localhost:80/server-status"

# OPTS_VMSTAT - vmstat options
# Required by: USERESOURCES
Expand Down

0 comments on commit d5b4ea0

Please sign in to comment.