From e97dc5c34825e01a45026500f153ac3c87a94684 Mon Sep 17 00:00:00 2001
From: Keiko Oda
Date: Thu, 18 Jul 2024 15:34:03 +0900
Subject: [PATCH] Remove --reload flag from the collector tests (#268)
* Clarify where to update the config
* Update collector test to remove --reload
* Apply reviews
---
collector/settings.mdx | 6 +++---
components/CollectorLogTest.tsx | 6 +++---
explain/setup/log_explain/02_enable_log_explain.mdx | 3 ++-
install/aiven/05_configure_the_collector_package.mdx | 4 ++--
install/amazon_rds/04_configure_the_collector_ec2.mdx | 2 +-
.../azure_database/04_configure_the_collector_package.mdx | 2 +-
.../google_cloud_sql/03_configure_the_collector_package.mdx | 4 ++--
install/self_managed/04_configure_the_collector_package.mdx | 4 ++--
8 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/collector/settings.mdx b/collector/settings.mdx
index beb03a3d..9020d58b 100644
--- a/collector/settings.mdx
+++ b/collector/settings.mdx
@@ -24,9 +24,9 @@ describe the servers to monitor, how to connect to them, and server-specific con
name the other sections after the servers they correspond to, though note these are not the names that will appear
in the app. In-app names are based on hostname settings as determined during monitoring.
-After you make changes, you can run `pganalyze-collector --test --reload` to verify the new configuration and load
-the new configuration in the collector background process if they work correctly. This minimizes monitoring
-interruptions and simplifies config file updates.
+After you make changes, you can run `pganalyze-collector --test` to verify the new configuration.
+If the test succeeds, this will automatically load the new configuration in the collector background process
+(equivalent to using the `--reload` flag). This minimizes monitoring interruptions and simplifies config file updates.
The tables below list configuration settings, their defaults if not set, and their descriptions. If a setting is
configurable through environment variables, the environment variable name follows the setting in parentheses.
diff --git a/components/CollectorLogTest.tsx b/components/CollectorLogTest.tsx
index e2e4da54..87f2c4e9 100644
--- a/components/CollectorLogTest.tsx
+++ b/components/CollectorLogTest.tsx
@@ -17,7 +17,7 @@ I Successfully reloaded pganalyze collector (PID 123)`
and apply the collector configuration (for container environments, simply
restart the collector):
If you are getting an error, it sometimes helps to run the
@@ -48,4 +48,4 @@ I Successfully reloaded pganalyze collector (PID 123)`
}
}
-export default CollectorLogTest;
\ No newline at end of file
+export default CollectorLogTest;
diff --git a/explain/setup/log_explain/02_enable_log_explain.mdx b/explain/setup/log_explain/02_enable_log_explain.mdx
index d0c947e3..c52fcab9 100644
--- a/explain/setup/log_explain/02_enable_log_explain.mdx
+++ b/explain/setup/log_explain/02_enable_log_explain.mdx
@@ -16,9 +16,10 @@ You will need to update the collector configuration to enable log-based EXPLAIN.
Afterwards make sure to reload the pganalyze collector, so the setting takes effect:
```
-sudo pganalyze-collector --test --reload
+sudo pganalyze-collector --test
```
+Successful test run will reload the collector.
If this test succeeds, continue to the next step to test plan collection:
diff --git a/install/aiven/05_configure_the_collector_package.mdx b/install/aiven/05_configure_the_collector_package.mdx
index 8dae361b..5ba94666 100644
--- a/install/aiven/05_configure_the_collector_package.mdx
+++ b/install/aiven/05_configure_the_collector_package.mdx
@@ -61,7 +61,7 @@ Fill in the values from the info in your Aiven console:
Run the following to make sure the configuration works:
```
-sudo pganalyze-collector --test --reload
+sudo pganalyze-collector --test
```
-
\ No newline at end of file
+
diff --git a/install/amazon_rds/04_configure_the_collector_ec2.mdx b/install/amazon_rds/04_configure_the_collector_ec2.mdx
index 44602905..2c05657b 100644
--- a/install/amazon_rds/04_configure_the_collector_ec2.mdx
+++ b/install/amazon_rds/04_configure_the_collector_ec2.mdx
@@ -91,7 +91,7 @@ db_host = mydbinstance3.123456789012.us-east-1.rds.amazonaws.com
Now, verify that the configuration is correct, by running the following command:
```
-$ sudo pganalyze-collector --test --reload
+$ sudo pganalyze-collector --test
1999/01/01 08:04:30 I [pganalyze] Testing statistics collection...
1999/01/01 08:04:32 I [pganalyze] Test submission successful (1010 KB received)
```
diff --git a/install/azure_database/04_configure_the_collector_package.mdx b/install/azure_database/04_configure_the_collector_package.mdx
index b211ada5..08cb15f7 100644
--- a/install/azure_database/04_configure_the_collector_package.mdx
+++ b/install/azure_database/04_configure_the_collector_package.mdx
@@ -55,7 +55,7 @@ Fill in the values step-by-step:
Run the following to make sure the configuration works:
```
-sudo pganalyze-collector --test --reload
+sudo pganalyze-collector --test
```
diff --git a/install/google_cloud_sql/03_configure_the_collector_package.mdx b/install/google_cloud_sql/03_configure_the_collector_package.mdx
index f908fd63..1512bdd7 100644
--- a/install/google_cloud_sql/03_configure_the_collector_package.mdx
+++ b/install/google_cloud_sql/03_configure_the_collector_package.mdx
@@ -61,7 +61,7 @@ If you are using Google AlloyDB, do not specify `gcp_cloudsql_instance_id`, but
Run the following to make sure the configuration works:
```
-sudo pganalyze-collector --test --reload
+sudo pganalyze-collector --test
```
-
\ No newline at end of file
+
diff --git a/install/self_managed/04_configure_the_collector_package.mdx b/install/self_managed/04_configure_the_collector_package.mdx
index c2f83e1a..a6e2d475 100644
--- a/install/self_managed/04_configure_the_collector_package.mdx
+++ b/install/self_managed/04_configure_the_collector_package.mdx
@@ -53,7 +53,7 @@ Fill in the values step-by-step:
Run the following to make sure the configuration works:
```
-sudo pganalyze-collector --test --reload
+sudo pganalyze-collector --test
```
-
\ No newline at end of file
+