Giter Site home page Giter Site logo

nuvo / emq_exporter Goto Github PK

View Code? Open in Web Editor NEW
35.0 5.0 16.0 107 KB

Simple server that scrapes EMQ metrics and exporters them via HTTP for Prometheus consumption

License: Apache License 2.0

Dockerfile 0.53% Makefile 6.65% Go 92.82%
prometheus emq docker kubernetes go golang metrics exporter

emq_exporter's People

Contributors

hagaibarel avatar karlem avatar yangliyl avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

emq_exporter's Issues

Instructions on running emq_exporter in docker

I run emq_exporter:0.4.1 by docker, I get error follow, how to run emq_exporter by docker?

[root@localhost ~]# docker run -p 9540:9540 nuvo/emq_exporter:v0.3.1 ---emq.uri "http://localhost:8080"

Unable to find image 'nuvo/emq_exporter:v0.3.1' locally
v0.3.1: Pulling from nuvo/emq_exporter
57c14dd66db0: Already exists 
be921ee89692: Already exists 
f85a6778cbc5: Pull complete 
Digest: sha256:61f8ebb871f9e49a6a09c8bd4d8bf2ef3ac3316b14972efb3c091964d0300fb1
Status: Downloaded newer image for nuvo/emq_exporter:v0.3.1
emq_exporter: error: unknown long flag '---emq.uri', try --help

Support V3 API for emqx

V3 changed some of the metrics API paths.

We currently have the plumbing to support this, needs implementation and validation.

Failed to get metrics from http://127.0.0.1:8080

I got error:
[root@localhost emq_exporter-0.2.2-linux]# ./emq_exporter --emq.uri="http://127.0.0.1:8080" --emq.node="[email protected]" --emq.api-version="v3" INFO[0000] Starting emq_exporter source="emq_exporter.go:274"
INFO[0000] Version v0.2.2 (git-5200959) source="emq_exporter.go:275"
INFO[0000] Listening on :9505 source="emq_exporter.go:284"
WARN[0005] Failed to get metrics from http://127.0.0.1:8080/api/v3/nodes/[email protected]/metrics/ source="emq_exporter.go:98"
WARN[0007] Failed to get metrics from http://127.0.0.1:8080/api/v3/nodes/[email protected]/metrics/ source="emq_exporter.go:98"
WARN[0009] Failed to get metrics from http://127.0.0.1:8080/api/v3/nodes/[email protected] source="emq_exporter.go:98"

Type prefix

I found that emq-exporter's own data type has no prefix. It is recommended to add a uniform type prefix to prevent confusion. Uniform prefixes can also be retrieved in the Grafana Dashboard.

emq_nodes_stats_topics_max 6
# HELP emq_up Was the last scrape of EMQ successful
# TYPE emq_up gauge
emq_up 1
# HELP go_gc_duration_seconds A summary of the GC invocation durations.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 0.000201694
go_gc_duration_seconds{quantile="0.25"} 0.000232821
go_gc_duration_seconds{quantile="0.5"} 0.00026052
go_gc_duration_seconds{quantile="0.75"} 0.000269629

multiple nodes support

Is there an idea to support multiple nodes? The current version only supports a single node, but the emqx official v3 version of the api can get the node list.

Authorization issue

I had to add this exporter not as a side-car, but as a separate deployment(unfortunately this was a requirement).

We've deployed EMQX as a "EMQX Kubernetes Operator"

My deployment configuration:

image: nuvo/emq_exporter:v0.5.1
  - args:
     - -emq.uri=http://emqx-0.emqx-svc-headless.core.svc.cluster.local:8081
     - [email protected]
     - -emq.api-version=v4
  • credentials are injected as env vars through the secret, that is automatically created by kubernetes operator

ISSUE: The exporter container log says:

{"level":"warn","time":1670324415,"caller":"/home/travis/gopath/src/github.com/nuvo/emq_exporter/emq_exporter.go:76","message":"Received status code not ok http://emqx-0.emqx-svc-headless.core.svc.cluster.local:8081/api/v4/nodes/[email protected]/metrics/, got 401"}

emq exporter api v4

Hi,

I am testing emq exporter (prometheus) for monitoring. my emq has api version 4. this exporter doesnt support v4. is there any work around ?

topic name

I recommend adding the topic name to the metrics. Only the number of topics is too small to get the information. You can use the topic name as the label to classify the data.

add prometheus label.

I recommend using the label function of prometheus for similar data aggregation. Label is very useful for query and data calculations. The current data items are independent, and configuring the dashboard is not convenient.

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.