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

Improved Lookup process for label information to utilize TypeMapping #908

Merged
merged 1 commit into from
Jul 5, 2023

Conversation

servak
Copy link
Contributor

@servak servak commented Jul 5, 2023

We've made improvements to the Metric Lookup process.
Previously, the byte representation of labels was output as-is under certain circumstances. With this update, it now references the processing of TypeMapping for output.

generator.yml

modules:
  default:
    walk:
    - lldpRemPortIdSubtype
    - lldpLocPortIdSubtype
    - lldpRemPortId
    - lldpLocPortId
    - lldpRemSysName
    lookups:
    - source_indexes:
      - lldpRemTimeMark
      - lldpRemLocalPortNum
      - lldpRemIndex
      lookup: "lldpRemPortId"
    - source_indexes: ['lldpRemLocalPortNum']
      lookup: "lldpLocPortId"
    overrides:
      lldpRemPortIdSubtype:
        ignore: true
      lldpLocPortIdSubtype:
        ignore: true

before

lldpLocPortId{lldpLocPortId="Management1",lldpLocPortNum="245"} 1
# HELP lldpRemPortId The string value used to identify the port component associated with the remote system. - 1.0.8802.1.1.2.1.4.1.1.7
# TYPE lldpRemPortId gauge
lldpRemPortId{lldpLocPortId="0x4D616E6167656D656E743100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",lldpRemIndex="2",lldpRemLocalPortNum="245",lldpRemPortId="0x4769312F31340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",lldpRemTimeMark="0"} 1
# HELP lldpRemSysName The string value used to identify the system name of the remote system. - 1.0.8802.1.1.2.1.4.1.1.9
# TYPE lldpRemSysName gauge
lldpRemSysName{lldpLocPortId="0x4D616E6167656D656E743100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",lldpRemIndex="14",lldpRemLocalPortNum="245",lldpRemPortId="0x4769312F31340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",lldpRemSysName="hostname",lldpRemTimeMark="0"} 1

after

lldpLocPortId{lldpLocPortId="Management1",lldpLocPortNum="245"} 1
# HELP lldpRemPortId The string value used to identify the port component associated with the remote system. - 1.0.8802.1.1.2.1.4.1.1.7
# TYPE lldpRemPortId gauge
lldpRemPortId{lldpLocPortId="Management1",lldpRemIndex="2",lldpRemLocalPortNum="245",lldpRemPortId="Gi1/14",lldpRemTimeMark="0"} 1
# HELP lldpRemSysName The string value used to identify the system name of the remote system. - 1.0.8802.1.1.2.1.4.1.1.9
# TYPE lldpRemSysName gauge
lldpRemSysName{lldpLocPortId="Management1",lldpRemIndex="2",lldpRemLocalPortNum="245",lldpRemPortId="Gi1/14",lldpRemSysName="hostname",lldpRemTimeMark="0"} 1

Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

This is great, thanks!

@SuperQ SuperQ requested a review from roidelapluie July 5, 2023 06:00
@servak
Copy link
Contributor Author

servak commented Jul 5, 2023

Sorry for the delay after the review, I added a test and rebased it again.

@SuperQ SuperQ merged commit 4faf330 into prometheus:main Jul 5, 2023
SuperQ added a commit that referenced this pull request Jul 5, 2023
BREAKING CHANGES:

This version of the exporter introduces a new configuration file format. This
new format separates the walk and metric mappings from the connection and
authentication settings. This allows for easier configuration of different
auth params without having to duplicate the full walk and metric mapping.

See auth-split-migration.md for more details.

* [CHANGE] Split config of auth and modules #859
* [ENHANCEMENT] Improved Lookup process for label information #908
* [BUGFIX] Fix metrics path not using command-line argument value #904

Signed-off-by: SuperQ <[email protected]>
@SuperQ SuperQ mentioned this pull request Jul 5, 2023
@servak servak deleted the improbe-lookup branch July 5, 2023 23:00
SuperQ added a commit that referenced this pull request Jul 6, 2023
BREAKING CHANGES:

This version of the exporter introduces a new configuration file format. This
new format separates the walk and metric mappings from the connection and
authentication settings. This allows for easier configuration of different
auth params without having to duplicate the full walk and metric mapping.

See auth-split-migration.md for more details.

* [CHANGE] Split config of auth and modules #859
* [ENHANCEMENT] Improved Lookup process for label information #908
* [BUGFIX] Fix metrics path not using command-line argument value #904

Signed-off-by: SuperQ <[email protected]>
RichiH pushed a commit that referenced this pull request Jul 6, 2023
BREAKING CHANGES:

This version of the exporter introduces a new configuration file format. This
new format separates the walk and metric mappings from the connection and
authentication settings. This allows for easier configuration of different
auth params without having to duplicate the full walk and metric mapping.

See auth-split-migration.md for more details.

* [CHANGE] Split config of auth and modules #859
* [ENHANCEMENT] Improved Lookup process for label information #908
* [BUGFIX] Fix metrics path not using command-line argument value #904

Signed-off-by: SuperQ <[email protected]>
SuperQ added a commit that referenced this pull request Jul 19, 2023
BREAKING CHANGES:

This version of the exporter introduces a new configuration file format. This
new format separates the walk and metric mappings from the connection and
authentication settings. This allows for easier configuration of different
auth params without having to duplicate the full walk and metric mapping.

See auth-split-migration.md for more details.

* [CHANGE] Split config of auth and modules #859
* [FEATURE] Improved Lookup process for label information #908
* [ENHANCEMENT] Add support for parsing SNMP transport from target #914
* [BUGFIX] Fix metrics path not using command-line argument value #904

Signed-off-by: SuperQ <[email protected]>
@SuperQ SuperQ mentioned this pull request Jul 19, 2023
SuperQ added a commit that referenced this pull request Jul 19, 2023
BREAKING CHANGES:

This version of the exporter introduces a new configuration file format. This
new format separates the walk and metric mappings from the connection and
authentication settings. This allows for easier configuration of different
auth params without having to duplicate the full walk and metric mapping.

See auth-split-migration.md for more details.

* [CHANGE] Split config of auth and modules #859
* [FEATURE] Improved Lookup process for label information #908
* [ENHANCEMENT] Add support for parsing SNMP transport from target #914
* [BUGFIX] Fix metrics path not using command-line argument value #904

Signed-off-by: SuperQ <[email protected]>
SuperQ added a commit that referenced this pull request Jul 19, 2023
BREAKING CHANGES:

This version of the exporter introduces a new configuration file format. This
new format separates the walk and metric mappings from the connection and
authentication settings. This allows for easier configuration of different
auth params without having to duplicate the full walk and metric mapping.

See auth-split-migration.md for more details.

* [CHANGE] Split config of auth and modules #859
* [FEATURE] Add support for parsing SNMP transport from target #914
* [ENHANCEMENT] Improved Lookup process for label information #908
* [BUGFIX] Fix metrics path not using command-line argument value #904

Signed-off-by: SuperQ <[email protected]>
SuperQ added a commit that referenced this pull request Jul 20, 2023
BREAKING CHANGES:

This version of the exporter introduces a new configuration file format. This
new format separates the walk and metric mappings from the connection and
authentication settings. This allows for easier configuration of different
auth params without having to duplicate the full walk and metric mapping.

See auth-split-migration.md for more details.

* [CHANGE] Split config of auth and modules #859
* [FEATURE] Add support for parsing SNMP transport from target #914
* [ENHANCEMENT] Improved Lookup process for label information #908
* [BUGFIX] Fix metrics path not using command-line argument value #904

Signed-off-by: SuperQ <[email protected]>
SuperQ added a commit that referenced this pull request Jul 20, 2023
BREAKING CHANGES:

This version of the exporter introduces a new configuration file format. This
new format separates the walk and metric mappings from the connection and
authentication settings. This allows for easier configuration of different
auth params without having to duplicate the full walk and metric mapping.

See auth-split-migration.md for more details.

* [CHANGE] Split config of auth and modules #859
* [FEATURE] Add support for parsing SNMP transport from target #914
* [ENHANCEMENT] Improved Lookup process for label information #908
* [BUGFIX] Fix metrics path not using command-line argument value #904

Signed-off-by: SuperQ <[email protected]>
SuperQ added a commit that referenced this pull request Aug 9, 2023
BREAKING CHANGES:

This version of the exporter introduces a new configuration file format. This
new format separates the walk and metric mappings from the connection and
authentication settings. This allows for easier configuration of different
auth params without having to duplicate the full walk and metric mapping.

See auth-split-migration.md for more details.

* [CHANGE] Split config of auth and modules #859
* [FEATURE] Add support for parsing SNMP transport from target #914
* [ENHANCEMENT] Improved Lookup process for label information #908
* [BUGFIX] Fix metrics path not using command-line argument value #904

Signed-off-by: SuperQ <[email protected]>
@SuperQ SuperQ mentioned this pull request Aug 9, 2023
SuperQ added a commit that referenced this pull request Aug 16, 2023
* Release v0.23.0

BREAKING CHANGES:

This version of the exporter introduces a new configuration file format. This
new format separates the walk and metric mappings from the connection and
authentication settings. This allows for easier configuration of different
auth params without having to duplicate the full walk and metric mapping.

See auth-split-migration.md for more details.

* [CHANGE] Split config of auth and modules #859
* [FEATURE] Add support for parsing SNMP transport from target #914
* [ENHANCEMENT] Improved Lookup process for label information #908
* [BUGFIX] Fix metrics path not using command-line argument value #904

Signed-off-by: SuperQ <[email protected]>

* Lint dashboards

Update dashboards to latest mixin linting.

Signed-off-by: SuperQ <[email protected]>

---------

Signed-off-by: SuperQ <[email protected]>
stephan-windischmann-sky pushed a commit to stephan-windischmann-sky/snmp_exporter that referenced this pull request Oct 27, 2023
stephan-windischmann-sky pushed a commit to stephan-windischmann-sky/snmp_exporter that referenced this pull request Oct 27, 2023
BREAKING CHANGES:

This version of the exporter introduces a new configuration file format. This
new format separates the walk and metric mappings from the connection and
authentication settings. This allows for easier configuration of different
auth params without having to duplicate the full walk and metric mapping.

See auth-split-migration.md for more details.

* [CHANGE] Split config of auth and modules prometheus#859
* [ENHANCEMENT] Improved Lookup process for label information prometheus#908
* [BUGFIX] Fix metrics path not using command-line argument value prometheus#904

Signed-off-by: SuperQ <[email protected]>
Signed-off-by: Stephan Windischmann <[email protected]>
stephan-windischmann-sky pushed a commit to stephan-windischmann-sky/snmp_exporter that referenced this pull request Oct 27, 2023
BREAKING CHANGES:

This version of the exporter introduces a new configuration file format. This
new format separates the walk and metric mappings from the connection and
authentication settings. This allows for easier configuration of different
auth params without having to duplicate the full walk and metric mapping.

See auth-split-migration.md for more details.

* [CHANGE] Split config of auth and modules prometheus#859
* [FEATURE] Add support for parsing SNMP transport from target prometheus#914
* [ENHANCEMENT] Improved Lookup process for label information prometheus#908
* [BUGFIX] Fix metrics path not using command-line argument value prometheus#904

Signed-off-by: SuperQ <[email protected]>
Signed-off-by: Stephan Windischmann <[email protected]>
stephan-windischmann-sky pushed a commit to stephan-windischmann-sky/snmp_exporter that referenced this pull request Oct 27, 2023
* Release v0.23.0

BREAKING CHANGES:

This version of the exporter introduces a new configuration file format. This
new format separates the walk and metric mappings from the connection and
authentication settings. This allows for easier configuration of different
auth params without having to duplicate the full walk and metric mapping.

See auth-split-migration.md for more details.

* [CHANGE] Split config of auth and modules prometheus#859
* [FEATURE] Add support for parsing SNMP transport from target prometheus#914
* [ENHANCEMENT] Improved Lookup process for label information prometheus#908
* [BUGFIX] Fix metrics path not using command-line argument value prometheus#904

Signed-off-by: SuperQ <[email protected]>

* Lint dashboards

Update dashboards to latest mixin linting.

Signed-off-by: SuperQ <[email protected]>

---------

Signed-off-by: SuperQ <[email protected]>
Signed-off-by: Stephan Windischmann <[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.

2 participants