Skip to main content

VerneMQ

Plugin: go.d.plugin Module: vernemq

Overview

This collector monitors VerneMQ instances.

This collector is supported on all platforms.

This collector supports collecting metrics from multiple instances of this integration, including remote instances.

Default Behavior

Auto-Detection

This integration doesn't support auto-detection.

Limits

The default configuration for this integration does not impose any limits on data collection.

Performance Impact

The default configuration for this integration is not expected to impose a significant performance impact on the system.

Metrics

Metrics grouped by scope.

The scope defines the instance that the metric belongs to. An instance is uniquely identified by a set of labels.

Per node

These metrics refer to the VerneMQ node.

Labels:

LabelDescription
nodeThe value of this label is identical to the value of the "node" label exposed by VerneMQ.

Metrics:

MetricDimensionsUnit
vernemq.node_socketopensockets
vernemq.node_socket_operationsopen, closesockets/s
vernemq.node_client_keepalive_expiredclosedsockets/s
vernemq.node_socket_close_timeoutclosedsockets/s
vernemq.node_socket_errorserrorserrors/s
vernemq.node_queue_processesqueue_processesqueue processes
vernemq.node_queue_processes_operationssetup, teardownevents/s
vernemq.node_queue_process_init_from_storagequeue_processesqueue processes/s
vernemq.node_queue_messagesreceived, sentmessages/s
vernemq.node_queued_messagesqueuedmessages
vernemq.node_queue_undelivered_messagesdropped, expired, unhandledmessages/s
vernemq.node_router_subscriptionssubscriptionssubscriptions
vernemq.node_router_matched_subscriptionslocal, remotesubscriptions/s
vernemq.node_router_memoryusedbytes
vernemq.node_average_scheduler_utilizationutilizationpercentage
vernemq.node_system_processesprocessesprocesses
vernemq.node_system_reductionsreductionsops/s
vernemq.node_system_context_switchescontext_switchesops/s
vernemq.node_system_ioreceived, sentbytes/s
vernemq.node_system_run_queuereadyprocesses
vernemq.node_system_gc_countgcops/s
vernemq.node_system_gc_words_reclaimedwords_reclaimedops/s
vernemq.node_system_allocated_memoryprocesses, systembytes
vernemq.node_trafficreceived, sentbytes/s
vernemq.node_retain_messagesmessagesmessages
vernemq.node_retain_memoryusedbytes
vernemq.node_cluster_trafficreceived, sentbytes/s
vernemq.node_cluster_droppeddroppedbytes/s
vernemq.node_netsplit_unresolvedunresolvednetsplits
vernemq.node_netsplitsresolved, detectednetsplits/s
vernemq.node_uptimetimeseconds

Per mqtt

These metrics are specific to the used MQTT protocol version.

Labels:

LabelDescription
nodeThe value of this label is identical to the value of the "node" label exposed by VerneMQ.
mqtt_versionMQTT version.

Metrics:

MetricDimensionsUnit
vernemq.node_mqtt_authreceived, sentpackets/s
vernemq.node_mqtt_auth_received_by_reason_codesuccess, continue_authentication, reauthenticatepackets/s
vernemq.node_mqtt_auth_sent_by_reason_codesuccess, continue_authentication, reauthenticatepackets/s
vernemq.node_mqtt_connectconnect, connackpackets/s
vernemq.node_mqtt_connack_sent_by_return_codesuccess, unsupported_protocol_version, client_identifier_not_valid, server_unavailable, bad_username_or_password, not_authorizedpackets/s
vernemq.node_mqtt_connack_sent_by_reason_codesuccess, unspecified_error, malformed_packet, protocol_error, impl_specific_error, unsupported_protocol_version, client_identifier_not_valid, bad_username_or_password, not_authorized, server_unavailable, server_busy, banned, bad_authentication_method, topic_name_invalid, packet_too_large, quota_exceeded, payload_format_invalid, retain_not_supported, qos_not_supported, use_another_server, server_moved, connection_rate_exceededpackets/s
vernemq.node_mqtt_disconnectreceived, sentpackets/s
vernemq.node_mqtt_disconnect_received_by_reason_codenormal_disconnect, disconnect_with_will_msg, unspecified_error, malformed_packet, protocol_error, impl_specific_error, topic_name_invalid, receive_max_exceeded, topic_alias_invalid, packet_too_large, message_rate_too_high, quota_exceeded, administrative_action, payload_format_invalidpackets/s
node_mqtt_disconnect_sent_by_reason_codenormal_disconnect, unspecified_error, malformed_packet, protocol_error, impl_specific_error, not_authorized, server_busy, server_shutting_down, keep_alive_timeout, session_taken_over, topic_filter_invalid, topic_name_invalid, receive_max_exceeded, topic_alias_invalid, packet_too_large, message_rate_too_high, quota_exceeded, administrative_action, payload_format_invalid, retain_not_supported, qos_not_supported, use_another_server, server_moved, shared_subs_not_supported, connection_rate_exceeded, max_connect_time, subscription_ids_not_supported, wildcard_subs_not_supportedpackets/s
vernemq.node_mqtt_subscribesubscribe, subackpackets/s
vernemq.node_mqtt_subscribe_errorsubscribeerrors/s
vernemq.node_mqtt_subscribe_auth_errorsubscribe_autherrors/s
vernemq.node_mqtt_unsubscribeunsubscribe, unsubackpackets/s
vernemq.node_mqtt_unsubscribe_errorunsubscribeerrors/s
vernemq.node_mqtt_publishreceived, sentpackets/s
vernemq.node_mqtt_publish_errorspublisherrors/s
vernemq.node_mqtt_publish_auth_errorspublish_autherrors/s
vernemq.node_mqtt_pubackreceived, sentpackets/s
vernemq.node_mqtt_puback_received_by_reason_codesuccess, no_matching_subscribers, unspecified_error, impl_specific_error, not_authorized, topic_name_invalid, packet_id_in_use, quota_exceeded, payload_format_invalidpackets/s
vernemq.node_mqtt_puback_sent_by_reason_codesuccess, no_matching_subscribers, unspecified_error, impl_specific_error, not_authorized, topic_name_invalid, packet_id_in_use, quota_exceeded, payload_format_invalidpackets/s
vernemq.node_mqtt_puback_invalid_errorunexpectedmessages/s
vernemq.node_mqtt_pubrecreceived, sentpackets/s
vernemq.node_mqtt_pubrec_received_by_reason_codesuccess, no_matching_subscribers, unspecified_error, impl_specific_error, not_authorized, topic_name_invalid, packet_id_in_use, quota_exceeded, payload_format_invalidpackets/s
vernemq.node_mqtt_pubrec_sent_by_reason_codesuccess, no_matching_subscribers, unspecified_error, impl_specific_error, not_authorized, topic_name_invalid, packet_id_in_use, quota_exceeded, payload_format_invalidpackets/s
vernemq.node_mqtt_pubrec_invalid_errorunexpectedmessages/s
vernemq.node_mqtt_pubrelreceived, sentpackets/s
vernemq.node_mqtt_pubrel_received_by_reason_codesuccess, packet_id_not_foundpackets/s
vernemq.node_mqtt_pubrel_sent_by_reason_codesuccess, packet_id_not_foundpackets/s
vernemq.node_mqtt_pubcompreceived, sentpackets/s
vernemq.node_mqtt_pubcomp_received_by_reason_codesuccess, packet_id_not_foundpackets/s
vernemq.node_mqtt_pubcomp_sent_by_reason_codsuccess, packet_id_not_foundpackets/s
vernemq.node_mqtt_pubcomp_invalid_errorunexpectedmessages/s
vernemq.node_mqtt_pingpingreq, pingresppackets/s

Alerts

The following alerts are available:

Alert nameOn metricDescription
vernemq_socket_errors vernemq.node_socket_errorsNode ${label:node} socket errors in the last minute
vernemq_queue_message_drop vernemq.node_queue_undelivered_messagesNode ${label:node} dropped messages due to full queues in the last minute
vernemq_queue_message_expired vernemq.node_queue_undelivered_messagesNode ${label:node} expired before delivery messages in the last minute
vernemq_queue_message_unhandled vernemq.node_queue_undelivered_messagesNode ${label:node} unhandled messages in the last minute
vernemq_average_scheduler_utilization vernemq.node_average_scheduler_utilizationNode ${label:node} scheduler utilization over the last 10 minutes
vernemq_cluster_dropped vernemq.node_cluster_droppedNode ${label:node} traffic dropped during communication with the cluster nodes in the last minute
vernemq_netsplits vernemq.node_netsplitsNode ${label:node} detected netsplits (split brain) in the last minute
vernemq_mqtt_connack_sent_reason_unsuccessful vernemq.node_mqtt_connack_sent_by_reason_codeNode ${label:node} unsuccessful sent v5 CONNACK packets in the last minute
vernemq_mqtt_disconnect_received_reason_not_normal vernemq.node_mqtt_disconnect_received_by_reason_codeNode ${label:node} received not normal v5 DISCONNECT packets in the last minute
vernemq_mqtt_disconnect_sent_reason_not_normal vernemq.node_mqtt_disconnect_sent_by_reason_codeNode ${label:node} sent not normal v5 DISCONNECT packets in the last minute
vernemq_mqtt_subscribe_error vernemq.node_mqtt_subscribe_errorNode ${label:node} mqtt v${label:mqtt_version} failed SUBSCRIBE operations in the last minute
vernemq_mqtt_subscribe_auth_error vernemq.node_mqtt_subscribe_auth_errorNode ${label:node} mqtt v${label:mqtt_version} unauthorized SUBSCRIBE attempts in the last minute
vernemq_mqtt_unsubscribe_error vernemq.node_mqtt_unsubscribe_errorNode ${label:node} mqtt v${label:mqtt_version} failed UNSUBSCRIBE operations in the last minute
vernemq_mqtt_publish_errors vernemq.node_mqtt_publish_errorsNode ${label:node} mqtt v${label:mqtt_version} failed PUBLISH operations in the last minute
vernemq_mqtt_publish_auth_errors vernemq.node_mqtt_publish_auth_errorsNode ${label:node} mqtt v${label:mqtt_version} unauthorized PUBLISH attempts in the last minute
vernemq_mqtt_puback_received_reason_unsuccessful vernemq.node_mqtt_puback_received_by_reason_codeNode ${label:node} mqtt v5 received unsuccessful PUBACK packets in the last minute
vernemq_mqtt_puback_sent_reason_unsuccessful vernemq.node_mqtt_puback_sent_by_reason_codeNode ${label:node} mqtt v5 unsuccessful sent PUBACK packets in the last minute
vernemq_mqtt_puback_unexpected vernemq.node_mqtt_puback_invalid_errorNode ${label:node} mqtt v${label:mqtt_version} received unexpected PUBACK messages in the last minute
vernemq_mqtt_pubrec_received_reason_unsuccessful vernemq.node_mqtt_pubrec_received_by_reason_codeNode ${label:node} mqtt v5 received unsuccessful PUBREC packets in the last minute
vernemq_mqtt_pubrec_sent_reason_unsuccessful vernemq.node_mqtt_pubrec_sent_by_reason_codeNode ${label:node} mqtt v5 unsuccessful sent PUBREC packets in the last minute
vernemq_mqtt_pubrec_invalid_error vernemq.node_mqtt_pubrec_invalid_errorNode ${label:node} mqtt v${label:mqtt_version} received invalid PUBREC packets in the last minute
vernemq_mqtt_pubrel_received_reason_unsuccessful vernemq.node_mqtt_pubrel_received_by_reason_codeNode ${label:node} mqtt v5 received unsuccessful PUBREL packets in the last minute
vernemq_mqtt_pubrel_sent_reason_unsuccessful vernemq.node_mqtt_pubrel_sent_by_reason_codeNode ${label:node} mqtt v5 unsuccessful sent PUBREL packets in the last minute
vernemq_mqtt_pubcomp_received_reason_unsuccessful vernemq.node_mqtt_pubcomp_received_by_reason_codeNode ${label:node} mqtt v5 received unsuccessful PUBCOMP packets in the last minute
vernemq_mqtt_pubcomp_sent_reason_unsuccessful vernemq.node_mqtt_pubcomp_sent_by_reason_codeNode ${label:node} mqtt v5 unsuccessful sent PUBCOMP packets in the last minute
vernemq_mqtt_pubcomp_unexpected vernemq.node_mqtt_pubcomp_invalid_errorNode ${label:node} mqtt v${label:mqtt_version} received unexpected PUBCOMP packets in the last minute

