Forge Home


Install and configure a tool to federate Prometheus metrics via NATS Streams


6,134 latest version

3.1 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.2.0 (latest)
  • 0.1.0
  • 0.0.7
  • 0.0.6
  • 0.0.5
  • 0.0.4
  • 0.0.3
released Jun 25th 2018
This version is compatible with:
  • Puppet Enterprise 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 6.0.0
  • , ,

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'choria-prometheus_streams', '0.2.0'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add choria-prometheus_streams
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install choria-prometheus_streams --version 0.2.0

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.



choria/prometheus_streams — version 0.2.0 Jun 25th 2018



The Choria Prometheus Streams Federation is a tool that polls Prometheus metrics and distribute them over NATS Streams. On the Receiver they are published into Prometheus Push Gateway

Module Description

The module installs, configures and manages the associated services.

In order to install the package you have to add the Choria YUM repository to your system, in future there will be a choria module to do this for you.



  poller => true,
  receiver => true,
  poller_stream => {
    cluster_id => "dc1_stream",
    urls => "nats://",
    topic => "prometheus"
  receiver_stream => {
    client_id => "prometheus_receiver",
    cluster_id => "global_stream",
    urls => "nats://",
    topic => "prometheus"
  push_gateway => {
    url => "",
    publisher_label => true,
  management => {
    identity => "",
    collective => "prometheus",
    brokers => [""]
  jobs => {
    "choria" => {
      "targets" => [
          "name" => "choria1",
          "url"=> ""

Full reference about the available options for configuring topics can be found in the project documentation.


As of version 0.2.0 of the prometheus-streams package TLS is supported for all NATS connections and can be configured using this module.

While this module support configuring TLS properties such as paths to certificates it cannot create the certificate for you, you have to arrange another means of delivering the SSL keys, certificates etc to the host - perhaps in your profile class.

If you use the Puppet scheme you can configure it as below and use the prometheus-streams enroll command to create the SSL files:

  tls                     => {
    "identity"            => $facts["fqdn"],
    "scheme"              => "puppet",
    "ssl_dir"             => "/etc/stream-replicator/ssl"
  jobs                    => {
    # as above

If you have another CA you can configure it manually, the cache is used by the management interface only:

  tls                     => {
    "identity"            => $facts["fqdn"],
    "scheme"              => "manual",
    "ca"                  => "/path/to/ca.pem",
    "cert"                => "/path/to/cert.pem",
    "key"                 => "/path/to/key.pem",
    "cache"               => "/path/to/cache"
  jobs                    => {
    # as above

These tls stanzas can be set either at the top level as here - where it will apply to all NATS connections - or on the individual management, receiver_stream and poller_stream level in the event that you need different set ups for these.