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

Ops-Agent Repeatedly Logging into PostgreSQL container, generating a large amount of logs #1614

Open
waynewaynetsai opened this issue Feb 7, 2024 · 0 comments

Comments

@waynewaynetsai
Copy link

waynewaynetsai commented Feb 7, 2024

Describe the bug

I have installed the ops-agent(Version: 2.46.1) on my GCE instance with the following primary configuration:

metrics:
  receivers:
    postgresql:
      type: postgresql
      username: opsagent
      password: test1234
      insecure: true
      endpoint: localhost:5432
      collection_interval: 30s
  service:
    pipelines:
      postgresql:
        receivers:
        - postgresql

I followed the rest of the setup according to the official documentation: Configuring the Ops Agent for PostgreSQL.

After starting the service, I noticed that the ops-agent repeatedly logging into the PostgreSQL database container.

Is this behavior normal? Or could it potentially exhaust the database's connections and other related resources?

If it's problematic, how can I stop this behavior?

(P.S. I have already set collection_interval: 30s).

image

To Reproduce
Steps to reproduce the behavior:

  1. Start a GCE VM with debian 11
  2. Setup and launch the PostgreSQL container with pgbouncer container, ensuring that the container's volume is properly configured for data persistence.
  3. Install Ops Agent version '2.46.1' with above offical document
  4. Specify include_paths for container volume log paths in /etc/google-cloud-ops-agent/config.yaml.
  5. Restart Service: sudo service google-cloud-ops-agent restart
  6. See results with Logs Explorer

Expected behavior

It will not log in indefinitely and generate a large amount of logs, occupying a significant amount of log space.
It should only log in once.

Environment (please complete the following information):

  • VM distro / OS: Debian 11
  • Ops Agent version: 2.46.1
  • Postgres Version: 15.5

Other

@waynewaynetsai waynewaynetsai changed the title Ops-Agent Repeatedly Logging into PostgreSQL container Ops-Agent Repeatedly Logging into PostgreSQL container, generating a large amount of logs Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant