Skip to content

Conversation

@Matyro
Copy link

@Matyro Matyro commented Dec 15, 2025

Description

Added auto cleanup after shutdown from push gateway
Renamed several attributes and fixed kw to kwh
Added total power to avoid race conditions with push gateway and prometheus crawler

Related Issue

Implemented #975

Motivation and Context

Race conditions between push gateway updates and crawling via promethus accumulate over time and skew the total over time

Push gateway does not automatically remove entries after termination of the program, therefore the last value is kept until manually removed. For cluster environments this is not feasible

How Has This Been Tested?

The changes are extracted from the fork currently running in our cluster environment and we monitor the jobs with grafana
I am currently investigating methods to improve the autoclean

Types of changes

What types of changes does your code introduce? Put an x in all the boxes that apply:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

Go over all the following points, and put an x in all the boxes that apply.

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@Matyro Matyro requested a review from a team as a code owner December 15, 2025 09:11
@Matyro Matyro mentioned this pull request Dec 15, 2025
9 tasks
@Matyro
Copy link
Author

Matyro commented Dec 16, 2025

@cianc
Could you review the changes? This should be nearly identical to the changes in the PID Branch

Added auto cleanup after shutdown from push gateway
Renamed attributes
@benoit-cty benoit-cty force-pushed the Prometheus_Exporter_Update branch from 3fe1ccb to e8419c3 Compare December 28, 2025 10:48
benoit-cty and others added 3 commits December 28, 2025 11:58
Co-authored-by: cianc <cian.cullinan@gmail.com>
@benoit-cty
Copy link
Contributor

Hello, I've:

  • Added a test
  • Rename the variable from jobname to job_name
  • Sanitize the automatic job_name

Is it ok for you ?

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.

3 participants