2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Fix to remove ${sqlplus_opts} to supress shellcheck warnings

This commit is contained in:
K.Cima 2016-11-28 23:52:51 +09:00
parent 3e4a48abb8
commit 99e235ceef

View File

@ -464,8 +464,7 @@ getvalue_func[$key]=getvalue_asmusage
# End of Graph Settings
# sqlplus options
: ${sqlplus:=sqlplus}
: ${sqlplus_opts:=-S -L}
: "${sqlplus:=sqlplus -S -L}"
sqlplus_variables="
set pagesize 0
set feed off
@ -531,7 +530,7 @@ getvalue_sysstat() {
[ -z "$field" ] && continue
label="${t[3]}"
${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
VAR vf VARCHAR2(64)
VAR vl VARCHAR2(64)
@ -556,7 +555,7 @@ getvalue_sgainfo() {
[ -z "$field" ] && continue
label="${t[3]}"
${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
VAR vf VARCHAR2(64)
VAR vl VARCHAR2(64)
@ -581,7 +580,7 @@ getvalue_pgastat() {
[ -z "$field" ] && continue
label="${t[3]}"
${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
VAR vf VARCHAR2(64)
VAR vl VARCHAR2(64)
@ -598,7 +597,7 @@ EOF
}
getvalue_cachehit() {
${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
SELECT
'buf_hitratio.value ' || ROUND( ( 1 - a.value / ( b.value + c.value ) ) * 100 )
@ -623,7 +622,7 @@ EOF
}
getfield_sessionuser() {
data_attrs[$module]="$( ${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
data_attrs[$module]="$( ${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
SELECT
REGEXP_REPLACE( username, '^[^A-Za-z_]|[^A-Za-z0-9_]', '_' ) ||
@ -639,7 +638,7 @@ EOF
}
getvalue_sessionuser() {
${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
SELECT
REGEXP_REPLACE( du.username, '^[^A-Za-z_]|[^A-Za-z0-9_]', '_' ) || '.value ' ||
@ -661,7 +660,7 @@ EOF
}
getfield_sessionwait() {
data_attrs[$module]="$( ${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
data_attrs[$module]="$( ${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
SELECT
REGEXP_REPLACE( wait_class, '^[^A-Za-z_]|[^A-Za-z0-9_]', '_' ) ||
@ -681,7 +680,7 @@ EOF
}
getvalue_sessionwait() {
${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
SELECT
REGEXP_REPLACE( en.wait_class, '^[^A-Za-z_]|[^A-Za-z0-9_]', '_' ) || '.value ' ||
@ -704,7 +703,7 @@ EOF
}
getfield_eventwait() {
data_attrs[$module]="$( ${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
data_attrs[$module]="$( ${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
SELECT
REGEXP_REPLACE( wait_class, '^[^A-Za-z_]|[^A-Za-z0-9_]', '_' ) ||
@ -723,7 +722,7 @@ EOF
}
getvalue_eventwait() {
${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
SELECT
REGEXP_REPLACE( en.wait_class, '^[^A-Za-z_]|[^A-Za-z0-9_]', '_' ) || '.value ' ||
@ -749,7 +748,7 @@ EOF
getfield_eventwait2() {
local waitclass="$1"
data_attrs[$module]="$( ${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
data_attrs[$module]="$( ${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
VAR vl VARCHAR2(64)
EXEC :vl := '${waitclass}'
@ -769,7 +768,7 @@ EOF
getvalue_eventwait2() {
local waitclass="$1"
${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
VAR vl VARCHAR2(64)
EXEC :vl := '${waitclass}'
@ -786,7 +785,7 @@ EOF
}
getfield_tablespace() {
data_attrs[$module]="$( ${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
data_attrs[$module]="$( ${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
SELECT
REGEXP_REPLACE( tablespace_name, '^[^A-Za-z_]|[^A-Za-z0-9_]', '_' ) ||
@ -800,7 +799,7 @@ EOF
}
getvalue_tablespace() {
${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
SELECT
REGEXP_REPLACE( tablespace_name, '^[^A-Za-z_]|[^A-Za-z0-9_]', '_' ) || '.value ' ||
@ -828,7 +827,7 @@ EOF
}
getfield_asmusage() {
data_attrs[$module]="$( ${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
data_attrs[$module]="$( ${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
SELECT
REGEXP_REPLACE( name, '^[^A-Za-z_]|[^A-Za-z0-9_]', '_' ) ||
@ -842,7 +841,7 @@ EOF
}
getvalue_asmusage() {
${sqlplus} ${sqlplus_opts} "${oracle_auth}" <<EOF
${sqlplus} "${oracle_auth}" <<EOF
${sqlplus_variables}
SELECT
REGEXP_REPLACE( name, '^[^A-Za-z_]|[^A-Za-z0-9_]', '_' ) || '.value ' ||