Skip to content
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

Commit ca2b9dd

Browse files
committed
A004 check and A006 template fixed
1 parent 7d2b624 commit ca2b9dd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

pghrep/templates/A006.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Observations ##
44

55
### Settings (pg_settings) that differ ###
6+
{{ if .diffData }}
67
{{ if (index .diffData "pg_settings") }}
78
Setting | {{.hosts.master}} {{ range $skey, $host := .hosts.replicas }}| {{ $host }} {{ end }}
89
--------|-------{{ range $skey, $host := .hosts.replicas }}|-------- {{ end }}
@@ -14,6 +15,9 @@ Configs(pg_config) that differ
1415
{{ range $key, $value := (index .diffData "pg_configs") }}
1516
Config {{ $key }}: {{ range $key, $value := $value }} On {{ $key }}: `{{ index $value "value" }}` {{ if (index $value "unit") }}{{ index $value "unit" }}{{ end }}{{ end }}
1617
{{ end }}{{end}}
18+
{{ else }}
19+
No differences
20+
{{ end }}
1721

1822
## Conclusions ##
1923

resources/checks/A004_cluster_info.sh

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
main_sql=$(curl -s -L https://raw.githubusercontent.com/NikolayS/postgres_dba/4.0/sql/0_node.sql | awk '{gsub("; *$", "", $0); print $0}')
33

44
pgver=$(${CHECK_HOST_CMD} "${_PSQL} -c \"SHOW server_version\"")
5+
#pgver=$(psql -U postila_ru -c "SHOW server_version")
56

67
vers=(${pgver//./ })
78
majorVer=${vers[0]}
@@ -24,12 +25,11 @@ else
2425
fi
2526

2627
${CHECK_HOST_CMD} "${_PSQL} -f - " <<SQL
28+
#psql -U postila_ru -t -0 -f - <<SQL
2729
$prepare_sql
2830
with data as (
2931
$main_sql
3032
)
3133
select json_object_agg(data.metric, data) as json from data where data.metric not like '------%'
32-
and data.metric not in ('Database Name', 'Database Size')
33-
3434
SQL
3535

0 commit comments

Comments
 (0)