Skip to content

Commit

Permalink
GitBook: [master] 75 pages modified
Browse files Browse the repository at this point in the history
  • Loading branch information
dergraf authored and gitbook-bot committed Oct 16, 2018
1 parent c8de790 commit 7c332e2
Show file tree
Hide file tree
Showing 41 changed files with 81 additions and 83 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Welcome

Welcome to the VerneMQ documentation! This is a reference guide for most of the available features and options of VerneMQ. The [Getting Started guide](/docs/start.html) might be a good entry point.
Welcome to the VerneMQ documentation! This is a reference guide for most of the available features and options of VerneMQ. The [Getting Started guide](getting-started.md) might be a good entry point.



Expand Down
78 changes: 40 additions & 38 deletions SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,66 @@

* [Welcome](README.md)
* [Getting Started](getting-started.md)
* [Downloads](https://vernemq.com/downloads)
* [VerneMQ / MQTT Introduction](https://vernemq.com/intro)

## Installing VerneMQ

* [Installing on Debian and Ubuntu](installing-vernemq-1/installing-on-debian-and-ubuntu.md)
* [Installing on CentOS and RHEL](installing-vernemq-1/installing-on-centos-and-rhel.md)
* [Running VerneMQ using Docker](installing-vernemq-1/running-vernemq-using-docker.md)
* [Installing on Debian and Ubuntu](installation/debian_and_ubuntu.md)
* [Installing on CentOS and RHEL](installation/centos_and_redhat.md)
* [Running VerneMQ using Docker](installation/docker.md)

## Configuring VerneMQ

* [Introduction](configuring-vernemq/introduction.md)
* [Auth using files](configuring-vernemq/auth-using-files.md)
* [Auth using a database](configuring-vernemq/auth-using-a-database.md)
* [MQTT Options](configuring-vernemq/mqtt-options.md)
* [MQTT Listeners](configuring-vernemq/mqtt-listeners.md)
* [HTTP Listeners](configuring-vernemq/http-listeners.md)
* [Non-standard MQTT options](configuring-vernemq/non-standard-mqtt-options.md)
* [Websockets](configuring-vernemq/websockets.md)
* [Logging](configuring-vernemq/logging.md)
* [Consumer session balancing](configuring-vernemq/consumer-session-balancing.md)
* [Plugins](configuring-vernemq/plugins.md)
* [Shared subscriptions](configuring-vernemq/shared-subscriptions.md)
* [Advanced Options](configuring-vernemq/advanced-options.md)
* [Storage](configuring-vernemq/storage.md)
* [MQTT Bridge](configuring-vernemq/mqtt-bridge.md)
* [Introduction](configuration/introduction.md)
* [Auth using files](configuration/file-auth.md)
* [Auth using a database](configuration/db-auth.md)
* [MQTT Options](configuration/options.md)
* [MQTT Listeners](configuration/listeners.md)
* [HTTP Listeners](configuration/http-listeners.md)
* [Non-standard MQTT options](configuration/nonstandard.md)
* [Websockets](configuration/websockets.md)
* [Logging](configuration/logging.md)
* [Consumer session balancing](configuration/balancing.md)
* [Plugins](configuration/plugins.md)
* [Shared subscriptions](configuration/shared_subscriptions.md)
* [Advanced Options](configuration/advanced_options.md)
* [Storage](configuration/storage.md)
* [MQTT Bridge](configuration/bridge.md)

## VerneMQ Clustering

* [Setting up a cluster](vernemq-clustering/setting-up-a-cluster.md)
* [Inter-node Communication](vernemq-clustering/inter-node-communication.md)
* [Dealing with Netsplits](vernemq-clustering/dealing-with-netsplits.md)
* [Introduction](clustering/introduction.md)
* [Inter-node Communication](clustering/communication.md)
* [Dealing with Netsplits](clustering/netsplits.md)

## Live Administration

* [Introduction](administration/introduction.md)
* [Live reconfiguration](administration/config_values.md)
* [Managing Listeners](administration/listeners.md)
* [HTTP API](administration/http-administration.md)

## Monitoring

* [Available Metrics](monitoring/available-metrics.md)
* [$SYSTree](monitoring/usdsystree.md)
* [Introduction](monitoring/introduction.md)
* [$SYSTree](monitoring/systree.md)
* [Graphite](monitoring/graphite.md)
* [Prometheus](monitoring/prometheus.md)

## Plugin Development

* [Introduction](plugin-development/guide.md)
* [Session lifecycle](plugin-development/session-lifecycle.md)
* [Subscribe Flow](plugin-development/subscribe-flow.md)
* [Publish Flow](plugin-development/publish-flow.md)
* [Erlang Boilerplate](plugin-development/erlang-boilerplate.md)
* [Lua Scripting Support](plugin-development/lua-scripting-support.md)
* [Webhooks](plugin-development/webhooks.md)

## Live Administration

* [vmq-admin](live-administration/vmq-admin.md)
* [Reconfiguration](live-administration/reconfiguration.md)
* [Managing Listeners](live-administration/managing-listeners.md)
* [HTTP API](live-administration/http-api.md)
* [Introduction](plugindevelopment/introduction.md)
* [Session lifecycle](plugindevelopment/sessionlifecycle.md)
* [Subscribe Flow](plugindevelopment/subscribeflow.md)
* [Publish Flow](plugindevelopment/publishflow.md)
* [Erlang Boilerplate](plugindevelopment/boilerplate.md)
* [Lua Scripting Support](plugindevelopment/luaplugins.md)
* [Webhooks](plugindevelopment/webhookplugins.md)

## Misc

* [Loadtesting VerneMQ](misc/untitled.md)
* [Loadtesting VerneMQ](misc/loadtesting.md)
* [Not a tuning guide](misc/not-a-tuning-guide.md)
* [Change Open File Limits](misc/change-open-file-limits.md)

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description: Managing VerneMQ live config values.
---

# Reconfiguration
# Live reconfiguration

You can dynamically re-configure most of VerneMQ's settings on a running node by using the `vmq-admin set` command.

Expand Down Expand Up @@ -72,6 +72,5 @@ vmq-admin show max_client_id_size retry_interval --all
|VerneMQ50@192.168.1.50| 33 | 20 |
|VerneMQ20@192.168.1.20| 28 | 20 |
+----------------------+------------------+--------------+
`
```

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description: >-
This API is still in BETA and some things may change if required.
{% endhint %}

The VerneMQ HTTP API is enabled by default and installs an HTTP handler on `http://localhost:8888/api/v1`. To read more about configuring the HTTP listener, see [HTTP Listener Configuration](../configuring-vernemq/http-listeners.md). You can configure a HTTP listener, or a HTTPS listener to serve the HTTP API v1.
The VerneMQ HTTP API is enabled by default and installs an HTTP handler on `http://localhost:8888/api/v1`. To read more about configuring the HTTP listener, see [HTTP Listener Configuration](../configuration/http-listeners.md). You can configure a HTTP listener, or a HTTPS listener to serve the HTTP API v1.

## Managing API keys

Expand Down Expand Up @@ -48,7 +48,7 @@ vmq-admin api-key delete key=JxctXkZ1OTVnlwvguSCE9KtujacMkOLF

## API usage

The VerneMQ HTTP API is a wrapper over the [`vmq-admin`](vmq-admin.md) CLI tool, and anything that can be done using `vmq-admin` can be done using the HTTP API. Note that the HTTP API is therefore subject to any changes made to the `vmq-admin` tools and their flags & options structure. All requests are performed doing a HTTP GET and if no errors occurred an HTTP 200 OK code is returned with a possible non-empty JSON payload.
The VerneMQ HTTP API is a wrapper over the [`vmq-admin`](introduction.md) CLI tool, and anything that can be done using `vmq-admin` can be done using the HTTP API. Note that the HTTP API is therefore subject to any changes made to the `vmq-admin` tools and their flags & options structure. All requests are performed doing a HTTP GET and if no errors occurred an HTTP 200 OK code is returned with a possible non-empty JSON payload.

The API is using basic auth where the API key is passed as the username. An example using `curl` would look like this:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
description: The vmq-admin command line tool
---

# vmq-admin
# Introduction

On every VerneMQ node you'll find the `vmq-admin` command line tool in the release's bin directory. It has different sub-commands that let you check for status, start and stop listeners, re-configure values and a couple of other administrative tasks.

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
description: Everything you must know to properly configure and deploy a VerneMQ Cluster
---

# Setting up a cluster
# Introduction

VerneMQ can be easily clustered. Clients can then connect to any cluster node and receive messages from any other cluster nodes. However, the MQTT specification gives certain guarantees that are hard to fulfill in a distributed environment, especially when network partitions occur. We'll discuss the way VerneMQ deals with network partitions in its [own subsection](netsplits.html)
VerneMQ can be easily clustered. Clients can then connect to any cluster node and receive messages from any other cluster nodes. However, the MQTT specification gives certain guarantees that are hard to fulfill in a distributed environment, especially when network partitions occur. We'll discuss the way VerneMQ deals with network partitions in its [own subsection](netsplits.md)

{% hint style="danger" %}
**Set the Cookie!** All cluster nodes need to be configured to use the same Cookie value. It can be set in the `vernemq.conf` with the `distributed_cookie` setting. Set the Cookie to a private value for security reasons!
{% endhint %}

{% hint style="info" %}
For a successful VerneMQ cluster setup, it is important to choose proper VerneMQ node names. In `vernemq.conf` change the `nodename = VerneMQ@127.0.0.1` to something appropriate. Make sure that the node names are unique within the cluster. Read the section on [VerneMQ Inter-node Communication](communication.html) if firewalls are involved.
For a successful VerneMQ cluster setup, it is important to choose proper VerneMQ node names. In `vernemq.conf` change the `nodename = VerneMQ@127.0.0.1` to something appropriate. Make sure that the node names are unique within the cluster. Read the section on [VerneMQ Inter-node Communication](communication.md) if firewalls are involved.
{% endhint %}

### Joining a Cluster
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ in VerneMQ the bridge is distributed with VerneMQ as a plugin and is not enabled
plugins.vmq_bridge = on
```

See [Managing plugins](./plugins.html) for more information on working with plugins.
See [Managing plugins](plugins.md) for more information on working with plugins.

### Sample MQTT Bridge

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ plugins.vmq_diversity = on
```

{% hint style="info" %}
The `vmq_diversity` plugin makes it possible to extend VerneMQ using Lua. The documentation can be found [here](/docs/plugindevelopment/luaplugins.html).
The `vmq_diversity` plugin makes it possible to extend VerneMQ using Lua. The documentation can be found [here](../plugindevelopment/luaplugins.md).
{% endhint %}

When using database based authentication/authorization the enabled-by-default file based authentication and authorization are most likely not needed and should be disabled:
Expand Down
File renamed without changes.
14 changes: 14 additions & 0 deletions configuration/http-listeners.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
description: How to setup and configure the HTTP listener.
---

# HTTP Listeners

The VerneMQ HTTP listener is used to serve various VerneMQ subsystems such as [Prometheus metrics](../monitoring/prometheus.md) and the [management API](../administration/http-administration.md) over HTTP. It is enabled by default and runs on port `8888`. To disable the HTTP listener or change the port, adapt the configuration in `vernemq.conf`:

```text
listener.http.default = 127.0.0.1:8888
```



File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 0 additions & 12 deletions configuring-vernemq/http-listeners.md

This file was deleted.

9 changes: 4 additions & 5 deletions getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ VerneMQ is a high-performance, distributed MQTT message broker. It scales horizo

Choose your OS and follow the instructions:

* [CentOS/RHEL 7](centos_and_redhat.html)
* [Debian Stretch & Jessie](debian_and_ubuntu.html)
* [Ubuntu Bionic, Xenial & Trusty](debian_and_ubuntu.html)
* [CentOS/RHEL](installation/centos_and_redhat.md)
* [Debian/Ubuntu](installation/debian_and_ubuntu.md)

It is also possible to run VerneMQ using our Docker image:

* [Docker](docker.html)
* [Docker](installation/docker.md)

## Starting VerneMQ

Expand Down Expand Up @@ -55,7 +54,7 @@ vernemq ping
The command will respond with `pong` if the broker is running or `Node <NodeName> not responding to pings` in case it’s not.

{% hint style="warning" %}
As you may have noticed, VerneMQ will warn you at startup when your system’s open files limit \(`ulimit -n`\) is too low. You’re advised to increase the OS default open files limit when running VerneMQ. Read more about why and how in the [Open Files Limit documentation](https://github.com/vernemq/vmq-docs/tree/8e76a28412d2512e71653e1356f7165aebe687f7/docs/misc/change-open-file-limits.html).
As you may have noticed, VerneMQ will warn you at startup when your system’s open files limit \(`ulimit -n`\) is too low. You’re advised to increase the OS default open files limit when running VerneMQ. Read more about why and how in the [Open Files Limit documentation](misc/change-open-file-limits.md).
{% endhint %}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ If VerneMQ has been installed successfully `vernemq` is returned.

### Next Steps

Now that you've installed VerneMQ, check out [How to configure VerneMQ](/docs/configuration/).
Now that you've installed VerneMQ, check out [How to configure VerneMQ](../configuration/introduction.md).

Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ vernemq: /usr/sbin/vernemq /usr/lib/vernemq /etc/vernemq /usr/share/vernemq

### Next Steps

Now that you've installed VerneMQ, check out [How to configure VerneMQ](/docs/configuration/).
Now that you've installed VerneMQ, check out [How to configure VerneMQ](../configuration/introduction.md).

Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,3 @@ docker exec vernemq1 vmq-admin cluster show
+--------------------+-------+
```

All `vmq-admin` commands are available. See [https://vernemq.com/docs/administration/](https://vernemq.com/docs/administration/) for more information.

File renamed without changes.
2 changes: 1 addition & 1 deletion misc/not-a-tuning-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### General relation to OS configuration values

You need to know about and configure a couple of Operating System and Erlang VM configs to operate VerneMQ efficiently. First, make sure you have set appropriate OS file limits according to our [guide here](change-open-file-limits.md). Second, when you run into performance problems, don't forget to check the [settings in the `vernemq.conf` file](../configuring-vernemq/introduction.md). \(Can't open more than 10k connections? Well, is the listener configured to open more than 10k?\)
You need to know about and configure a couple of Operating System and Erlang VM configs to operate VerneMQ efficiently. First, make sure you have set appropriate OS file limits according to our [guide here](change-open-file-limits.md). Second, when you run into performance problems, don't forget to check the [settings in the `vernemq.conf` file](../configuration/introduction.md). \(Can't open more than 10k connections? Well, is the listener configured to open more than 10k?\)

### TCP buffer sizes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
description: Description and Configuration of the built-in Monitoring mechanism
---

# Available Metrics
# Introduction

VerneMQ can be monitored in several ways. We implemented native support for [Graphite](https://graphiteapp.org/), [MQTT $SYS tree](usdsystree.md), and [Prometheus](http://prometheus.io).
VerneMQ can be monitored in several ways. We implemented native support for [Graphite](https://graphiteapp.org/), [MQTT $SYS tree](systree.md), and [Prometheus](http://prometheus.io).

The metrics are also available via the command line tool:

Expand Down
2 changes: 1 addition & 1 deletion monitoring/prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Description and Configuration of the Prometheus exporter

# Prometheus

The Prometheus exporter is enabled by default and installs an HTTP handler on `http://localhost:8888/metrics`. To read more about configuring the HTTP listener, see [HTTP Listener Configuration](../configuring-vernemq/http-listeners.md).
The Prometheus exporter is enabled by default and installs an HTTP handler on `http://localhost:8888/metrics`. To read more about configuring the HTTP listener, see [HTTP Listener Configuration](../configuration/http-listeners.md).

### Example Scrape Config

Expand Down
8 changes: 5 additions & 3 deletions monitoring/usdsystree.md → monitoring/systree.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ description: Description and Configuration of the $SYSTree Monitoring Feature

# $SYSTree

The systree functionality is enabled by default and reports the broker metrics at a fixed interval defined in the `vernemq.conf`. The metrics defined [here](index.html) are transformed to MQTT topics e.g. `mqtt_publish_received` is transformed to `$SYS/<nodename>/mqtt/publish/received`. `<nodename>` is your node's name, as configured in the `vernemq.conf`. To find it, you can grep the file for it: `grep nodename vernemq.conf`
The systree functionality is enabled by default and reports the broker metrics at a fixed interval defined in the `vernemq.conf`. The metrics defined [here](introduction.md) are transformed to MQTT topics e.g. `mqtt_publish_received` is transformed to `$SYS/<nodename>/mqtt/publish/received`. `<nodename>` is your node's name, as configured in the `vernemq.conf`. To find it, you can grep the file for it: `grep nodename vernemq.conf`

The complete list of metrics can be found [here.](index.html)
The complete list of metrics can be found [here.](introduction.md)

```text
systree_interval = 20000
Expand All @@ -20,9 +20,11 @@ If the systree feature is not required it can be disabled in `vernemq.conf`
systree_enabled = off
```

=&gt; **Tip:** The feature and the interval can be changed at runtime using the `vmq-admin` script.
{% hint style="success" %}
The feature and the interval can be changed at runtime using the `vmq-admin` script.
Usage: vmq-admin set = ... \[\[--node \| -n\] \| --all\]
Example: `vmq-admin set systree_interval=60000 -n VerneMQ@127.0.0.1`
{% endhint %}

Examples:

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ If the `vmq_diversity` plugin is enabled the folder `./share/lua` folder is scan

## Implementing a VerneMQ plugin

A VerneMQ plugin typically consists of one or more implemented VerneMQ hooks. We tried to keep the differences between the traditional Erlang based and Lua based plugins as small as possible. Please check out the [Plugin Development Guide](guide.md) for more information about the different flows and a description of the different hooks.
A VerneMQ plugin typically consists of one or more implemented VerneMQ hooks. We tried to keep the differences between the traditional Erlang based and Lua based plugins as small as possible. Please check out the [Plugin Development Guide](introduction.md) for more information about the different flows and a description of the different hooks.

### Your first Lua plugin

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ It is also possible to override various client specific settings by returning an
}
```

Note, the `retry_interval` is in milli-seconds. It is possible to override many more settings, see the [Session Lifecycle](session-lifecycle.md) for more information.
Note, the `retry_interval` is in milli-seconds. It is possible to override many more settings, see the [Session Lifecycle](sessionlifecycle.md) for more information.

Other possible return values:

Expand Down

0 comments on commit 7c332e2

Please sign in to comment.