Skip to content

Commit

Permalink
Add a postgres_exporter config file
Browse files Browse the repository at this point in the history
This exporter logs an ERROR if a file called `postgres_exporter.yml` is
not located in its current working directory. We can silence it by
adding an empty config file and pointing the exporter at it.

Signed-off-by: Tristan Partin <tristan@neon.tech>
  • Loading branch information
tristan957 authored Nov 11, 2024
1 parent fde16f8 commit 4b075db
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions compute/compute-node.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -1475,6 +1475,8 @@ RUN mkdir -p /etc/local_proxy && chown postgres:postgres /etc/local_proxy
COPY --from=postgres-exporter /bin/postgres_exporter /bin/postgres_exporter
COPY --from=sql-exporter /bin/sql_exporter /bin/sql_exporter

COPY --chown=postgres compute/etc/postgres_exporter.yml /etc/postgres_exporter.yml

COPY --from=sql_exporter_preprocessor --chmod=0644 /home/nonroot/compute/etc/sql_exporter.yml /etc/sql_exporter.yml
COPY --from=sql_exporter_preprocessor --chmod=0644 /home/nonroot/compute/etc/neon_collector.yml /etc/neon_collector.yml
COPY --from=sql_exporter_preprocessor --chmod=0644 /home/nonroot/compute/etc/sql_exporter_autoscaling.yml /etc/sql_exporter_autoscaling.yml
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion compute/vm-image-spec-bookworm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ commands:
- name: postgres-exporter
user: nobody
sysvInitAction: respawn
shell: 'DATA_SOURCE_NAME="user=cloud_admin sslmode=disable dbname=postgres application_name=postgres-exporter" /bin/postgres_exporter'
shell: 'DATA_SOURCE_NAME="user=cloud_admin sslmode=disable dbname=postgres application_name=postgres-exporter" /bin/postgres_exporter --config.file=/etc/postgres_exporter.yml'
- name: sql-exporter
user: nobody
sysvInitAction: respawn
Expand Down
2 changes: 1 addition & 1 deletion compute/vm-image-spec-bullseye.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ commands:
- name: postgres-exporter
user: nobody
sysvInitAction: respawn
shell: 'DATA_SOURCE_NAME="user=cloud_admin sslmode=disable dbname=postgres application_name=postgres-exporter" /bin/postgres_exporter'
shell: 'DATA_SOURCE_NAME="user=cloud_admin sslmode=disable dbname=postgres application_name=postgres-exporter" /bin/postgres_exporter --config.file=/etc/postgres_exporter.yml'
- name: sql-exporter
user: nobody
sysvInitAction: respawn
Expand Down

1 comment on commit 4b075db

@github-actions
Copy link

Choose a reason for hiding this comment

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

5437 tests run: 5204 passed, 3 failed, 230 skipped (full report)


Failures on Postgres 16

  • test_sharded_ingest[github-actions-selfhosted-1]: release-x86-64
  • test_compaction_l0_memory[github-actions-selfhosted]: release-x86-64
  • test_basebackup_with_high_slru_count[github-actions-selfhosted-10-13-30]: release-x86-64
# Run all failed tests locally:
scripts/pytest -vv -n $(nproc) -k "test_sharded_ingest[release-pg16-github-actions-selfhosted-1] or test_compaction_l0_memory[release-pg16-github-actions-selfhosted] or test_basebackup_with_high_slru_count[release-pg16-github-actions-selfhosted-10-13-30]"
Flaky tests (1)

Postgres 15

Code coverage* (full report)

  • functions: 31.8% (7883 of 24824 functions)
  • lines: 49.4% (62404 of 126225 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
4b075db at 2024-11-11T22:38:25.316Z :recycle:

Please sign in to comment.