Skip to content
This repository was archived by the owner on Aug 22, 2024. It is now read-only.
This repository was archived by the owner on Aug 22, 2024. It is now read-only.

PostgreSQL collectors - postgres/logs #53

@plvnv

Description

@plvnv

We use the docker image of pgSCV to monitor postgres in a container and have run into the following problem. By default collector postgres/logs are enabled only when pgSCV is installed as a local service

if addr == "localhost" || strings.HasPrefix(addr, "127.") || addr == "::1" {
    return true
  }

if ! config.LocalService {
		log.Debugln("[postgres storage collector]: skip collecting directories metrics from remote services")
		return nil
	}

In our case, we run two docker containers pgSCV and postgres on the same host machine, postgres DATA locate locally and mounted as volume inside the container. As a result, we have to run the pgSCV container with the option

extra_hosts:
      - "127.${HOSTNAME}:XXX.XXX.XXX.XXX"
to get the postgres/logs collector working

I think it would be nice to have a separate switch to make the postgres/logs collector work not only in local service mode

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions