Installing Beacon Agent
Suggest editsThe following steps walk you through how to install and configure Beacon Agent, test locally, and then run the agent to see the results in your Estates page in the EDB Postgres® AI Console.
Before you begin, you need to have the following:
- The access key for a machine user with the
estate ingester
role assigned to it. For more information, see Creating a machine user. - The project ID for the project you want to monitor. You can find this in the URL when you are in the project in the EDB Postgres AI Console.
Establish a connection between your system and the Cloudsmith repository for EDB Postgres AI.
First, find your EnterpriseDB Repos 2.0 token here.
Next, set environmental variables for your repos subscription token and your EDB subscription type (standard or enterprise):
Then, download and run a script to configure your system to access the
beacon-agent
package from the repository. Be sure to replace<your-token>
with your EDB Repos 2.0 token and replace<your-subscription-type>
with your subscription type (standard
orenterprise
):For RHEL-like or SLES:
For Debian or Ubuntu:
Install the
beacon-agent
package:For RHEL-like:
Or if dnf isn't available:
For SLES:
For Debian or Ubuntu:
Configure Beacon Agent and database connections.
First, create a Beacon config in your home directory:
Next, configure Beacon Agent by setting the access key (the one you obtained while Creating a machine user) and project ID:
Then, specify the Beacon config directory for storing the configuration file and the name of the configuration file to be created there.
During the
beacon-agent setup
process, an authentication attempt occurs, utilizing the provided access key and project ID. This authentication is necessary for Beacon Agent to communicate with the Beacon server and register with the project successfully.If the commands execute as expected, you should see a message indicating that you have authenticated successfully to your EDB Postgres AI project.
For security best practices, create a
DSN
environmental variable for each database (DSN1
,DSN2
, and so on) you want to monitor and set each to the correct corresponding dsn.Open your
$HOME/.beacon/beacon_agent.yaml
configuration file and add an entry for each database you want to connect to, including the environmental variable for each database's dsn.Entries under
databases
utilize the following format:Here is an example with a database named
sales_reporting
:
Test Beacon Agent locally.
As an initial smoke test of the agent, it can send the ingestions that it would send back to the Beacon server to stdout instead. This allows you to quickly confirm if the agent is successfully able to gather ingestions and what those ingestions look like.
You can run the agent in stdout mode by modifying the
beacon_agent.yaml
file generated previously to have anagent.beacon_server
value of"stdout"
. A truncated example of this would be:Next, run the agent in this mode using the following command:
You should see output similar to the following eventually (it can take around 5 minutes to see the last few lines):
Note
The message in the second to last line of the logs above specifies that we are using the log client and not actually sending ingestions.
Run Beacon Agent.
In the
beacon_agent.yaml
file, replace"stdout" with
"beacon.biganimal.com:443"`:Follow the logs to monitor the ingestions.
Could this page be better? Report a problem or suggest an addition!