Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 6, 2021. It is now read-only.

Commitdf84a44

Browse files
committed
More details in the README
1 parentb84d783 commitdf84a44

File tree

1 file changed

+55
-28
lines changed

1 file changed

+55
-28
lines changed

‎README.md

Lines changed: 55 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,67 @@
1-
About
2-
===
3-
[postgres-checkup](https://gitlab.com/postgres-ai-team/postgres-checkup) is an ultimate open-source PostgreSQL database health check utility.
1+
#About
2+
Postgres Checkup ([postgres-checkup](https://gitlab.com/postgres-ai-team/postgres-checkup)) is a new-generation diagnostics tool that allows to collect deep analysis of a Postgres database health. It aims to detect and describe all current and potential issues in the fields of database performance, scalability and security, advising how to resolve or prevent them.
43

5-
See its short descriptionwiththe full list of checks implementedandplanned here:https://gitlab.com/postgres-ai-team/postgres-checkup/wikis/HEALTH-CHECK-v3
4+
Compared to a monitoring system, postgres-checkup goes deeper in database system and environment analysis, it combines numerious database internal characteristicswithdata about resources and OS into multiple comprehensive reports. These reports use formats which are easy readable both by humansandmachines and are extremely oriented to DBA problems solving. Monitoring systems constantly collect telemetry, they help to react to issues quicker and do post-mortem analyses. Checkups are needed for a different purpose: detect issues at very early stage, advising on how to prevent them. This procedure is to be done on a regular basis — weekly, monthly, or quarterly. Additionally, it is recommended to run it right right before and right after any major change in database server.
65

7-
The observed data is saved in the form of JSON reports, ready to be consumed by machines.
8-
The final reports are .md files, in Markdown format, to be read by humans.
6+
The three key principles behind postgres-checkup:
97

10-
The main goalis todetect bottlenecks and help to prevent performance and scalability issues.
8+
-*Unobtrusiveness*: postgres-checkup’s impact on the observing systemisclosetozero. It does not use any heavy queries, keeping resource usage very low, avoids having the “observer effect”.
119

12-
Example
13-
===
10+
-*Zero install* (on observed machines): it is able to analyze any Linux machine (including virtual machines), as well as Cloud Postgres instanced (such as Amazon RDs or Google Cloud SQL), not requiring any additional setup or any changes. It does, hovewer, require the privileged access (a DBA usually has it anyway).
1411

15-
Let's make a report for a project named`my-site_org-slony`:
16-
Cluster`slony` contains two servers -`db1` and`db2`.
12+
-*Complex analysis*: unlike most monitoring tools, which provide raw data, postgres-checkup combines data from various parts of the system (w.g.: internal Postgres stats are combined with knowledge about system resources in autovacuum setting and behavior analysis). Also, it analyzes the master database server together with all its replicas (e.g. to build the list of unused indexes).
13+
14+
#Reports structure
15+
The two kinds of reports postgres-checkup produces for every check:
16+
17+
- JSON reports (*.json) — can be consumed by any program or service, or stores in some database.
18+
19+
- Markdown reports (*.md) — the main format for humans, may contain lists, tables, pictures. Being of native format for GitLab and GitHub, such reports are ready to be used, for instance, in their issue trackers, simplifying workflow. Markdown reports are derived from JSON reports.
20+
21+
Markdown reports can be converted to different formats such as HTML or PDF.
22+
23+
Each report consists of three sections:
24+
1. Observations
25+
1. Conclusions
26+
1. Recommendations
27+
28+
##Installation
29+
30+
###Requirements
31+
32+
The supported OS of the observer machine (those from which the tool is to be executed):
33+
34+
* Linux (modern RHEL/CentOS or Debian/Ubuntu; others should work as well, but not yet tested);
35+
* MacOS.
36+
37+
It has to have the following programs:
38+
39+
* bash
40+
* psql
41+
* coreutils
42+
* jq >= 1.5
43+
* golang >= 1.8
44+
* awk
45+
* sed
46+
47+
Nothing special has to be istalled on the observed machines. However, these machines must run Linux (again: modern RHEL/CentOS or Debian/Ubuntu; others should work as well, but not yet tested).
48+
49+
50+
#Example of use
51+
52+
Let's make a report for a project named`prod1`:
53+
Cluster`slony` contains two servers -`db1.vpn.local` and`db1.vpn.local`.
1754
Postgres-checkup automatically detects which one is a master:
1855

1956
```bash
20-
./checkup -h db1 -p 5432 --username postgres --dbname postgres --projectmy-site_org-slony
57+
./checkup -h db1.vpn.local -p 5432 --username postgres --dbname postgres --projectprod1
2158
```
2259

2360
```bash
24-
./checkup -h db2 -p 5432 --username postgres --dbname postgres --projectmy-site_org-slony -e 1
61+
./checkup -h db2.vpn.local -p 5432 --username postgres --dbname postgres --projectprod1 -e 1
2562
```
2663

27-
Which literally means: "connect to the server with given credentials, save data into`my-site_org-slony`
64+
Which literally means: "connect to the server with given credentials, save data into`prod1`
2865
project directory as epoch of check`1`. Epoch is a numerical (**integer**) sign of current iteration.
2966
For example: in half a year we can switch to "epoch number`2`".
3067

@@ -35,30 +72,20 @@ must exist: we don't want to overwrite historical results.
3572
As a result of postgres-checkup we have got two directories with .json files and .md files:
3673

3774
```bash
38-
./artifacts/my-site_org-slony/json_reports/1_2018_12_06T14_12_36_+0300/
39-
./artifacts/my-site_org-slony/md_reports/1_2018_12_06T14_12_36_+0300/
75+
./artifacts/prod1/json_reports/1_2018_12_06T14_12_36_+0300/
76+
./artifacts/prod1/md_reports/1_2018_12_06T14_12_36_+0300/
4077
```
4178

4279
Each of generated files contains information about "what we check" and collected data for
43-
all instances of the postgres cluster`my-site_org-slony`.
80+
all instances of the postgres cluster`prod1`.
4481

4582
Human-readable report can be found at:
4683

4784
```bash
48-
./artifacts/my-site_org-slony/e1_full_report.md
85+
./artifacts/prod1/e1_full_report.md
4986
```
5087

5188
Open it with your favorite Markdown files viewer or just upload to a service such as gist.github.com.
5289

53-
Requirements
54-
===
55-
56-
* bash
57-
* psql
58-
* coreutils
59-
* jq >= 1.5
60-
* golang >= 1.8
61-
* awk
62-
* sed
6390

6491

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp