Skip to content

Feat: Add Persys Meter Service - #34

Merged
miladhzzzz merged 1 commit into
mainfrom
New-service/persys-meter
Jul 27, 2026
Merged

Feat: Add Persys Meter Service#34
miladhzzzz merged 1 commit into
mainfrom
New-service/persys-meter

Conversation

@miladhzzzz

Copy link
Copy Markdown
Member

persys-meter

Consumes per-workload resource usage events published by persys-scheduler
onto a Redis Stream, stores them durably in ClickHouse, and exposes them
three ways: live Prometheus metrics, a JSON query API, and raw historical
rows in ClickHouse. It's the piece that makes historical/aggregated
per-workload usage queryable at all - compute-agent and persys-scheduler
only ever expose the latest sample.

Where this fits

compute-agent  --(heartbeat, real per-workload usage)-->  persys-scheduler
                                                                  |
                                                     XADD persys:usage:stream
                                                                  |
                                                                  v
                                                            persys-meter
                                                       (this service)
                                                    /        |         \
                                      Prometheus  /metrics   |   JSON API
                                      (live, per-workload)   |   (:9092)
                                                              v
                                                          ClickHouse
                                                      (durable history)

persys-meter is a Redis Streams consumer group: run as many replicas
as you want with the same METER_CONSUMER_GROUP, and Redis hands each one a
different slice of the stream automatically. Nothing here talks directly to
compute-agent or persys-scheduler beyond reading the stream they already
publish to.

@miladhzzzz miladhzzzz self-assigned this Jul 27, 2026
@miladhzzzz miladhzzzz added the enhancement New feature or request label Jul 27, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@gitguardian

gitguardian Bot commented Jul 27, 2026

Copy link
Copy Markdown

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
35206350 Triggered Generic Password 0908a3d persys-meter/internal/config/config.go View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@miladhzzzz
miladhzzzz merged commit e8ebf88 into main Jul 27, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant