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

Bug? in generator #273

Closed
nicolas-gibelin opened this issue Mar 13, 2018 · 8 comments
Closed

Bug? in generator #273

nicolas-gibelin opened this issue Mar 13, 2018 · 8 comments

Comments

@nicolas-gibelin
Copy link

Infos

  • debian 9, manual install of prometheus
  • snmp_exporter 0.9.0, 0.8.0
  • In this issue, i use the PowerNet-MIB
  • generator from git : * master abb143a Release 0.9.0
  • go build : to compile the generator
generator.yml

  apcupssymmetrapx500:
    version: 1
    walk:
      - 1.3.6.1.4.1.318.1.1.1.9.3.3.1.16   # PhaseOutputPercentPower

Then

./generator generate

gives

snmp.yml

  - name: upsPhaseOutputPercentPower
    oid: 1.3.6.1.4.1.318.1.1.1.9.3.3.1.16
    type: gauge
    help: The percentage of the UPS power capacity in Watts at redundancy @ (n + x)
      presently being used on this output phase, or -1 if it's unsupported by this
      UPS. - 1.3.6.1.4.1.318.1.1.1.9.3.3.1.16
    indexes:
    - labelname: upsPhaseOutputPhaseTableIndex
      type: gauge
    - labelname: upsPhaseOutputPhaseIndex
      type: gauge

But the config does not work:

2 error(s) occurred:
* collected metric upsPhaseOutputPercentPower label:<name:"upsPhaseOutputPhaseIndex" value:"1" > label:<name:"upsPhaseOutputPhaseTableIndex" value:"1" > gauge:<value:40 >  was collected before with the same name and label values
* collected metric upsPhaseOutputPercentPower label:<name:"upsPhaseOutputPhaseIndex" value:"1" > label:<name:"upsPhaseOutputPhaseTableIndex" value:"1" > gauge:<value:42 >  was collected before with the same name and label values

After some tests, config (snmp.yml) must be (see the oid):

snmp.yml

  - name: upsPhaseOutputPercentPower
    oid: 1.3.6.1.4.1.318.1.1.1.9.3.3.1.16.1
    type: gauge
    help: The percentage of the UPS power capacity in Watts at redundancy @ (n + x)
      presently being used on this output phase, or -1 if it's unsupported by this
      UPS. - 1.3.6.1.4.1.318.1.1.1.9.3.3.1.16
    indexes:
    - labelname: upsPhaseOutputPhaseTableIndex
      type: gauge
    - labelname: upsPhaseOutputPhaseIndex
      type: gauge

And returns

upsPhaseOutputPercentPower{upsPhaseOutputPhaseIndex="1",upsPhaseOutputPhaseTableIndex="1"} 42
upsPhaseOutputPercentPower{upsPhaseOutputPhaseIndex="2",upsPhaseOutputPhaseTableIndex="1"} 42
upsPhaseOutputPercentPower{upsPhaseOutputPhaseIndex="3",upsPhaseOutputPhaseTableIndex="1"} 39

But

generator.yml

  apcupssymmetrapx500:
    version: 1
    walk:
      - 1.3.6.1.4.1.318.1.1.1.9.3.3.1.16.1   # PhaseOutputPercentPower

Then

./generator generate

Gives

FATA[0000] Cannot find oid '1.3.6.1.4.1.318.1.1.1.9.3.3.1.16.1' to walk  source="tree.go:162"
@brian-brazil
Copy link
Contributor

That sounds like your device is not implementing the MIB correctly. What does snmpwalk show for the OID?

@nicolas-gibelin
Copy link
Author

nicolas-gibelin commented Mar 14, 2018 via email

@brian-brazil
Copy link
Contributor

Yes, this is a bug in the hardware. That first 1 shouldn't be there. You should file a bug with your vendor.

@nicolas-gibelin
Copy link
Author

Thanks for the answer

Regards.

@bissquit
Copy link

@nicolas-gibelin , did the vendor fix the bug?

@nicolas-gibelin
Copy link
Author

nicolas-gibelin commented Mar 2, 2020 via email

@bissquit
Copy link

bissquit commented Mar 3, 2020

@nicolas-gibelin , what the vendor said about "device bug"? Did he confirm that? What was the reason not to fix a bug? Thank you!

@nicolas-gibelin
Copy link
Author

nicolas-gibelin commented Mar 3, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants