Git Product home page Git Product logo

Comments (6)

ahmedaall avatar ahmedaall commented on June 27, 2024 1

@thenodon It works perfectly ! thank you

from aci-exporter.

thenodon avatar thenodon commented on June 27, 2024

@ahmedaall Just add staticlabels to the class query, for example:

class_queries:
  interface_info:
    class_name: l1PhysIf
    query_parameter: "?rsp-subtree=children&rsp-subtree-include=stats&rsp-subtree-class=ethpmPhysIf,eqptIngrBytes5min,eqptEgrBytes5min,eqptIngrDropPkts5min,eqptEgrDropPkts5min&query-target-filter=and(ne( l1PhysIf.adminSt, \"down\"))"
    metrics:
      - name: interface_oper_speed
        value_name: l1PhysIf.children.[ethpmPhysIf].attributes.operSpeed
        type: gauge
        help: The current operational speed of the interface, in bits per second.
        value_transform:
          'unknown': 0
          '100M': 100000000
          '1G': 1000000000
          '10G': 10000000000
          '25G': 25000000000
          '40G': 40000000000
          '100G': 100000000000
          '400G': 400000000000
    labels:
      #- property_name: l1PhysIf.attributes.id
      #  regex: "^(?P<id>.*)"
      - property_name: l1PhysIf.attributes.dn
        regex: "^topology/pod-(?P<podid>[1-9][0-9]*)/node-(?P<nodeid>[1-9][0-9].*)/sys/phys-\\[(?P<port>.+)\\]"
    staticlabels:
      - key: mystaticlabel
        value: mystaticvalue

from aci-exporter.

thenodon avatar thenodon commented on June 27, 2024

Great to hear.

from aci-exporter.

camrossi avatar camrossi commented on June 27, 2024

I was looking for exactly this! Could we add it to the readme? :)

from aci-exporter.

thenodon avatar thenodon commented on June 27, 2024

@camrossi yes we should. I will reopen this ticket so its added in next release.

from aci-exporter.

thenodon avatar thenodon commented on June 27, 2024

This is fixed in commit a49070a branch issue_42 with an update to readme

from aci-exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.