Skip to content

Conversation

@ahmadsherif
Copy link
Contributor

@ahmadsherif ahmadsherif commented Nov 29, 2022

After the merge of prometheus-community/postgres_exporter#613, postgres-exporter installed by recent versions of the prometheus-postgres-exporter Helm chart is throwing 500 errors like:

HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Tue, 29 Nov 2022 11:08:41 GMT
Content-Length: 1418

An error has occurred while serving metrics:

4 error(s) occurred:
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"template0" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.225283e+06 > } was collected before with the same name and label values
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"postgres" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.373103e+06 > } was collected before with the same name and label values
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"template1" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.373103e+06 > } was collected before with the same name and label values
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"default" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.373103e+06 > } was collected before with the same name and label values

So we're removing the YAML query to avoid such conflict.

Signed-off-by: Ahmad Sherif [email protected]

What this PR does / why we need it

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

  • fixes #

Special notes for your reviewer

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

@ahmadsherif ahmadsherif changed the title [postgres-exporter] Remove pg_database query [prometheus-postgres-exporter] Remove pg_database query Nov 29, 2022
Copy link
Member

@monotek monotek left a comment

Choose a reason for hiding this comment

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

as this removes a currently used config this would be considered a breaking change.

@ahmadsherif ahmadsherif requested a review from monotek November 29, 2022 16:34
Copy link
Member

@monotek monotek left a comment

Choose a reason for hiding this comment

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

Please also update readme upgrading section and describe the change there.

@moolitayer
Copy link

@monotek Is this really a breaking change, cosidering we get the same metric from a built-in collector?
Should this be considered a patch?

@monotek
Copy link
Member

monotek commented Dec 1, 2022

@monotek Is this really a breaking change, cosidering we get the same metric from a built-in collector? Should this be considered a patch?

Yes, as we change a default value of the chart.
Somebody might have adjusted the query slightly and would need the info of this change, so he can remove it manually.

@ahmadsherif ahmadsherif requested a review from monotek December 5, 2022 10:40
After the merge of prometheus-community/postgres_exporter#613,
`postgres-exporter` installed by recent versions of the prometheus-postgres-exporter Helm chart is throwing 500 errors like:
```
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Tue, 29 Nov 2022 11:08:41 GMT
Content-Length: 1418

An error has occurred while serving metrics:

4 error(s) occurred:
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"template0" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.225283e+06 > } was collected before with the same name and label values
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"postgres" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.373103e+06 > } was collected before with the same name and label values
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"template1" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.373103e+06 > } was collected before with the same name and label values
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"default" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.373103e+06 > } was collected before with the same name and label values
```
So we're removing the YAML query to avoid such conflict.

Signed-off-by: Ahmad Sherif <[email protected]>
@sergelogvinov
Copy link
Contributor

Hello, i've got the same error, and almost did the same PR.
The postgres_explorer adds this metrics in the core https://github.com/prometheus-community/postgres_exporter/releases/tag/v0.11.0

So, braking changes was after upgrade version to 0.11.0
Currently, the default values of the cart do not work. In my opinion, this PR is hot-fix.

So, do you have a plan then it will be merged?
Thank you.

@moolitayer
Copy link

@monotek friendly ping

@monotek monotek merged commit 8cf2418 into prometheus-community:main Dec 13, 2022
@moolitayer
Copy link

@ahmadsherif @monotek thanks for the fix!

cx-asafd pushed a commit to CheckmarxDev/prometheus-helm-charts that referenced this pull request Dec 29, 2022
…ommunity#2752)

* [postgres-exporter] Remove pg_database query

After the merge of prometheus-community/postgres_exporter#613,
`postgres-exporter` installed by recent versions of the prometheus-postgres-exporter Helm chart is throwing 500 errors like:
```
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Tue, 29 Nov 2022 11:08:41 GMT
Content-Length: 1418

An error has occurred while serving metrics:

4 error(s) occurred:
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"template0" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.225283e+06 > } was collected before with the same name and label values
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"postgres" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.373103e+06 > } was collected before with the same name and label values
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"template1" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.373103e+06 > } was collected before with the same name and label values
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"default" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.373103e+06 > } was collected before with the same name and label values
```
So we're removing the YAML query to avoid such conflict.

Signed-off-by: Ahmad Sherif <[email protected]>

* [prometheus-postgres-exporter] Bump version to 3.3.1

Signed-off-by: Ahmad Sherif <[email protected]>

* [prometheus-postgres-exporter] Bump version to 4.0.0

Signed-off-by: Ahmad Sherif <[email protected]>

* Add upgrading notes to README.md

Signed-off-by: Ahmad Sherif <[email protected]>

Signed-off-by: Ahmad Sherif <[email protected]>
Co-authored-by: MH <[email protected]>
Matiasmct pushed a commit to giffgaff/prometheus-charts-backup that referenced this pull request May 16, 2023
…ommunity#2752)

* [postgres-exporter] Remove pg_database query

After the merge of prometheus-community/postgres_exporter#613,
`postgres-exporter` installed by recent versions of the prometheus-postgres-exporter Helm chart is throwing 500 errors like:
```
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8
X-Content-Type-Options: nosniff
Date: Tue, 29 Nov 2022 11:08:41 GMT
Content-Length: 1418

An error has occurred while serving metrics:

4 error(s) occurred:
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"template0" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.225283e+06 > } was collected before with the same name and label values
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"postgres" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.373103e+06 > } was collected before with the same name and label values
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"template1" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.373103e+06 > } was collected before with the same name and label values
* collected metric "pg_database_size_bytes" { label:<name:"datname" value:"default" > label:<name:"server" value:"10.188.0.2:5432" > gauge:<value:8.373103e+06 > } was collected before with the same name and label values
```
So we're removing the YAML query to avoid such conflict.

Signed-off-by: Ahmad Sherif <[email protected]>

* [prometheus-postgres-exporter] Bump version to 3.3.1

Signed-off-by: Ahmad Sherif <[email protected]>

* [prometheus-postgres-exporter] Bump version to 4.0.0

Signed-off-by: Ahmad Sherif <[email protected]>

* Add upgrading notes to README.md

Signed-off-by: Ahmad Sherif <[email protected]>

Signed-off-by: Ahmad Sherif <[email protected]>
Co-authored-by: MH <[email protected]>
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

Successfully merging this pull request may close these issues.

5 participants