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

Override help string #1105

Closed
SuperQ opened this issue Feb 4, 2024 Discussed in #1086 · 0 comments · Fixed by #1106
Closed

Override help string #1105

SuperQ opened this issue Feb 4, 2024 Discussed in #1086 · 0 comments · Fixed by #1106

Comments

@SuperQ
Copy link
Member

SuperQ commented Feb 4, 2024

Discussed in #1086

Originally posted by llamafilm January 3, 2024
It would be helpful to override the help text, for MIBs that are either lacking or inaccurate.

The help string is defined here:

Help: n.Description + " - " + n.Oid,

I propose leaving that format as-is and allowing the user to override description in the generator.

This is especially useful in conjunction with the recent addition of scaling factor in #1026. For example, this Cyberpower UPS returns all sensor values as integers, so after scaling the voltage to the correct value, the help text is wrong. This can be fixed in snmp.yml but I think we need a way to do it in the generator.

  cyberpower_ups:
    walk:
      - 1.3.6.1.4.1.3808.1.1.1.3 # upsInput
    overrides:
      upsAdvanceInputLineVoltage:
        scale: 0.1
# HELP upsAdvanceInputLineVoltage The input line voltage in 1/10 VAC. - 1.3.6.1.4.1.3808.1.1.1.3.2.1
# TYPE upsAdvanceInputLineVoltage gauge
upsAdvanceInputLineVoltage 120.2
SuperQ added a commit that referenced this issue Feb 4, 2024
Allow override of the metric HELP text in the generator. Allows for
altering generated MIB documentation.
* Update example help text for `st4TempSensorValue` to match scale override.

Fixes: #1105

Signed-off-by: SuperQ <[email protected]>
SuperQ added a commit that referenced this issue Feb 4, 2024
Allow override of the metric HELP text in the generator. Allows for
altering generated MIB documentation.
* Update example help text for `st4TempSensorValue` to match scale override.

Fixes: #1105

Signed-off-by: SuperQ <[email protected]>
SuperQ added a commit that referenced this issue Feb 28, 2024
Allow override of the metric HELP text in the generator. Allows for
altering generated MIB documentation.
* Update example help text for `st4TempSensorValue` to match scale override.

Fixes: #1105

Signed-off-by: SuperQ <[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 a pull request may close this issue.

1 participant