Code Monkey home page Code Monkey logo

prometheus_aci_exporter's Introduction

Prometheus ACI Exporter

Cisco ACI exporter for Prometheus

Pulls information from an APIC using the REST API.

OpenMetrics support

Initial OpenMetrics support is available. OpenMetrics output is provided if the exporter has been started with the --web.openmetrics option and the client supplies an Accept: header including application/openmetrics-text. Otherwise, data is output in the Prometheus exposition format.

If OpenMetrics output is requested, the names of counter metrics are modified on-the-fly to match the new convention (the suffix _total is appended unless the metric name already ends with _total). It is strongly recommended to include the _total suffix in counter metric names in preparation for the eventual transition from the Prometheus exposition format to OpenMetrics.

Docker Image

https://hub.docker.com/r/ravualhemio/prometheus_aci_exporter

Running the Docker Image

...and mounting a custom aci.yml file.

docker run --rm -v ${PWD}/examples/aci.yml:/etc/prometheus_aci_exporter/aci.yml -p 9377:9377 -it ravualhemio/prometheus_aci_exporter

Building the Docker Image locally

docker build . -t ravualhemio/prometheus_aci_exporter

prometheus_aci_exporter's People

Contributors

josdotso avatar jqckb avatar ravualhemio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

prometheus_aci_exporter's Issues

port descriptions added as labels

Feature request if it doesn't already exist.

Can the port descriptions be pulled and added to labels? I haven't been able to see this data in the current metric labels.

Bug : clashing series on aci_fan_xxx for APIC nodes

I discovered with Cortex (one of long-term storage of Prometheus) that this exporter is having a problem with aci_fan_rpm, specially with APIC nodes (node 1, 2 and 3 for me).

Here is an example of the /metrics :

aci_fan_rpm{className="eqptFanStats5min",fabric="fabric-dc1",node="1",pod="1",queryName="fan_rpm_stats",slot="4",slotType="ftslot"} 3100.0
aci_fan_rpm{className="eqptFanStats5min",fabric="fabric-dc1",node="1",pod="1",queryName="fan_rpm_stats",slot="4",slotType="ftslot"} 3700.0
aci_fan_rpm{className="eqptFanStats5min",fabric="fabric-dc1",node="1",pod="1",queryName="fan_rpm_stats",slot="4",slotType="ftslot"} 3100.0
aci_fan_rpm{className="eqptFanStats5min",fabric="fabric-dc1",node="1",pod="1",queryName="fan_rpm_stats",slot="4",slotType="ftslot"} 3600.0
aci_fan_rpm{className="eqptFanStats5min",fabric="fabric-dc1",node="1",pod="1",queryName="fan_rpm_stats",slot="4",slotType="ftslot"} 3100.0
aci_fan_rpm{className="eqptFanStats5min",fabric="fabric-dc1",node="1",pod="1",queryName="fan_rpm_stats",slot="4",slotType="ftslot"} 3600.0
aci_fan_rpm{className="eqptFanStats5min",fabric="fabric-dc1",node="1",pod="1",queryName="fan_rpm_stats",slot="4",slotType="ftslot"} 3100.0
aci_fan_rpm{className="eqptFanStats5min",fabric="fabric-dc1",node="1",pod="1",queryName="fan_rpm_stats",slot="4",slotType="ftslot"} 3600.0
aci_fan_rpm{className="eqptFanStats5min",fabric="fabric-dc1",node="1",pod="1",queryName="fan_rpm_stats",slot="4",slotType="ftslot"} 3100.0
aci_fan_rpm{className="eqptFanStats5min",fabric="fabric-dc1",node="1",pod="1",queryName="fan_rpm_stats",slot="4",slotType="ftslot"} 3600.0
aci_fan_rpm{className="eqptFanStats5min",fabric="fabric-dc1",node="1",pod="1",queryName="fan_rpm_stats",slot="4",slotType="ftslot"} 3100.0
aci_fan_rpm{className="eqptFanStats5min",fabric="fabric-dc1",node="1",pod="1",queryName="fan_rpm_stats",slot="4",slotType="ftslot"} 3600.0

Do you have an idea where it could come ?

ValueError: dictionary update sequence element #0 has length 1; 2 is required

$ docker run --rm -v /Users/test/git/prometheus_aci_exporter/examples/aci.yml:/etc/prometheus_aci_exporter/aci.yml -p 9377:9377 -it ravualhemio/prometheus_aci_exporter

Exception happened during processing of request from ('172.17.0.1', 57602)
Traceback (most recent call last):
File "/usr/local/lib/python3.8/socketserver.py", line 650, in process_request_thread
self.finish_request(request, client_address)
File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/local/lib/python3.8/socketserver.py", line 720, in init
self.handle()
File "/usr/local/lib/python3.8/http/server.py", line 427, in handle
self.handle_one_request()
File "/usr/local/lib/python3.8/http/server.py", line 415, in handle_one_request
method()
File "./prometheus_aci_exporter.py", line 513, in do_GET
generated_lines = [
File "./prometheus_aci_exporter.py", line 513, in
generated_lines = [
File "./prometheus_aci_exporter.py", line 246, in collect
yield from self.collect_fabric(fabric_name, fabric, controller, common_queries)
File "./prometheus_aci_exporter.py", line 334, in collect_fabric
labels.update(updated_labels)
ValueError: dictionary update sequence element #0 has length 1; 2 is required

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.