Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix prometheus metrics #148

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

vetinari
Copy link

@vetinari vetinari commented Nov 10, 2023

some values (i.e. non numerical) must not be in the produced metrics.

All metrics may have an optional # HELP $description line and should have a # TYPE $metric_name $type line.

address and unit tags have been removed as they give no information you cannot get from the "HELP" lines. They have been replaced with model and serial tags to allow multiple inverters in the same prometheus instance.

Other fixes:

depends on bohdan-s/SungrowClient#4

some values (i.e. non numerical) must not be in the produced metrics.

All metrics may have an optional `# HELP $description` line and
should have a `# TYPE $metric_name $type` line.

`address` and `unit` tags have been removed as they give no information
you cannot get from the "HELP" lines. They have been replaced with
`model` and `serial` tags to allow multiple inverters in the same
prometheus instance.

Other fixes:
* add `charset=utf-8` to webserver Content-Type headers.
* add `SH5.0RT-V112` that registers as 0xE0C
* add description and type to registers-sungrow.yaml

depends on bohdan-s/SungrowClient#4
this prefix will be prefixed to the prometheus metric name, e.g. for the
register `internal_temperature` with a prefix of `sungrow_` the
metric name will be `sungrow_internal_temperature`.
@vetinari vetinari marked this pull request as ready for review May 11, 2024 09:51
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.

1 participant