-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16186 from newrelic/nb-ohi-postresql2
feat(OHI PostgreSQL): Added branching doc structure
- Loading branch information
Showing
22 changed files
with
1,619 additions
and
1 deletion.
There are no files selected for viewing
Binary file added
BIN
+173 KB
src/images/infrastructure_screenshot-full_install-postgresql-dashboard.webp
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
agentName: postgresql | ||
agentType: integration | ||
title: 'PostgreSQL monitoring integration' | ||
metaDescription: 'Install the PostgreSQL integration' | ||
introFilePath: 'src/install/postgresql/intro.mdx' | ||
appInfo: | ||
- optionType: dropdown1 | ||
label: '' | ||
placeholder: 'Select your environment' | ||
options: | ||
- value: 'linux' | ||
displayName: 'Linux' | ||
logo: 'linux' | ||
recommendedGuided: true | ||
- value: 'windows' | ||
displayName: 'Windows' | ||
logo: 'windows' | ||
recommendedGuided: true | ||
- value: 'k8s' | ||
displayName: 'Kubernetes' | ||
logo: 'k8' | ||
- value: 'ecs' | ||
displayName: 'Amazon ECS' | ||
logo: 'amazonECS' | ||
- optionType: deployment | ||
label: "Choose your install path" | ||
placeholder: "Choose one:" | ||
options: | ||
- value: "msi" | ||
displayName: "Install using MSI files (Windows)" | ||
logo: 'windows' | ||
recommendedGuided: true | ||
- value: "apt" | ||
displayName: "Install using Apt (Debian, Ubuntu)" | ||
recommendedGuided: true | ||
- value: "yum" | ||
logo: 'linux' | ||
displayName: "Install using Yum (Amazon Linux, CentOS, RHEL)" | ||
recommendedGuided: true | ||
- value: "zypper" | ||
displayName: "Install using Zypper (SLES)" | ||
recommendedGuided: true | ||
logo: 'linux' | ||
- value: "tar" | ||
displayName: "Install from tarball (Other Linux distros)" | ||
recommendedGuided: true | ||
logo: 'linux' | ||
|
||
steps: | ||
- filePath: 'src/install/postgresql/appInfo.mdx' | ||
- filePath: 'src/install/postgresql/default-requirements.mdx' | ||
overrides: | ||
- filePath: 'src/install/postgresql/requirements-k8s.mdx' | ||
selectedOptions: | ||
- optionType: dropdown1 | ||
options: | ||
- value: 'k8s' | ||
- filePath: 'src/install/postgresql/requirements-amazonECS.mdx' | ||
selectedOptions: | ||
- optionType: dropdown1 | ||
options: | ||
- value: 'ecs' | ||
- filePath: 'src/install/postgresql/install-infra.mdx' | ||
- filePath: "src/install/postgresql/linux/install-apt.mdx" | ||
overrides: | ||
- filePath: "src/install/postgresql/linux/install-apt.mdx" | ||
selectedOptions: | ||
- optionType: deployment | ||
options: | ||
- value: "apt" | ||
- filePath: "src/install/postgresql/linux/install-tarball.mdx" | ||
selectedOptions: | ||
- optionType: deployment | ||
options: | ||
- value: "tar" | ||
- filePath: "src/install/postgresql/linux/install-yum.mdx" | ||
selectedOptions: | ||
- optionType: deployment | ||
options: | ||
- value: "yum" | ||
- filePath: "src/install/postgresql/linux/install-zypper.mdx" | ||
selectedOptions: | ||
- optionType: deployment | ||
options: | ||
- value: "zypper" | ||
- filePath: "src/install/postgresql/windows/install-msi.mdx" | ||
selectedOptions: | ||
- optionType: deployment | ||
options: | ||
- value: "msi" | ||
- filePath: 'src/install/postgresql/default-install-linux.mdx' | ||
overrides: | ||
- filePath: 'src/install/postgresql/linux/install-linux.mdx' | ||
selectedOptions: | ||
- optionType: dropdown1 | ||
options: | ||
- value: 'linux' | ||
- filePath: 'src/install/postgresql/windows/install-windows.mdx' | ||
selectedOptions: | ||
- optionType: dropdown1 | ||
options: | ||
- value: 'windows' | ||
- filePath: 'src/install/postgresql/install-k8s.mdx' | ||
selectedOptions: | ||
- optionType: dropdown1 | ||
options: | ||
- value: 'k8s' | ||
- filePath: 'src/install/postgresql/install-amazonECS.mdx' | ||
selectedOptions: | ||
- optionType: dropdown1 | ||
options: | ||
- value: 'ecs' | ||
- filePath: 'src/install/postgresql/create-user.mdx' | ||
- filePath: 'src/install/postgresql/find-data.mdx' | ||
whatsNextFilePath: 'src/install/postgresql/whatsNext.mdx' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
componentType: appInfoConfig | ||
headingText: Choose your framework | ||
--- | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
componentType: default | ||
headingText: Create a user | ||
--- | ||
|
||
Make sure you have a user with the required permissions or create one with `SELECT` permissions on: | ||
|
||
* `pg_stat_database` | ||
* `pg_stat_database_conflicts` | ||
* `pg_stat_bgwriter` | ||
|
||
To create the user for the PostgreSQL integration, run these commands: | ||
|
||
```sql | ||
CREATE USER new_relic WITH PASSWORD MY_PASSWORD; | ||
GRANT SELECT ON pg_stat_database TO new_relic; | ||
GRANT SELECT ON pg_stat_database_conflicts TO new_relic; | ||
GRANT SELECT ON pg_stat_bgwriter TO new_relic; | ||
``` | ||
|
||
This will allow the integration to gather global metrics related to the PostgreSQL instance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
componentType: default | ||
headingText: Configure the PostgreSQL integration | ||
--- | ||
|
||
1. Change directory to the integrations configuration folder by running: | ||
|
||
```shell | ||
cd /etc/newrelic-infra/integrations.d | ||
``` | ||
|
||
2. Copy the sample configuration file by running: | ||
|
||
```shell | ||
sudo cp postgresql-config.yml.sample postgresql-config.yml | ||
``` | ||
|
||
3. Edit the `postgresql-config.yml` file. This example config file collects all metrics: | ||
|
||
```yml | ||
integrations: | ||
- name: nri-postgresql | ||
env: | ||
USERNAME: postgres | ||
PASSWORD: pass | ||
HOSTNAME: psql-sample.localnet | ||
PORT: 6432 | ||
DATABASE: postgres | ||
|
||
COLLECT_DB_LOCK_METRICS: false | ||
COLLECTION_LIST: 'ALL' | ||
TIMEOUT: 10 | ||
interval: 15s | ||
labels: | ||
env: production | ||
role: postgresql | ||
inventory_source: config/postgresql | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
headingText: Check the compatibility and requirements | ||
componentType: default | ||
--- | ||
|
||
|
||
* Our integration is compatible with PostgreSQL version 15.6 and lower. | ||
|
||
* A New Relic account. Don't have one? [Sign up for free!](https://newrelic.com/signup) No credit card required. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
componentType: default | ||
headingText: Find and use data | ||
--- | ||
|
||
import infrastructureInstallPostgresqlDashboard from 'images/infrastructure_screenshot-full_install-postgresql-dashboard.webp' | ||
|
||
1. Go to **[one.newrelic.com](https://one.newrelic.com) > Add data** and type **PostgreSQL**. | ||
|
||
2. Under **Dashboards**, click **PostgreSQL**. | ||
|
||
<img | ||
title="Install the PostgreSQL dashboard" | ||
alt="Installing the PostgreSQL dashboard" | ||
src={infrastructureInstallPostgresqlDashboard} | ||
/> | ||
|
||
3. A popup window opens. | ||
|
||
4. Click **Edit** if you want to change the account. | ||
|
||
5. Click **Setup PostgreSQL** to setup the data source or click **Skip this step** if the data source is already setup. | ||
|
||
6. Click **View dashboard** to see your PostgreSQL data in New Relic. | ||
|
||
|
||
For more on how to find and use your data, see how to [understand integration data](/docs/infrastructure/integrations/find-use-infrastructure-integration-data). You can find a full list of metrics and their attributes at the bottom of this doc. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
componentType: default | ||
headingText: Install and configure the PostgreSQL integration | ||
--- | ||
|
||
See how to [monitor services running on Amazon ECS](/docs/integrations/host-integrations/host-integrations-list/monitor-services-running-amazon-ecs). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
componentType: default | ||
headingText: Install the infrastructure agent | ||
--- | ||
|
||
To use the PostgreSQL integration, you need to also [install the infrastructure agent](/docs/infrastructure/install-infrastructure-agent/get-started/install-infrastructure-agent-new-relic/) on the same host. The infrastructure agent monitors the host itself, while the integration you'll install in the next step extends your monitoring with PostgreSQL-specific data such as database and instance metrics. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
componentType: default | ||
headingText: Install and configure the PostgreSQL integration | ||
--- | ||
|
||
See how to [monitor services running on Kubernetes](/docs/monitor-service-running-kubernetes). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
headingText: Before we start | ||
componentType: default | ||
--- | ||
|
||
The New Relic PostgreSQL [on-host integration](/docs/integrations/host-integrations/getting-started/introduction-host-integrations) receives and sends inventory metrics from your PostgreSQL instance to the New Relic platform, where you can aggregate and visualize key performance metrics. Data from instances, databases, and clusters helps you find the source of problems. | ||
|
||
<Callout variant="important"> | ||
For best results, regularly [update the integration package](/docs/integrations/host-integrations/installation/update-infrastructure-host-integration-package) and [the infrastructure agent](/docs/infrastructure/new-relic-infrastructure/installation/update-infrastructure-agent). | ||
</Callout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
componentType: default | ||
headingText: Download using APT | ||
--- | ||
|
||
In your terminal, run these commands: | ||
|
||
```shell | ||
sudo apt-get update | ||
``` | ||
|
||
```shell | ||
sudo apt-get install nri-postgresql | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
componentType: default | ||
headingText: Configure the PostgreSQL integration | ||
--- | ||
|
||
1. Change directory to the integrations configuration folder by running: | ||
|
||
```shell | ||
cd /etc/newrelic-infra/integrations.d | ||
``` | ||
|
||
2. Copy the sample configuration file by running: | ||
|
||
```shell | ||
sudo cp postgresql-config.yml.sample postgresql-config.yml | ||
``` | ||
|
||
3. Edit the `postgresql-config.yml` file. This example config file collects all metrics: | ||
|
||
```yml | ||
integrations: | ||
- name: nri-postgresql | ||
env: | ||
USERNAME: postgres | ||
PASSWORD: pass | ||
HOSTNAME: psql-sample.localnet | ||
PORT: 6432 | ||
DATABASE: postgres | ||
|
||
COLLECT_DB_LOCK_METRICS: false | ||
COLLECTION_LIST: 'ALL' | ||
TIMEOUT: 10 | ||
interval: 15s | ||
labels: | ||
env: production | ||
role: postgresql | ||
inventory_source: config/postgresql | ||
``` | ||
|
||
4. To enable automatic Postgresql parsing and forwarding, copy or rename the `postgresql-log.yml.example` file to `postgresql-log.yml`. You don't need to restart the agent but you may need to update the YML file with the location of your postgresql log files, if you aren't using the default locations. | ||
|
||
For example: | ||
|
||
```shell | ||
sudo cp /etc/newrelic-infra/logging.d/postgresql-log.yml.example /etc/newrelic-infra/logging.d/postgresql-log.yml | ||
``` | ||
|
||
You can find all the config options at the bottom of this doc along with more complex config examples. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
componentType: default | ||
headingText: Download using tarball | ||
--- | ||
|
||
<Callout variant="tip"> | ||
We recommend [using your distribution package manager to install the infrastructure agent](/docs/infrastructure/install-configure-manage-infrastructure/linux-installation/install-infrastructure-linux-using-package-manager). If you choose to [manually install the agent](/docs/infrastructure/install-configure-manage-infrastructure/linux-installation/tarball-manual-install-infrastructure-linux), you may also want to install the on-host integrations from the provided tarballs. | ||
|
||
The manual install process isn't automated. If you opt for manual install, you must place the different files in the correct folders, and ensure that the agent has all the permissions to execute the integrations. | ||
</Callout> | ||
|
||
|
||
To install an integration from a tarball: | ||
|
||
1. Download the packaged integration file from the [tarball repository](https://download.newrelic.com/infrastructure_agent/binaries/linux/amd64/). | ||
|
||
2. Unpack the tarball file according to our [integration file structure and placement rules](/docs/integrations/integrations-sdk/getting-started/integration-file-structure-activation), so the agent is able to find the definitions, configurations, and executables of the integration. | ||
|
||
3. Place the binary that contains the definition file inside `newrelic-integrations` or `custom-integrations` in the [agent directory](/docs/infrastructure/install-configure-manage-infrastructure/linux-installation/tarball-manual-install-infrastructure-linux#agent-directory). | ||
|
||
4. Place the integration's config file under the [plugin directory](/docs/infrastructure/install-configure-manage-infrastructure/linux-installation/tarball-manual-install-infrastructure-linux#configure-plugin). | ||
|
||
5. Download the JMX tool from [our repository](https://download.newrelic.com/infrastructure_agent/binaries/linux/noarch/) and unpack it. Some notes on compability: | ||
|
||
* For JMX integration version 2.3.3 or higher and Cassandra integration version 2.3.0 or higher, the `nrjmx` tool is included as a dependency. For this reason, when using a package manager, the `nrjmx` tool doesn't have to be installed manually. | ||
|
||
* `nrjmx` requires Java 8 or higher. | ||
|
||
* If you have `nrjmx` already installed and install `nri-jmx`, our JMX tool keeps the already-installed version. If you don't have `nrjmx` already installed, it gets the latest `nrjmx` release. | ||
|
||
* By default, the `nrjmx` location is `/usr/bin/nrjmx/*`. To install in a different location, set the new path in the `NR_JMX_TOOL` environment variable. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
componentType: default | ||
headingText: Download using Yum | ||
--- | ||
|
||
In your terminal, run these commands: | ||
|
||
```shell | ||
sudo yum -q makecache -y --disablerepo='*' --enablerepo='newrelic-infra' | ||
``` | ||
|
||
```shell | ||
sudo yum install nri-postgresql | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
componentType: default | ||
headingText: Download using Zypper | ||
--- | ||
|
||
In your terminal, run these commands: | ||
|
||
```shell | ||
sudo zypper -n ref -r newrelic-infra | ||
``` | ||
|
||
```shell | ||
sudo zypper -n install nri-postgresql | ||
``` |
Oops, something went wrong.