All Projects → nuvo → emq_exporter

nuvo / emq_exporter

Licence: Apache-2.0 License
Simple server that scrapes EMQ metrics and exporters them via HTTP for Prometheus consumption

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to emq exporter

jail exporter
A Prometheus exporter for FreeBSD jail metrics
Stars: ✭ 21 (-32.26%)
Mutual labels:  metrics, exporter, prometheus
Raspberrypi exporter
Prometheus exporter for Raspberry Pi metrics
Stars: ✭ 18 (-41.94%)
Mutual labels:  metrics, exporter, prometheus
Atlas exporter
Metric exporter for RIPE Atlas measurement results
Stars: ✭ 48 (+54.84%)
Mutual labels:  metrics, exporter, prometheus
selectel-exporter
No description or website provided.
Stars: ✭ 25 (-19.35%)
Mutual labels:  metrics, exporter, prometheus
Github Exporter
Prometheus exporter for github metrics
Stars: ✭ 231 (+645.16%)
Mutual labels:  metrics, exporter, prometheus
github exporter
Prometheus exporter for GitHub
Stars: ✭ 21 (-32.26%)
Mutual labels:  metrics, prometheus
gateway
A proxy to buffer and forward metrics, events, and traces.
Stars: ✭ 94 (+203.23%)
Mutual labels:  metrics, prometheus
java-metrics
No description or website provided.
Stars: ✭ 31 (+0%)
Mutual labels:  metrics, prometheus
docker-pulls
A simple compose script to use in conjunction with the prometheus stack to monitor Docker pulls.
Stars: ✭ 19 (-38.71%)
Mutual labels:  exporter, prometheus
prometheus-bigquery-exporter
An exporter for converting BigQuery results into Prometheus metrics
Stars: ✭ 27 (-12.9%)
Mutual labels:  exporter, prometheus
chia-monitor
🍃 A comprehensive monitoring and alerting solution for the status of your Chia farmer and harvesters.
Stars: ✭ 131 (+322.58%)
Mutual labels:  metrics, prometheus
prometheus-httpd
Expose Prometheus metrics using inets httpd.
Stars: ✭ 21 (-32.26%)
Mutual labels:  metrics, prometheus
opentsdb exporter
Prometheus exporter for OpenTSDB
Stars: ✭ 20 (-35.48%)
Mutual labels:  exporter, prometheus
octane-exporter
Export Laravel Octane metrics using this Prometheus exporter.
Stars: ✭ 14 (-54.84%)
Mutual labels:  metrics, prometheus
airflow-prometheus-exporter
Export Airflow metrics (from mysql) in prometheus format
Stars: ✭ 25 (-19.35%)
Mutual labels:  exporter, prometheus
gluster exporter
Gluster Exporter for Prometheus
Stars: ✭ 70 (+125.81%)
Mutual labels:  exporter, prometheus
emqx-prometheus
EMQ X Statsd
Stars: ✭ 18 (-41.94%)
Mutual labels:  prometheus, emq
flask prometheus metrics
Prometheus Metrics for Flask Web App
Stars: ✭ 17 (-45.16%)
Mutual labels:  metrics, prometheus
s3 exporter
Exports Prometheus metrics about S3 buckets and objects
Stars: ✭ 65 (+109.68%)
Mutual labels:  metrics, prometheus
Prometheus rabbitmq exporter
Prometheus.io exporter as a RabbitMQ Managment Plugin plugin
Stars: ✭ 248 (+700%)
Mutual labels:  metrics, prometheus

Release Travis branch Docker Pulls Go Report Card license

EMQ exporter for Prometheus

A simple server that scrapes EMQ metrics and exports them via HTTP for Prometheus consumption.

Getting Started

To run it:

./emq_exporter [flags]

Help on flags:

./emq_exporter --help

Usage

EMQ URI

Specify EMQ's node uri and api port using the --emq.uri flag. For example,

./emq_exporter --emq.uri "http://localhost:8080"

Or to scrape a remote host:

./emq_exporter --emq.uri "https://emq.example.com:8080"

Passing Credentials

EMQ requires that calls made to the API endpoints be authenticated. The exporter supports two ways to pass credentials:

  1. Setting environment variables:
  • EMQ_USERNAME for username
  • EMQ_PASSWORD for the password

No need to pass anything to emq_exporter when using these vars, they will be searched for automatically on startup.

  1. Using a file

The file should be json formatted and contain the following fields:

{
  "username": "admin",
  "password": "public"
}

When staring emq_exporter, point it to the credentials file using --emq.creds-file flag:

./emq_exporter --emq.uri http://localhost:8080 --emq.creds-file /etc/emq_exporter/auth.json

The default path for credentials file is $(CWD)/auth.json. Note that env vars take precedence over using a file.

API Version

EMQ add a v3 api version in EMQX. To specify the api version, use the emq.api-version flag:

./emq_exporter --emq.uri http://localhost:8080 --emq.api-version v3

The emq_exporter supports v2, v3 and v4 API versions seamlessly (mutually exclusive, pick either on start up), default is v3. However, from v4 the default port is 8081. Please note the v2 api is deprecated and will be removed in future versions

Authentication

The authentication method changed a bit in version v3 of emqx. If you're pulling the metrics through the dashboard port (default 18083), you can use regular username and password. However, if you're using the API port (default 8080), you'll need to set up application credentials:

  1. From the emq dashboard side bar -> applications
  2. Select New App from the top
  3. Fill in the popup window with the relevant details and confirm
  4. View the app details and use AppID as username and AppSecret as password (as creds-file entries or env vars, see above)

The default port emq_exporter uses is 18083

See the docs for v2 REST API here and for v3 here

Troubleshooting

If things aren't working as expected, try to start the exporter with --log.level debug flag. This will log additional details to the console and might help track down the problem. Fell free to raise an issue should you require additional help.

Docker

To run EMQ exporter as a Docker container, run:

docker run \
  -d \
  -p 9540:9540 \
  --name emq_exporter \
  -v /path/to/auth.json:/etc/emq/auth.json \
  nuvo/emq_exporter:v0.4.1 \
  --emq.uri "http://<emq-ip>:8080" \
  --emq.node "emqx@<emq-ip>" \
  --emq.api-version "v3" \
  --emq.creds-file "/etc/emq/auth.json"

Alternatively, One can also supply the credentials using env vars, replace the volume mount (-v flag) with -e EMQ_USERNAME=<my-username> -e EMQ_PASSWORD=<super-secret>

Kubernetes

EMQ exporter was designed to run as a sidecar in the same pod as EMQ itself. See the examples folder for a kubernetes manifest that can serve as reference for implementation.

Contributing

We welcome contributions!

Please see CONTRIBUTING for guidelines on how to get involved.

License

Apache License 2.0, see LICENSE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].