项目作者: redclawtech

项目描述 :
VerneMQ plugin to send broker metrics to Amazon CloudWatch.
高级语言: Erlang
项目地址: git://github.com/redclawtech/vmq_cloudwatch_metrics.git
创建时间: 2018-05-28T22:43:39Z
项目社区:https://github.com/redclawtech/vmq_cloudwatch_metrics

开源协议:Apache License 2.0

下载


VerneMQ CloudWatch Metrics plugin

This is a VerneMQ plugin that will send broker metrics to Amazon CloudWatch.

Prerequisites

  • A recent version of Erlang/OTP(Not tested on versions previous to 19).
  • VerneMQ version 1.7.0 or superior.

How to compile this plugin

This project uses Rebar3 as a build tool and can be compiled running:

  1. rebar3 compile

How to enable the plugin on VerneMQ

Manually enable

  1. vmq-admin plugin enable --name=vmq_cloudwatch_metrics --path=<PathToYourPlugin>/_build/default/lib/vmq_cloudwatch_metrics

Permanently enable (On VerneMQ start)

Add the following to the vernemq.conf file.

  1. plugins.vmq_cloudwatch_metrics = on
  2. plugins.vmq_cloudwatch_metrics.path = <PathToYourPlugin>/_build/default/lib/vmq_cloudwatch_metrics

Configuration

The following settings are available for this plugin:

Parameters can be defined in the vernemq.conf file.

  1. vmq_cloudwatch_metrics.cloudwatch_enabled = on
  2. vmq_cloudwatch_metrics.interval = 60000
  3. vmq_cloudwatch_metrics.namespace = "VerneMQ"
  4. vmq_cloudwatch_metrics.aws_access_key_id = "MYACCESSKEY"
  5. vmq_cloudwatch_metrics.aws_secret_access_key = "MYSECRETACCESSKEY"
  6. vmq_cloudwatch_metrics.aws_region = "eu-west-1"

Tip: Configuration parameters can also be changed at runtime using the vmq-admin script.

TODO

  • Add tests.
  • Add CI using Travis.