Setup

Prerequisites

No action required.

Configuration

File

The configuration file name for this integration is go.d/vernemq.conf.

You can edit the configuration file using the edit-config script from the Netdata config directory.

cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
sudo ./edit-config go.d/vernemq.conf

Options

The following options can be defined globally: update_every, autodetection_retry.

Config options
NameDescriptionDefaultRequired
update_everyData collection frequency.1no
autodetection_retryRecheck interval in seconds. Zero means no recheck will be scheduled.0no
urlServer URL.http://127.0.0.1:8888/metricsyes
timeoutHTTP request timeout.1no
usernameUsername for basic HTTP authentication.no
passwordPassword for basic HTTP authentication.no
proxy_urlProxy URL.no
proxy_usernameUsername for proxy basic HTTP authentication.no
proxy_passwordPassword for proxy basic HTTP authentication.no
methodHTTP request method.GETno
bodyHTTP request body.no
headersHTTP request headers.no
not_follow_redirectsRedirect handling policy. Controls whether the client follows redirects.nono
tls_skip_verifyServer certificate chain and hostname validation policy. Controls whether the client performs this check.nono
tls_caCertification authority that the client uses when verifying the server's certificates.no
tls_certClient TLS certificate.no
tls_keyClient TLS key.no

Examples

Basic

An example configuration.

Config
jobs:
- name: local
url: http://127.0.0.1:8888/metrics

HTTP authentication

Local instance with basic HTTP authentication.

Config
jobs:
- name: local
url: http://127.0.0.1:8888/metrics
username: username
password: password

Multi-instance

Note: When you define multiple jobs, their names must be unique.

Local and remote instances.

Config
jobs:
- name: local
url: http://127.0.0.1:8888/metrics

- name: remote
url: http://203.0.113.10:8888/metrics

Troubleshooting

Debug Mode

Important: Debug mode is not supported for data collection jobs created via the UI using the Dyncfg feature.

To troubleshoot issues with the vernemq collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn't working.

  • Navigate to the plugins.d directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the plugins setting under [directories].

    cd /usr/libexec/netdata/plugins.d/
  • Switch to the netdata user.

    sudo -u netdata -s
  • Run the go.d.plugin to debug the collector:

    ./go.d.plugin -d -m vernemq

Getting Logs

If you're encountering problems with the vernemq collector, follow these steps to retrieve logs and identify potential issues:

  • Run the command specific to your system (systemd, non-systemd, or Docker container).
  • Examine the output for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.

System with systemd

Use the following command to view logs generated since the last Netdata service restart:

journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep vernemq

System without systemd

Locate the collector log file, typically at /var/log/netdata/collector.log, and use grep to filter for collector's name:

grep vernemq /var/log/netdata/collector.log

Note: This method shows logs from all restarts. Focus on the latest entries for troubleshooting current issues.

Docker Container

If your Netdata runs in a Docker container named "netdata" (replace if different), use this command:

docker logs netdata 2>&1 | grep vernemq

Do you have any feedback for this page? If so, you can open a new issue on our netdata/learn repository.