Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates beacon agent on-prem DSN examples #6213

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ beacon-agent [subcommand] [options]

#### Description

Runs the Beacon agent.
Runs the Beacon agent.

In default mode, with no subcommand, this runs the Beacon Agent process, which sends data ingestions to the Beacon Server and maintains a local log of its activities.

Expand All @@ -53,7 +53,7 @@ beacon-agent [-file=<configurationfilepath>]
Start Beacon Agent:

```
beacon-agent
beacon-agent
```

### `setup`
Expand Down Expand Up @@ -81,17 +81,17 @@ beacon-agent setup [-file=<configurationfilepath>]
|---------------------|---------------------------------------------------------------------------------------------------|
| `-file=<string>` | Sets the filename (and path) of the generated configuration file. (default `"beacon_agent.yaml"`) |
| `-verify=<boolean>` | Verifies the project's credentials with the Beacon server. |

#### Examples

##### Creating a configuration file, without authentication

```
beacon-agent setup -verify=false
```

##### Creating a configuration file with a different name

```
beacon-agent setup -file my_beacon_config.yaml
```
Expand Down Expand Up @@ -158,8 +158,7 @@ agent:
provider:
onprem:
databases:
sales_reporting:
dsn: "$DSN"
- dsn: "$DSN"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In https://github.com/EnterpriseDB/docs/pull/6105/files a resource_id key is used; are we skipping it here for compactness?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resource id is an allowed field according to the code https://github.com/EnterpriseDB/upm-beacon/blob/79f12896839dd5c8898c97c4ef2591645de57a99/internal/config/agent.go#L211

It is an optional field though, and doesn't need to be specified.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, yes but it also conflicts with your edits which is what I want to resolve. Given the edits in here, I'd like to promote this PR and ensure nothing is lost from the other PR before we close it.

tags:
- "foo"
- "bar"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Before you begin, you need to have the following:

You need to enable the system you are planning on running the agent on to download packages from the EDB repositories for EDB Postgres AI.

Locate your EDB subscription token on the the [EnterpriseDB repos download page](https://www.enterprisedb.com/repos-downloads).
Locate your EDB subscription token on the [EnterpriseDB repos download page](https://www.enterprisedb.com/repos-downloads).

Using the retrieved subscription token, set an environmental variables (`EDB_SUBSCRIPTION_TOKEN`) to the token's value. Also set an environmental variable for your EDB subscription type (`EDB_SUBSCRIPTION_TYPE`) to one of `standard` or `enterprise` depending on which plan you are signed up to:

Expand Down Expand Up @@ -84,7 +84,9 @@ export BEACON_AGENT_PROJECT_ID=<your-project-id>

These environment variables are used when you run the `beacon-agent setup` command to create a configuration file in the Beacon configuration directory.

You also need to specify the Beacon configuration directory for storing the configuration file and the name of the configuration file to generate there. The `$HOME/.beacon/` file is one of the default locations which `beacon_agent` searches for `beacon_agent.yaml` when it starts. Using the `-file` flag tells the agent setup process to create its configuration file in a specific location.
You also need to specify the Beacon configuration directory for storing the configuration file and the name of the configuration file to generate there.
The `$HOME/.beacon/` file is one of the default locations which `beacon_agent` searches for `beacon_agent.yaml` when it starts.
Using the `-file` flag tells the agent setup process to create its configuration file in a specific location.

```
beacon-agent setup -file="$HOME/.beacon/beacon_agent.yaml"
Expand Down Expand Up @@ -114,16 +116,14 @@ Entries under `databases` utilize the following format:

```yaml
databases:
<database_name_1>:
dsn: "$DSN1"
tags:
- "<tag-one>"
- "<tag-two>"
<database_name_2>:
dsn: "$DSN2"
tags:
- "<tag-one>"
- "<tag-two>"
- dsn: "$DSN1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As above - we have another PR where resource_id is used. The other option is that resource_id has been dropped, so in that case we should have a formal reference for the yaml in here.

tags:
- "<tag-one>"
- "<tag-two>"
- dsn: "$DSN2"
tags:
- "<tag-one>"
- "<tag-two>"
```

Here is an example `beacon_agent.yaml` file configured for a database named `sales_reporting`:
Expand All @@ -141,12 +141,11 @@ agent:
- "onprem"
provider:
onprem:
databases:
sales_reporting:
dsn: "$DSN"
databases:
- dsn: “$DSN”
tags:
- "sales"
- "reports"
- "sales"
- "reports"
host:
resource_id: "postgresql.lan"
tags: []
Expand Down
Loading