-
Notifications
You must be signed in to change notification settings - Fork 65
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
No way to enable logs collection when using docker image #42
Comments
I have the same question: how does log collections work under Kubernetes ? |
@JordanP We don't support log collection in Kubernetes today - though looking to add this in the future. For @sebasmagri's initial question - Sebastian, were you looking to monitor Kubernetes pods, or were you targeting something external, like a cloud provider database? (generally log collection is enabled by default in recent collector releases - if supported for the current platform, that is) |
@lfittl it's for running the collector on ECS and monitoring RDS. We had to go with a custom docker image, but it's still pretty annoying that now the server names are forced to be the rds instance ID, since we create a lot of RDS instances dynamically and discard the old ones, being really a single server instance all the time. |
@sebasmagri Ah - makes sense. You can use the following settings to override the system identifiers: PGA_API_SYSTEM_ID You can see the defaults that get assigned here: https://github.com/pganalyze/collector/blob/master/config/identify_system.go#L15 (note you could e.g. choose to override PGA_API_SYSTEM_ID in your setup to have a stable server record) |
Thanks for the pointer @lfittl ! We'd still like to be able to use the docker image as provided though, any chance that logging collection can be enabled by default for this use case? |
@sebasmagri In the case where you are not using the instance ID in the hostname, utilizing the |
@lfittl beside Kubernetes, does the Collector supports monitoring a PG instance running in a container ? |
@JordanP There are two ways to do that, assuming you are referring to Postgres running inside a Docker container on a VM that you manage:
|
Excellent ! Option 2 seems doable for us, nice ! |
For the record, I managed to have log insights working in a Kubernetes cluster, with what you suggested: All good, thanks ! |
Is there any follow-up on this? I still think that it would be very convenient to have a way for kubernetes-managed log collectors like fluentd or vector push logs into pganalyze (whether to the collector or directly to the centralized ingest endpoint). |
@lfittl How realistic would it be to allow for |
See #503 for an implementation that should work in the typical Kubernetes environment using fluentbit for log routing (tested with CloudNativePG, need to do a bit more testing with other operators). |
Seems like by default logs collection is not enabled when using the docker image without changes, and there's no environment variable or command switch to enable them.
The text was updated successfully, but these errors were encountered: