diff --git a/REFERENCE.md b/REFERENCE.md new file mode 100644 index 000000000..e58380787 --- /dev/null +++ b/REFERENCE.md @@ -0,0 +1,7615 @@ +# Reference + + +## Table of Contents + +**Classes** + +* [`prometheus`](#prometheus): Class: prometheus This module manages prometheus Parameters: [*configname*] the name of the configfile, defaults to prometheus.yaml or p +* [`prometheus::alertmanager`](#prometheusalertmanager): Class: prometheus::alertmanager This module manages prometheus alertmanager Parameters: [*arch*] Architecture (amd64 or i386) [*bin_dir +* [`prometheus::apache_exporter`](#prometheusapache_exporter): +* [`prometheus::beanstalkd_exporter`](#prometheusbeanstalkd_exporter): +* [`prometheus::blackbox_exporter`](#prometheusblackbox_exporter): +* [`prometheus::collectd_exporter`](#prometheuscollectd_exporter): Class: prometheus::collectd_exporter This module manages prometheus node collectd_exporter Parameters: [*arch*] Architecture (amd64 or i3 +* [`prometheus::config`](#prometheusconfig): Class prometheus::config Configuration class for prometheus monitoring system +* [`prometheus::consul_exporter`](#prometheusconsul_exporter): +* [`prometheus::elasticsearch_exporter`](#prometheuselasticsearch_exporter): +* [`prometheus::graphite_exporter`](#prometheusgraphite_exporter): Class: prometheus::graphite_exporter This module manages prometheus node graphite_exporter Parameters: [*arch*] Architecture (amd64 or i3 +* [`prometheus::haproxy_exporter`](#prometheushaproxy_exporter): +* [`prometheus::install`](#prometheusinstall): Class prometheus::server::install Install prometheus via different methods with parameters from init Currently only the install from url is i +* [`prometheus::mesos_exporter`](#prometheusmesos_exporter): +* [`prometheus::mongodb_exporter`](#prometheusmongodb_exporter): +* [`prometheus::mysqld_exporter`](#prometheusmysqld_exporter): +* [`prometheus::nginx_vts_exporter`](#prometheusnginx_vts_exporter): +* [`prometheus::node_exporter`](#prometheusnode_exporter): +* [`prometheus::postfix_exporter`](#prometheuspostfix_exporter): manages prometheus postfix_exporter +* [`prometheus::postgres_exporter`](#prometheuspostgres_exporter): +* [`prometheus::process_exporter`](#prometheusprocess_exporter): +* [`prometheus::pushgateway`](#prometheuspushgateway): +* [`prometheus::pushprox_client`](#prometheuspushprox_client): Class: prometheus::pushprox_client This module manages prometheus pushprox_client Parameters: [*arch*] Architecture (amd64 or i386) [*b +* [`prometheus::pushprox_proxy`](#prometheuspushprox_proxy): Class: prometheus::pushprox_proxy This module manages prometheus pushprox_proxy Parameters: [*arch*] Architecture (amd64 or i386) [*bin +* [`prometheus::rabbitmq_exporter`](#prometheusrabbitmq_exporter): +* [`prometheus::redis_exporter`](#prometheusredis_exporter): +* [`prometheus::run_service`](#prometheusrun_service): == Class prometheus::service This class is meant to be called from prometheus It ensure the service is running +* [`prometheus::server`](#prometheusserver): class to manage the actual prometheus server this is a private class that gets called from the init.pp +* [`prometheus::service_reload`](#prometheusservice_reload): This class implements prometheus service reload without restarting the whole service when a config changes +* [`prometheus::snmp_exporter`](#prometheussnmp_exporter): +* [`prometheus::statsd_exporter`](#prometheusstatsd_exporter): +* [`prometheus::varnish_exporter`](#prometheusvarnish_exporter): Class: prometheus::varnish_exporter This module manages prometheus varnish_exporter Parameters: [*arch*] Architecture (amd64 or i386) [ + +**Defined types** + +* [`prometheus::alerts`](#prometheusalerts): Define: prometheus::alerts This module manages prometheus alert files for prometheus [*alerts*] Array (< prometheus 2.0.0) or Hash (>= pr +* [`prometheus::daemon`](#prometheusdaemon): Define: prometheus::daemon This define managed prometheus daemons that don't have their own class [*version*] The binary release version +* [`prometheus::scrape_job`](#prometheusscrape_job): Define: prometheus::scrape_job This define is used to export prometheus scrape settings from nodes to be scraped to the node running prometh + +**Data types** + +* [`Prometheus::Initstyle`](#prometheusinitstyle): +* [`Prometheus::S3Uri`](#prometheuss3uri): +* [`Prometheus::Uri`](#prometheusuri): + +## Classes + +### prometheus + +Class: prometheus + +This module manages prometheus + +Parameters: + + [*configname*] + the name of the configfile, defaults to prometheus.yaml or prometheus.yml on most operating systems + + [*manage_user*] + Whether to create user for prometheus or rely on external code for that + + [*user*] + User running prometheus + + [*manage_group*] + Whether to create user for prometheus or rely on external code for that + + [*purge_config_dir*] + Purge config files no longer generated by Puppet + + [*group*] + Group under which prometheus is running + + [*bin_dir*] + Directory where binaries are located + + [*shared_dir*] + Directory where shared files are located + + [*arch*] + Architecture (amd64 or i386) + + [*version*] + Prometheus release + + [*install_method*] + Installation method: url or package (only url is supported currently) + + [*os*] + Operating system (linux is supported) + + [*download_url*] + Complete URL corresponding to the Prometheus release, default to undef + + [*download_url_base*] + Base URL for prometheus + + [*download_extension*] + Extension of Prometheus binaries archive + + [*package_name*] + Prometheus package name - not available yet + + [*package_ensure*] + If package, then use this for package ensurel default 'latest' + + [*config_dir*] + Prometheus configuration directory (default /etc/prometheus) + + [*localstorage*] + Location of prometheus local storage (storage.local argument) + + [*extra_options*] + Extra options added to prometheus startup command + + [*config_hash*] + Startup config hash + + [*config_defaults*] + Startup config defaults + + [*config_template*] + Configuration template to use (template/prometheus.yaml.erb) + + [*config_mode*] + Configuration file mode (default 0660) + + [*service_enable*] + Whether to enable or not prometheus service from puppet (default true) + + [*service_ensure*] + State ensured from prometheus service (default 'running') + + [*manage_service*] + Should puppet manage the prometheus service? (default true) + + [*restart_on_change*] + Should puppet restart prometheus on configuration change? (default true) + Note: this applies only to command-line options changes. Configuration + options are always *reloaded* without restarting. + + [*init_style*] + Service startup scripts style (e.g. rc, upstart or systemd) + + [*global_config*] + Prometheus global configuration variables + + [*rule_files*] + Prometheus rule files + + [*scrape_configs*] + Prometheus scrape configs + + [*remote_read_configs*] + Prometheus remote_read config to scrape prometheus 1.8+ instances + + [*remote_write_configs*] + Prometheus remote_write config to scrape prometheus 1.8+ instances + + [*alerts*] + alert rules to put in alerts.rules + + [*extra_alerts*] + Hash with extra alert rules to put in separate files. + + [*alert_relabel_config*] + Prometheus alert relabel config under alerting + + [*alertmanagers_config*] + Prometheus managers config under alerting + + [*storage_retention*] + How long to keep timeseries data. This is given as a duration like "100h" or "14d". Until + prometheus 1.8.*, only durations understood by golang's time.ParseDuration are supported. Starting + with prometheus 2, durations can also be given in days, weeks and years. + + [*external_url*] + The URL under which Alertmanager is externally reachable (for example, if Alertmanager is served + via a reverse proxy). Used for generating relative and absolute links back to Alertmanager itself. + If omitted, relevant URL components will be derived automatically. + + [*extract_command*] + Custom command passed to the archive resource to extract the downloaded archive. + + [*collect_scrape_jobs*] + Array of scrape_configs. Format, e.g.: + - job_name: some_exporter + scheme: https + The jobs defined here will be used to collect resources exported via prometheus::daemon, + creating the appropriate prometheus scrape configs for each endpoint. All scrape_config + options can be passed as hash elements. Only the job_name is mandatory. + + [*max_open_files*] + The maximum number of file descriptors for the prometheus server. + Defaults to `undef`, but set to a large integer to override your default OS limit. + Currently only implemented for systemd based service. + + [*usershell*] + if requested, we create a user for prometheus or the exporters. The default + shell is nologin. It can be overwritten to any valid path. + + CLI ========================================================== + The following parameters represent system parameters invoked as command-line flags + during prometheus startup. Defaults are handled by Prometheus. + + [*web_listen_address*] + --web.listen-address="0.0.0.0:9090" + Address to listen on for UI, API, and telemetry. + + [*web_read_timeout*] + --web.read-timeout=5m + Maximum duration before timing out read of the request, and closing idle connections. + + [*web_max_connections*] + --web.max-connections=512 + Maximum number of simultaneous connections. + + [*web_route_prefix*] + --web.route-prefix= + Prefix for the internal routes of web endpoints. Defaults to path of --web.external-url. + + [*web_user_assets*] + --web.user-assets= + Path to static asset directory, available at /user. + + [*web_enable_lifecycle*] + --web.enable-lifecycle + Enable shutdown and reload via HTTP request + + [*web_enable_admin_api*] + --web.enable-admin-api + Enable API endpoints for admin control actions. + + [*web_page_title*] + --web.page-title="Prometheus Time Series Collection and Processing Server" + Document title of Prometheus instance. + + [*web_cors_origin*] + --web.cors.origin=".*" + Regex for CORS origin. It is fully anchored. Example: 'https?://(domain1|domain2)\.com' + + [*storage_retention_size*] + --storage.tsdb.retention.size=STORAGE.TSDB.RETENTION.SIZE + [EXPERIMENTAL] Maximum number of bytes that can be stored for blocks. Units supported: KB, + MB, GB, TB, PB. This flag is experimental and can be changed in future releases. + + [*storage_no_lockfile*] + --storage.tsdb.no-lockfile + Do not create lockfile in data directory. + + [*storage_allow_overlapping_blocks*] + --storage.tsdb.allow-overlapping-blocks + [EXPERIMENTAL] Allow overlapping blocks, which in turn enables vertical compaction and + vertical query merge. + + [*storage_wal_compression*] + --storage.tsdb.wal-compression + Compress the tsdb WAL. + + [*storage_flush_deadline*] + --storage.remote.flush-deadline= + How long to wait flushing sample on shutdown or config reload. + + [*storage_read_sample_limit*] + --storage.remote.read-sample-limit=5e7 + Maximum overall number of samples to return via the remote read interface, in a single + query. 0 means no limit. This limit is ignored for streamed response types. + + [*storage_read_concurrent_limit*] + --storage.remote.read-concurrent-limit=10 + Maximum number of concurrent remote read calls. 0 means no limit. + + [*storage_read_max_bytes_in_frame*] + --storage.remote.read-max-bytes-in-frame=1048576 + Maximum number of bytes in a single frame for streaming remote read response types before + marshalling. Note that client might have limit on frame size as well. 1MB as recommended + by protobuf by default. + + [*alert_for_outage_tolerance*] + --rules.alert.for-outage-tolerance=1h + Max time to tolerate prometheus outage for restoring "for" state of alert. + + [*alert_for_grace_period*] + --rules.alert.for-grace-period=10m + Minimum duration between alert and restored "for" state. This is maintained only for + alerts with configured "for" time greater than grace period. + + [*alert_resend_delay*] + --rules.alert.resend-delay=1m + Minimum amount of time to wait before resending an alert to Alertmanager. + + [*alertmanager_notification_queue_capacity*] + --alertmanager.notification-queue-capacity=10000 + The capacity of the queue for pending Alertmanager notifications. + + [*alertmanager_timeout*] + --alertmanager.timeout=10s + Timeout for sending alerts to Alertmanager. + + [*alertmanager_url*] + [REMOVED, v1 ONLY] -alertmanager.url + Comma-separated list of Alertmanager URLs to send notifications to. + In Prometheus v2, Alertmanager must be discovered via service discovery + + [*query_lookback_delta*] + --query.lookback-delta=5m + The maximum lookback duration for retrieving metrics during expression evaluations. + + [*query_timeout*] + --query.timeout=2m + Maximum time a query may take before being aborted. + + [*query_max_concurrency*] + --query.max-concurrency=20 + Maximum number of queries executed concurrently. + + [*query_max_samples*] + --query.max-samples=50000000 + Maximum number of samples a single query can load into memory. Note that queries will fail + if they try to load more samples than this into memory, so this also limits the number of + samples a query can return. + + [*query_staleness_delta*] + [REMOVED, v1 ONLY] -query.staleness-delta=5m0s + Staleness delta allowance during expression evaluations. + + [*web_telemetry_path*] + [REMOVED, v1 ONLY] -web.telemetry-path="/metrics" + Path under which to expose metrics + + [*web_enable_remote_shutdown*] + [REMOVED, v1 ONLY] -web.enable-remote-shutdown=false + Enable remote service shutdown. + + [*log_level*] + --log.level=info + Only log messages with the given severity or above. One of: [debug, info, warn, error] + Value of 'fatal' is also allowed in prometheus v1 + + [*log_format*] + --log.format=logfmt + Output format of log messages. One of: [logfmt, json] + +Actions: + +Requires: see Modulefile + +Sample Usage: + +#### Parameters + +The following parameters are available in the `prometheus` class. + +##### `configname` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `group` + +Data type: `String` + + + +##### `extra_groups` + +Data type: `Array` + + + +##### `bin_dir` + +Data type: `Stdlib::Absolutepath` + + + +##### `shared_dir` + +Data type: `Stdlib::Absolutepath` + + + +##### `version` + +Data type: `String` + + + +##### `install_method` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `Prometheus::Uri` + + + +##### `download_extension` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `config_dir` + +Data type: `String` + + + +##### `localstorage` + +Data type: `Stdlib::Absolutepath` + + + +##### `config_template` + +Data type: `String` + + + +##### `config_mode` + +Data type: `String` + + + +##### `global_config` + +Data type: `Hash` + + + +##### `rule_files` + +Data type: `Array` + + + +##### `scrape_configs` + +Data type: `Array` + + + +##### `remote_read_configs` + +Data type: `Array` + + + +##### `remote_write_configs` + +Data type: `Array` + + + +##### `alerts` + +Data type: `Variant[Array,Hash]` + + + +##### `alert_relabel_config` + +Data type: `Array` + + + +##### `alertmanagers_config` + +Data type: `Array` + + + +##### `storage_retention` + +Data type: `String` + + + +##### `env_file_path` + +Data type: `Stdlib::Absolutepath` + + + +##### `manage_prometheus_server` + +Data type: `Boolean` + + + +##### `service_enable` + +Data type: `Boolean` + + + +##### `service_ensure` + +Data type: `String` + + + +##### `manage_service` + +Data type: `Boolean` + + + +##### `restart_on_change` + +Data type: `Boolean` + + + +##### `init_style` + +Data type: `Prometheus::Initstyle` + + + +##### `extra_options` + +Data type: `Optional[String[1]]` + + + +##### `download_url` + +Data type: `Optional[String]` + + + +##### `arch` + +Data type: `String` + + + +##### `manage_group` + +Data type: `Boolean` + + + +##### `purge_config_dir` + +Data type: `Boolean` + + + +##### `manage_user` + +Data type: `Boolean` + + + +##### `extract_command` + +Data type: `Optional[String[1]]` + + + +##### `manage_config` + +Data type: `Boolean` + + + +##### `usershell` + +Data type: `Stdlib::Absolutepath` + + + +##### `web_listen_address` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `web_read_timeout` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `web_max_connections` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `web_route_prefix` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `web_user_assets` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `web_enable_lifecycle` + +Data type: `Boolean` + + + +Default value: `false` + +##### `web_enable_admin_api` + +Data type: `Boolean` + + + +Default value: `false` + +##### `web_page_title` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `web_cors_origin` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `storage_retention_size` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `storage_no_lockfile` + +Data type: `Boolean` + + + +Default value: `false` + +##### `storage_allow_overlapping_blocks` + +Data type: `Boolean` + + + +Default value: `false` + +##### `storage_wal_compression` + +Data type: `Boolean` + + + +Default value: `false` + +##### `storage_flush_deadline` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `storage_read_sample_limit` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `storage_read_concurrent_limit` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `storage_read_max_bytes_in_frame` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `alert_for_outage_tolerance` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `alert_for_grace_period` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `alert_resend_delay` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `alertmanager_notification_queue_capacity` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `alertmanager_timeout` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `alertmanager_url` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `query_lookback_delta` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `query_timeout` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `query_max_concurrency` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `query_max_samples` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `query_staleness_delta` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `web_telemetry_path` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `web_enable_remote_shutdown` + +Data type: `Boolean` + + + +Default value: `false` + +##### `log_level` + +Data type: `Optional[Enum['debug', 'info', 'warn', 'error', 'fatal']]` + + + +Default value: `undef` + +##### `log_format` + +Data type: `Optional[Enum['logfmt', 'json']]` + + + +Default value: `undef` + +##### `extra_alerts` + +Data type: `Hash` + + + +Default value: {} + +##### `config_hash` + +Data type: `Hash` + + + +Default value: {} + +##### `config_defaults` + +Data type: `Hash` + + + +Default value: {} + +##### `os` + +Data type: `String` + + + +Default value: downcase($facts['kernel']) + +##### `external_url` + +Data type: `Optional[Variant[Stdlib::HTTPUrl, Stdlib::Unixpath, String[1]]]` + + + +Default value: `undef` + +##### `collect_scrape_jobs` + +Data type: `Optional[Array[Hash[String[1], Any]]]` + + + +Default value: [] + +##### `max_open_files` + +Data type: `Optional[Integer]` + + + +Default value: `undef` + +### prometheus::alertmanager + +Class: prometheus::alertmanager + +This module manages prometheus alertmanager + +Parameters: + [*arch*] + Architecture (amd64 or i386) + + [*bin_dir*] + Directory where binaries are located + + [*config_file*] + The path to put the configuration file + + [*config_mode*] + The permissions of the configuration files + + [*download_extension*] + Extension for the release binary archive + + [*download_url*] + Complete URL corresponding to the where the release binary archive can be downloaded + + [*download_url_base*] + Base URL for the binary archive + + [*extra_groups*] + Extra groups to add the binary user to + + [*extra_options*] + Extra options added to the startup command + + [*global*] + The global alertmanager configuration. + Example (also default): + + prometheus::alertmanager::global: + smtp_smarthost: 'localhost:25' + smtp_from: 'alertmanager@localhost' + + [*group*] + Group under which the binary is running + + [*inhibit_rules*] + An array of inhibit rules. + Example (also default): + + prometheus::alertmanager::inhibit_rules: + - source_match: + severity: 'critical' + target_match: + severity: 'warning' + equal: + - 'alertname' + - 'cluster' + - 'service' + + [*init_style*] + Service startup scripts style (e.g. rc, upstart or systemd) + + [*install_method*] + Installation method: url or package (only url is supported currently) + + [*manage_group*] + Whether to create a group for or rely on external code for that + + [*manage_service*] + Should puppet manage the service? (default true) + + [*manage_user*] + Whether to create user or rely on external code for that + + [*os*] + Operating system (linux is the only one supported) + + [*package_ensure*] + If package, then use this for package ensure default 'latest' + + [*package_name*] + The binary package name - not available yet + + [*purge_config_dir*] + Purge config files no longer generated by Puppet + + [*receivers*] + An array of receivers. + Example (also default): + + prometheus::alertmanager::receivers: + - name: 'Admin' + email_configs: + - to: 'root@localhost' + + [*restart_on_change*] + Should puppet restart the service on configuration change? (default true) + + [*route*] + The top level route. + Example (also default): + + prometheus::alertmanager::route: + group_by: + - 'alertname' + - 'cluster' + - 'service' + group_wait: '30s' + group_interval: '5m' + repeat_interval: '3h' + receiver: 'Admin' + + [*service_enable*] + Whether to enable the service from puppet (default true) + + [*service_ensure*] + State ensured for the service (default 'running') + + [*service_name*] + Name of the alertmanager service (default 'alertmanager') + + [*storage_path*] + The storage path to pass to the alertmanager. Defaults to '/var/lib/alertmanager' + + [*templates*] + The array of template files. Defaults to [ "${config_dir}/*.tmpl" ] + + [*user*] + User which runs the service + + [*version*] + The binary release version + +#### Parameters + +The following parameters are available in the `prometheus::alertmanager` class. + +##### `config_dir` + +Data type: `Stdlib::Absolutepath` + + + +##### `config_file` + +Data type: `Stdlib::Absolutepath` + + + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `Prometheus::Uri` + + + +##### `extra_groups` + +Data type: `Array` + + + +##### `global` + +Data type: `Hash` + + + +##### `group` + +Data type: `String` + + + +##### `inhibit_rules` + +Data type: `Array` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `receivers` + +Data type: `Array` + + + +##### `route` + +Data type: `Hash` + + + +##### `storage_path` + +Data type: `Stdlib::Absolutepath` + + + +##### `templates` + +Data type: `Array` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `service_name` + +Data type: `String` + + + +Default value: 'alertmanager' + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_config` + +Data type: `Boolean` + + + +Default value: `true` + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `config_mode` + +Data type: `String` + + + +Default value: $prometheus::config_mode + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::bin_dir + +### prometheus::apache_exporter + +The prometheus::apache_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::apache_exporter` class. + +##### `scrape_uri` + +Data type: `String[1]` + + + +##### `download_extension` + +Data type: `String[1]` + + + +##### `download_url_base` + +Data type: `Prometheus::Uri` + + + +##### `extra_groups` + +Data type: `Array[String[1]]` + + + +##### `group` + +Data type: `String[1]` + + + +##### `package_ensure` + +Data type: `String[1]` + + + +##### `package_name` + +Data type: `String[1]` + + + +##### `user` + +Data type: `String[1]` + + + +##### `version` + +Data type: `String[1]` + + + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String[1]` + + + +Default value: 'running' + +##### `init_style` + +Data type: `String[1]` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String[1]` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String[1]` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[Prometheus::Uri]` + + + +Default value: `undef` + +##### `config_mode` + +Data type: `String[1]` + + + +Default value: $prometheus::config_mode + +##### `arch` + +Data type: `String[1]` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9117 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'apache' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::beanstalkd_exporter + +The prometheus::beanstalkd_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::beanstalkd_exporter` class. + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `String` + + + +##### `extra_groups` + +Data type: `Array` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `config` + +Data type: `String` + + + +##### `mapping_config` + +Data type: `String` + + + +##### `beanstalkd_address` + +Data type: `String` + + + +##### `exporter_listen` + +Data type: `String` + + + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Variant[Undef,String]` + + + +Default value: `undef` + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `String` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 8080 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'beanstalkd' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::blackbox_exporter + +The prometheus::blackbox_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::blackbox_exporter` class. + +##### `config_file` + +Data type: `String` + + + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `String` + + + +##### `extra_groups` + +Data type: `Array[String]` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `service_name` + +Data type: `String` + + + +Default value: 'blackbox_exporter' + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `config_mode` + +Data type: `String` + + + +Default value: $prometheus::config_mode + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `String` + + + +Default value: $prometheus::bin_dir + +##### `modules` + +Data type: `Hash` + + + +Default value: {} + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9115 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'blackbox' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::collectd_exporter + +Class: prometheus::collectd_exporter + +This module manages prometheus node collectd_exporter + +Parameters: + [*arch*] + Architecture (amd64 or i386) + + [*bin_dir*] + Directory where binaries are located + + [*download_extension*] + Extension for the release binary archive + + [*download_url*] + Complete URL corresponding to the where the release binary archive can be downloaded + + [*download_url_base*] + Base URL for the binary archive + + [*options*] + Options added to the startup command + + [*group*] + Group under which the binary is running + + [*init_style*] + Service startup scripts style (e.g. rc, upstart or systemd) + + [*install_method*] + Installation method: url or package (only url is supported currently) + + [*manage_group*] + Whether to create a group for or rely on external code for that + + [*manage_service*] + Should puppet manage the service? (default true) + + [*manage_user*] + Whether to create user or rely on external code for that + + [*os*] + Operating system (linux is the only one supported) + + [*package_ensure*] + If package, then use this for package ensure default 'latest' + + [*package_name*] + The binary package name - not available yet + + [*purge_config_dir*] + Purge config files no longer generated by Puppet + + [*restart_on_change*] + Should puppet restart the service on configuration change? (default true) + + [*service_enable*] + Whether to enable the service from puppet (default true) + + [*service_ensure*] + State ensured for the service (default 'running') + + [*user*] + User which runs the service + + [*version*] + The binary release version + +#### Parameters + +The following parameters are available in the `prometheus::collectd_exporter` class. + +##### `download_extension` + +Data type: `String[1]` + + + +##### `download_url_base` + +Data type: `String[1]` + + + +##### `group` + +Data type: `String[1]` + + + +##### `package_ensure` + +Data type: `String[1]` + + + +##### `package_name` + +Data type: `String[1]` + + + +##### `user` + +Data type: `String[1]` + + + +##### `version` + +Data type: `String[1]` + + + +##### `purge_config_dir` + +Data type: `Boolean` + + + +##### `restart_on_change` + +Data type: `Boolean` + + + +##### `service_enable` + +Data type: `Boolean` + + + +##### `service_ensure` + +Data type: `String[1]` + + + +##### `manage_group` + +Data type: `Boolean` + + + +##### `manage_service` + +Data type: `Boolean` + + + +##### `manage_user` + +Data type: `Boolean` + + + +##### `options` + +Data type: `String` + + + +##### `os` + +Data type: `String[1]` + + + +Default value: $prometheus::os + +##### `init_style` + +Data type: `String[1]` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String[1]` + + + +Default value: $prometheus::install_method + +##### `download_url` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +##### `arch` + +Data type: `String[1]` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `String[1]` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9103 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'collectd' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::config + +Class prometheus::config +Configuration class for prometheus monitoring system + +### prometheus::consul_exporter + +The prometheus::consul_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::consul_exporter` class. + +##### `consul_health_summary` + +Data type: `Boolean` + + + +##### `consul_server` + +Data type: `String` + + + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `String` + + + +##### `extra_groups` + +Data type: `Array` + + + +##### `group` + +Data type: `String` + + + +##### `log_level` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `web_listen_address` + +Data type: `String` + + + +##### `web_telemetry_path` + +Data type: `String` + + + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `String` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9107 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'consul' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::elasticsearch_exporter + +The prometheus::elasticsearch_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::elasticsearch_exporter` class. + +##### `cnf_uri` + +Data type: `String` + + + +##### `cnf_timeout` + +Data type: `String` + + + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `String` + + + +##### `extra_groups` + +Data type: `Array` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `use_kingpin` + +Data type: `Boolean` + + + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `String` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9114 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'elasticsearch' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::graphite_exporter + +Class: prometheus::graphite_exporter + +This module manages prometheus node graphite_exporter + +Parameters: + [*arch*] + Architecture (amd64 or i386) + + [*bin_dir*] + Directory where binaries are located + + [*download_extension*] + Extension for the release binary archive + + [*download_url*] + Complete URL corresponding to the where the release binary archive can be downloaded + + [*download_url_base*] + Base URL for the binary archive + + [*options*] + Options added to the startup command + + [*group*] + Group under which the binary is running + + [*init_style*] + Service startup scripts style (e.g. rc, upstart or systemd) + + [*install_method*] + Installation method: url or package (only url is supported currently) + + [*manage_group*] + Whether to create a group for or rely on external code for that + + [*manage_service*] + Should puppet manage the service? (default true) + + [*manage_user*] + Whether to create user or rely on external code for that + + [*os*] + Operating system (linux is the only one supported) + + [*package_ensure*] + If package, then use this for package ensure default 'latest' + + [*package_name*] + The binary package name - not available yet + + [*purge_config_dir*] + Purge config files no longer generated by Puppet + + [*restart_on_change*] + Should puppet restart the service on configuration change? (default true) + + [*service_enable*] + Whether to enable the service from puppet (default true) + + [*service_ensure*] + State ensured for the service (default 'running') + + [*user*] + User which runs the service + + [*version*] + The binary release version + +#### Parameters + +The following parameters are available in the `prometheus::graphite_exporter` class. + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `String` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `purge_config_dir` + +Data type: `Boolean` + + + +##### `restart_on_change` + +Data type: `Boolean` + + + +##### `service_enable` + +Data type: `Boolean` + + + +##### `service_ensure` + +Data type: `String` + + + +##### `manage_group` + +Data type: `Boolean` + + + +##### `manage_service` + +Data type: `Boolean` + + + +##### `manage_user` + +Data type: `Boolean` + + + +##### `options` + +Data type: `String` + + + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `String` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9108 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'graphite' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::haproxy_exporter + +The prometheus::haproxy_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::haproxy_exporter` class. + +##### `cnf_scrape_uri` + +Data type: `Variant[Stdlib::HTTPUrl, Pattern[/unix:(?:\/.+)+/]]` + + + +##### `download_extension` + +Data type: `String` + + + +##### `extra_groups` + +Data type: `Array` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `Prometheus::Uri` + + + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `Any` + + + +Default value: 'running' + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9101 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'haproxy' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::install + +Class prometheus::server::install +Install prometheus via different methods with parameters from init +Currently only the install from url is implemented, when Prometheus will deliver packages for some Linux distros I will +implement the package install method as well +The package method needs specific yum or apt repo settings which are not made yet by the module + +### prometheus::mesos_exporter + +The prometheus::mesos_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::mesos_exporter` class. + +##### `server_type` + +Data type: `String` + + + +##### `cnf_scrape_uri` + +Data type: `String` + + + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `String` + + + +##### `extra_groups` + +Data type: `Array` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `String` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9105 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'mesos' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::mongodb_exporter + +The prometheus::mongodb_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::mongodb_exporter` class. + +##### `cnf_uri` + +Data type: `String` + + + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `String` + + + +##### `extra_groups` + +Data type: `Array` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `use_kingpin` + +Data type: `Boolean` + + + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `String` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9216 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'mongodb' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::mysqld_exporter + +The prometheus::mysqld_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::mysqld_exporter` class. + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `Prometheus::Uri` + + + +##### `extra_groups` + +Data type: `Array` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `cnf_config_path` + +Data type: `Stdlib::Absolutepath` + + + +Default value: '/etc/.my.cnf' + +##### `cnf_host` + +Data type: `Stdlib::Host` + + + +Default value: localhost + +##### `cnf_port` + +Data type: `Stdlib::Port` + + + +Default value: 3306 + +##### `cnf_user` + +Data type: `String[1]` + + + +Default value: login + +##### `cnf_password` + +Data type: `Variant[Sensitive[String],String]` + + + +Default value: 'password' + +##### `cnf_socket` + +Data type: `Optional[Stdlib::Absolutepath]` + + + +Default value: `undef` + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[Prometheus::Uri]` + + + +Default value: `undef` + +##### `config_mode` + +Data type: `String` + + + +Default value: $prometheus::config_mode + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9104 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'mysql' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::nginx_vts_exporter + +The prometheus::nginx_vts_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::nginx_vts_exporter` class. + +##### `nginx_scrape_uri` + +Data type: `String` + + + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `String` + + + +##### `extra_groups` + +Data type: `Array` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `String` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9913 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'nginx_vts' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::node_exporter + +The prometheus::node_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::node_exporter` class. + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `String` + + + +##### `extra_groups` + +Data type: `Array[String]` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `service_name` + +Data type: `String` + + + +Default value: 'node_exporter' + +##### `init_style` + +Data type: `Optional[String]` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `String` + + + +Default value: $prometheus::bin_dir + +##### `collectors` + +Data type: `Optional[Array[String]]` + + + +Default value: `undef` + +##### `collectors_enable` + +Data type: `Array[String]` + + + +Default value: [] + +##### `collectors_disable` + +Data type: `Array[String]` + + + +Default value: [] + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9100 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'node' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +##### `bin_name` + +Data type: `Optional[String[1]]` + + + +Default value: `undef` + +### prometheus::postfix_exporter + +manages prometheus postfix_exporter + +* **See also** +https://github.com/kumina/postfix_exporter + +#### Examples + +##### Basic usage + +```puppet +include prometheus::postfix_exporter +``` + +#### Parameters + +The following parameters are available in the `prometheus::postfix_exporter` class. + +##### `install_method` + +Data type: `Enum['url','package']` + +Installation method: `url` or `package`. (Note `package` is not available on most OSes.) + +Default value: 'url' + +##### `download_url` + +Data type: `Optional[Stdlib::HTTPUrl]` + +Complete URL corresponding to the where the release can be downloaded. (This option is only relevant when `install_method` is `url`.) + +Default value: `undef` + +##### `download_url_base` + +Data type: `Stdlib::HTTPUrl` + +Base URL for the binary archive. (This option is only relevant when `install_method` is `url`.) + +Default value: 'https://github.com/kumina/postfix_exporter/releases' + +##### `download_extension` + +Data type: `String` + +Extension for the release binary archive. (This option is only relevant when `install_method` is `url`.) + +Default value: '' + +##### `version` + +Data type: `String[1]` + +The binary release version. (This option is only relevant when `install_method` is `url`.) + +Default value: '0.2.0' + +##### `package_ensure` + +Data type: `String[1]` + +Used when `install_method` is `package`. + +Default value: 'installed' + +##### `package_name` + +Data type: `String[1]` + +Used when `install_method` is `package`. + +Default value: 'postfix_exporter' + +##### `manage_user` + +Data type: `Boolean` + +Whether to create and manage the exporter's user. This can eg. be set to `false` if your package already creates a user for you. + +Default value: `true` + +##### `user` + +Data type: `String[1]` + +User which runs the service. + +Default value: 'postfix-exporter' + +##### `manage_group` + +Data type: `Boolean` + +Whether to create and manage the exporter's group. This can eg. be set to `false` if your package already creates a group for you. + +Default value: `true` + +##### `group` + +Data type: `String[1]` + +Group to run the service as. + +Default value: 'postfix-exporter' + +##### `extra_groups` + +Data type: `Array[String[1]]` + +Extra groups to add the exporter user to. + +Default value: [] + +##### `manage_service` + +Data type: `Boolean` + +Should puppet manage the service? + +Default value: `true` + +##### `init_style` + +Data type: `Optional[Prometheus::Initstyle]` + +Service startup scripts style. When not set, the correct default for your OS will be used. +Can also be set to `none` when you don't want the class to create a startup script/unit_file for you. +Typically this can be used when a package is already providing the file. + +Default value: `undef` + +##### `service_name` + +Data type: `String[1]` + +The name of the service. + +Default value: 'postfix_exporter' + +##### `service_ensure` + +Data type: `Stdlib::Ensure::Service` + +Desired state for the service. + +Default value: 'running' + +##### `service_enable` + +Data type: `Boolean` + +Whether to enable the service from puppet. + +Default value: `true` + +##### `extra_options` + +Data type: `String` + +Extra options added to the startup command. Override these if you want to monitor a logfile instead of systemd. + +Default value: '--systemd.enable --systemd.unit=\'postfix.service\' --postfix.logfile_path=\'\'' + +##### `restart_on_change` + +Data type: `Boolean` + +Should puppet restart the service on configuration change? + +Default value: `true` + +##### `export_scrape_job` + +Data type: `Boolean` + +Whether to export a `prometheus::scrape_job` to puppetDB for collecting on your prometheus server. + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + +The port to use in the scrape job. This won't normally need to be changed unless you run the exporter with a non-default port by overriding `extra_options`. + +Default value: 9154 + +##### `scrape_job_name` + +Data type: `String[1]` + +The name of the scrape job. When configuring prometheus with this puppet module, the jobs to be collected are configured with `prometheus::collect_scrape_jobs`. + +Default value: 'postfix' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + +Labels to configure on the scrape job. If not set, the `prometheus::daemon` default (`{ 'alias' => $scrape_host }`) will be used. + +Default value: `undef` + +### prometheus::postgres_exporter + +The prometheus::postgres_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::postgres_exporter` class. + +##### `download_extension` + +Data type: `String[1]` + + + +##### `download_url_base` + +Data type: `String[1]` + + + +##### `extra_groups` + +Data type: `Array[String[1]]` + + + +##### `group` + +Data type: `String[1]` + + + +##### `package_ensure` + +Data type: `String[1]` + + + +##### `package_name` + +Data type: `String[1]` + + + +##### `user` + +Data type: `String[1]` + + + +##### `version` + +Data type: `String[1]` + + + +##### `data_source_uri` + +Data type: `String[1]` + + + +##### `postgres_auth_method` + +Data type: `Enum['custom', 'env', 'file']` + + + +##### `data_source_custom` + +Data type: `Hash[String[1],String[1]]` + + + +Default value: {} + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String[1]` + + + +Default value: 'running' + +##### `service_name` + +Data type: `String[1]` + + + +Default value: 'postgres_exporter' + +##### `init_style` + +Data type: `Optional[String]` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String[1]` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String[1]` + + + +Default value: $prometheus::os + +##### `options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `postgres_pass` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `postgres_user` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `arch` + +Data type: `String[1]` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `String[1]` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9187 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'postgres' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::process_exporter + +The prometheus::process_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::process_exporter` class. + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `Prometheus::Uri` + + + +##### `extra_groups` + +Data type: `Array` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `config_path` + +Data type: `Stdlib::Absolutepath` + + + +##### `watched_processes` + +Data type: `Array` + + + +Default value: [] + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `config_mode` + +Data type: `String` + + + +Default value: $prometheus::config_mode + +##### `download_url` + +Data type: `Optional[Prometheus::Uri]` + + + +Default value: `undef` + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9256 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'process' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::pushgateway + +The prometheus::pushgateway class. + +#### Parameters + +The following parameters are available in the `prometheus::pushgateway` class. + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `String` + + + +##### `extra_groups` + +Data type: `Array` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `service_name` + +Data type: `String` + + + +Default value: 'pushgateway' + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `arch` + +Data type: `String[1]` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `String` + + + +Default value: $prometheus::bin_dir + +### prometheus::pushprox_client + +Class: prometheus::pushprox_client + +This module manages prometheus pushprox_client + +Parameters: + [*arch*] + Architecture (amd64 or i386) + + [*bin_dir*] + Directory where binaries are located + + [*config_mode*] + The permissions of the configuration files + + [*download_extension*] + Extension for the release binary archive + + [*download_url*] + Complete URL corresponding to the where the release binary archive can be downloaded + + [*download_url_base*] + Base URL for the binary archive + + [*extra_groups*] + Extra groups to add the binary user to + + [*extra_options*] + Extra options added to the startup command + + [*group*] + Group under which the binary is running + + [*init_style*] + Service startup scripts style (e.g. rc, upstart or systemd) + + [*install_method*] + Installation method: url or package (only url is supported currently) + + [*manage_group*] + Whether to create a group for or rely on external code for that + + [*manage_service*] + Should puppet manage the service? (default true) + + [*manage_user*] + Whether to create user or rely on external code for that + + [*os*] + Operating system (linux is the only one supported) + + [*package_ensure*] + If package, then use this for package ensure default 'latest' + + [*package_name*] + The binary package name - not available yet + + [*purge_config_dir*] + Purge config files no longer generated by Puppet + + [*restart_on_change*] + Should puppet restart the service on configuration change? (default true) + + [*service_enable*] + Whether to enable the service from puppet (default true) + + [*service_ensure*] + State ensured for the service (default 'running') + + [*service_name*] + Name of the pushprox_client service (default 'pushprox_client') + + [*user*] + User which runs the service + + [*version*] + The binary release version + + [*env_vars*] + The environment variable to pass to the daemon + +#### Parameters + +The following parameters are available in the `prometheus::pushprox_client` class. + +##### `proxy_url` + +Data type: `String[1]` + + + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `Prometheus::Uri` + + + +##### `extra_groups` + +Data type: `Array[String[1]]` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `service_name` + +Data type: `String` + + + +Default value: 'pushprox_client' + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `config_mode` + +Data type: `String` + + + +Default value: $prometheus::config_mode + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::bin_dir + +##### `env_vars` + +Data type: `Hash[String, Scalar]` + + + +Default value: {} + +### prometheus::pushprox_proxy + +Class: prometheus::pushprox_proxy + +This module manages prometheus pushprox_proxy + +Parameters: + [*arch*] + Architecture (amd64 or i386) + + [*bin_dir*] + Directory where binaries are located + + [*config_mode*] + The permissions of the configuration files + + [*download_extension*] + Extension for the release binary archive + + [*download_url*] + Complete URL corresponding to the where the release binary archive can be downloaded + + [*download_url_base*] + Base URL for the binary archive + + [*extra_groups*] + Extra groups to add the binary user to + + [*extra_options*] + Extra options added to the startup command + + [*group*] + Group under which the binary is running + + [*init_style*] + Service startup scripts style (e.g. rc, upstart or systemd) + + [*install_method*] + Installation method: url or package (only url is supported currently) + + [*manage_group*] + Whether to create a group for or rely on external code for that + + [*manage_service*] + Should puppet manage the service? (default true) + + [*manage_user*] + Whether to create user or rely on external code for that + + [*os*] + Operating system (linux is the only one supported) + + [*package_ensure*] + If package, then use this for package ensure default 'latest' + + [*package_name*] + The binary package name - not available yet + + [*purge_config_dir*] + Purge config files no longer generated by Puppet + + [*restart_on_change*] + Should puppet restart the service on configuration change? (default true) + + [*service_enable*] + Whether to enable the service from puppet (default true) + + [*service_ensure*] + State ensured for the service (default 'running') + + [*service_name*] + Name of the pushprox_proxy service (default 'pushprox_proxy') + + [*user*] + User which runs the service + + [*version*] + The binary release version + +#### Parameters + +The following parameters are available in the `prometheus::pushprox_proxy` class. + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `Prometheus::Uri` + + + +##### `extra_groups` + +Data type: `Array[String[1]]` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `service_name` + +Data type: `String` + + + +Default value: 'pushprox_proxy' + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `config_mode` + +Data type: `String` + + + +Default value: $prometheus::config_mode + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::bin_dir + +### prometheus::rabbitmq_exporter + +The prometheus::rabbitmq_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::rabbitmq_exporter` class. + +##### `download_url_base` + +Data type: `String` + + + +##### `extra_groups` + +Data type: `Array[String]` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `download_extension` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `rabbit_url` + +Data type: `String` + + + +##### `rabbit_user` + +Data type: `String` + + + +##### `rabbit_password` + +Data type: `String` + + + +##### `queues_include_regex` + +Data type: `String` + + + +##### `queues_exclude_regex` + +Data type: `String` + + + +##### `rabbit_capabilities` + +Data type: `Array[String]` + + + +##### `rabbit_exporters` + +Data type: `Array[String]` + + + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `String` + + + +Default value: $prometheus::bin_dir + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `extra_env_vars` + +Data type: `Hash[String,String]` + + + +Default value: {} + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9090 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'rabbitmq' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::redis_exporter + +The prometheus::redis_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::redis_exporter` class. + +##### `addr` + +Data type: `Array[String]` + + + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `String` + + + +##### `extra_groups` + +Data type: `Array[String]` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `service_name` + +Data type: `String` + + + +Default value: 'redis_exporter' + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `namespace` + +Data type: `String` + + + +Default value: 'redis' + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `String` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9121 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'redis' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::run_service + +== Class prometheus::service + +This class is meant to be called from prometheus +It ensure the service is running + +### prometheus::server + +class to manage the actual prometheus server +this is a private class that gets called from the init.pp + +#### Parameters + +The following parameters are available in the `prometheus::server` class. + +##### `configname` + +Data type: `String` + + + +Default value: $prometheus::configname + +##### `user` + +Data type: `String` + + + +Default value: $prometheus::user + +##### `group` + +Data type: `String` + + + +Default value: $prometheus::group + +##### `extra_groups` + +Data type: `Array` + + + +Default value: $prometheus::extra_groups + +##### `bin_dir` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::bin_dir + +##### `shared_dir` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::shared_dir + +##### `version` + +Data type: `String` + + + +Default value: $prometheus::version + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `download_url_base` + +Data type: `Prometheus::Uri` + + + +Default value: $prometheus::download_url_base + +##### `download_extension` + +Data type: `String` + + + +Default value: $prometheus::download_extension + +##### `package_name` + +Data type: `String` + + + +Default value: $prometheus::package_name + +##### `package_ensure` + +Data type: `String` + + + +Default value: $prometheus::package_ensure + +##### `config_dir` + +Data type: `String` + + + +Default value: $prometheus::config_dir + +##### `localstorage` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::localstorage + +##### `config_template` + +Data type: `String` + + + +Default value: $prometheus::config_template + +##### `config_mode` + +Data type: `String` + + + +Default value: $prometheus::config_mode + +##### `global_config` + +Data type: `Hash` + + + +Default value: $prometheus::global_config + +##### `rule_files` + +Data type: `Array` + + + +Default value: $prometheus::rule_files + +##### `scrape_configs` + +Data type: `Array` + + + +Default value: $prometheus::scrape_configs + +##### `remote_read_configs` + +Data type: `Array` + + + +Default value: $prometheus::remote_read_configs + +##### `remote_write_configs` + +Data type: `Array` + + + +Default value: $prometheus::remote_write_configs + +##### `alerts` + +Data type: `Variant[Array,Hash]` + + + +Default value: $prometheus::alerts + +##### `alert_relabel_config` + +Data type: `Array` + + + +Default value: $prometheus::alert_relabel_config + +##### `alertmanagers_config` + +Data type: `Array` + + + +Default value: $prometheus::alertmanagers_config + +##### `storage_retention` + +Data type: `String` + + + +Default value: $prometheus::storage_retention + +##### `env_file_path` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::env_file_path + +##### `extra_alerts` + +Data type: `Hash` + + + +Default value: $prometheus::extra_alerts + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: $prometheus::service_enable + +##### `service_ensure` + +Data type: `String` + + + +Default value: $prometheus::service_ensure + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: $prometheus::manage_service + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: $prometheus::restart_on_change + +##### `init_style` + +Data type: `Prometheus::Initstyle` + + + +Default value: $prometheus::init_style + +##### `extra_options` + +Data type: `Optional[String[1]]` + + + +Default value: $prometheus::extra_options + +##### `config_hash` + +Data type: `Hash` + + + +Default value: $prometheus::config_hash + +##### `config_defaults` + +Data type: `Hash` + + + +Default value: $prometheus::config_defaults + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: $prometheus::download_url + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: $prometheus::manage_group + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: $prometheus::purge_config_dir + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: $prometheus::manage_user + +##### `manage_config` + +Data type: `Boolean` + + + +Default value: $prometheus::manage_config + +##### `external_url` + +Data type: `Optional[Variant[Stdlib::HTTPurl, Stdlib::Unixpath, String[1]]]` + + + +Default value: $prometheus::external_url + +##### `collect_scrape_jobs` + +Data type: `Optional[Array[Hash[String[1], Any]]]` + + + +Default value: $prometheus::collect_scrape_jobs + +##### `usershell` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::usershell + +### prometheus::service_reload + +This class implements prometheus service reload +without restarting the whole service when a config +changes + +### prometheus::snmp_exporter + +The prometheus::snmp_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::snmp_exporter` class. + +##### `config_file` + +Data type: `String` + + + +##### `config_template` + +Data type: `String` + + + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `String` + + + +##### `extra_groups` + +Data type: `Array` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `config_mode` + +Data type: `String` + + + +Default value: $prometheus::config_mode + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `String` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9116 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'snmp' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::statsd_exporter + +The prometheus::statsd_exporter class. + +#### Parameters + +The following parameters are available in the `prometheus::statsd_exporter` class. + +##### `download_extension` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `Prometheus::Uri` + + + +##### `extra_groups` + +Data type: `Array` + + + +##### `group` + +Data type: `String` + + + +##### `mapping_config_path` + +Data type: `Stdlib::Absolutepath` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `mappings` + +Data type: `Array[Hash]` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::bin_dir + +##### `config_mode` + +Data type: `String` + + + +Default value: $prometheus::config_mode + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[Prometheus::Uri]` + + + +Default value: `undef` + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9102 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'statsd' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +### prometheus::varnish_exporter + +Class: prometheus::varnish_exporter + +This module manages prometheus varnish_exporter + +Parameters: + [*arch*] + Architecture (amd64 or i386) + + [*bin_dir*] + Directory where binaries are located + + [*cnf_scrape_uri*] + The URI to obtain HAProxy stats from + + [*download_extension*] + Extension for the release binary archive + + [*download_url*] + Complete URL corresponding to the where the release binary archive can be downloaded + + [*download_url_base*] + Base URL for the binary archive + + [*extra_groups*] + Extra groups to add the binary user to + + [*extra_options*] + Extra options added to the startup command + + [*group*] + Group under which the binary is running + + [*init_style*] + Service startup scripts style (e.g. rc, upstart or systemd) + + [*install_method*] + Installation method: url or package (only url is supported currently) + + [*manage_group*] + Whether to create a group for or rely on external code for that + + [*manage_service*] + Should puppet manage the service? (default true) + + [*manage_user*] + Whether to create user or rely on external code for that + + [*os*] + Operating system (linux is the only one supported) + + [*package_ensure*] + If package, then use this for package ensure default 'latest' + + [*package_name*] + The binary package name - not available yet + + [*purge_config_dir*] + Purge config files no longer generated by Puppet + + [*restart_on_change*] + Should puppet restart the service on configuration change? (default true) + + [*service_enable*] + Whether to enable the service from puppet (default true) + + [*service_ensure*] + State ensured for the service (default 'running') + + [*user*] + User which runs the service + + [*version*] + The binary release version + +#### Parameters + +The following parameters are available in the `prometheus::varnish_exporter` class. + +##### `download_extension` + +Data type: `String` + + + +##### `extra_groups` + +Data type: `Array` + + + +##### `group` + +Data type: `String` + + + +##### `package_ensure` + +Data type: `String` + + + +##### `package_name` + +Data type: `String` + + + +##### `user` + +Data type: `String` + + + +##### `version` + +Data type: `String` + + + +##### `download_url_base` + +Data type: `Prometheus::Uri` + + + +##### `purge_config_dir` + +Data type: `Boolean` + + + +Default value: `true` + +##### `restart_on_change` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `service_ensure` + +Data type: `Any` + + + +Default value: 'running' + +##### `init_style` + +Data type: `String` + + + +Default value: $prometheus::init_style + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `extra_options` + +Data type: `String` + + + +Default value: '' + +##### `download_url` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::bin_dir + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_port` + +Data type: `Stdlib::Port` + + + +Default value: 9131 + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: 'varnish' + +##### `scrape_job_labels` + +Data type: `Optional[Hash]` + + + +Default value: `undef` + +## Defined types + +### prometheus::alerts + +Define: prometheus::alerts + +This module manages prometheus alert files for prometheus + + [*alerts*] + Array (< prometheus 2.0.0) or Hash (>= prometheus 2.0.0) of alerts (see README). + + [*location*] + Where to create the alert file for prometheus + +#### Parameters + +The following parameters are available in the `prometheus::alerts` defined type. + +##### `alerts` + +Data type: `Variant[Array,Hash]` + + + +##### `location` + +Data type: `String` + + + +Default value: "${prometheus::config_dir}/rules" + +##### `version` + +Data type: `String` + + + +Default value: $prometheus::version + +##### `user` + +Data type: `String` + + + +Default value: $prometheus::user + +##### `group` + +Data type: `String` + + + +Default value: $prometheus::group + +##### `bin_dir` + +Data type: `String` + + + +Default value: $prometheus::bin_dir + +### prometheus::daemon + +Define: prometheus::daemon + +This define managed prometheus daemons that don't have their own class + + [*version*] + The binary release version + + [*real_download_url*] + Complete URL corresponding to the where the release binary archive can be downloaded + + [*notify_service*] + The service to notify when something changes in this define + + [*user*] + User which runs the service + + [*install_method*] + Installation method: url or package + + [*download_extension*] + Extension for the release binary archive + + [*os*] + Operating system (linux is the only one supported) + + [*arch*] + Architecture (amd64 or i386) + + [*bin_dir*] + Directory where binaries are located + + [*bin_name*] + The name of the binary to execute + + [*package_name*] + The binary package name + + [*package_ensure*] + If package, then use this for package ensure default 'installed' + + [*manage_user*] + Whether to create user or rely on external code for that + + [*extra_groups*] + Extra groups of which the user should be a part + + [*manage_group*] + Whether to create a group for or rely on external code for that + + [*service_ensure*] + State ensured for the service (default 'running') + + [*service_enable*] + Whether to enable the service from puppet (default true) + + [*manage_service*] + Should puppet manage the service? (default true) + + [*extract_command*] + Custom command passed to the archive resource to extract the downloaded archive. + + [*init_style*] + Service startup scripts style (e.g. rc, upstart or systemd). + Can also be set to `none` when you don't want the class to create a startup script/unit_file for you. + Typically this can be used when a package is already providing the file. + +#### Parameters + +The following parameters are available in the `prometheus::daemon` defined type. + +##### `version` + +Data type: `String` + + + +##### `real_download_url` + +Data type: `Prometheus::Uri` + + + +##### `notify_service` + +Data type: `Any` + + + +##### `user` + +Data type: `String[1]` + + + +##### `group` + +Data type: `String[1]` + + + +##### `install_method` + +Data type: `String` + + + +Default value: $prometheus::install_method + +##### `download_extension` + +Data type: `String` + + + +Default value: $prometheus::download_extension + +##### `os` + +Data type: `String` + + + +Default value: $prometheus::os + +##### `arch` + +Data type: `String` + + + +Default value: $prometheus::real_arch + +##### `bin_dir` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::bin_dir + +##### `bin_name` + +Data type: `String` + + + +Default value: $name + +##### `package_name` + +Data type: `Optional[String]` + + + +Default value: `undef` + +##### `package_ensure` + +Data type: `String` + + + +Default value: 'installed' + +##### `manage_user` + +Data type: `Boolean` + + + +Default value: `true` + +##### `extra_groups` + +Data type: `Array` + + + +Default value: [] + +##### `manage_group` + +Data type: `Boolean` + + + +Default value: `true` + +##### `purge` + +Data type: `Boolean` + + + +Default value: `true` + +##### `options` + +Data type: `String` + + + +Default value: '' + +##### `init_style` + +Data type: `Prometheus::Initstyle` + + + +Default value: $prometheus::init_style + +##### `service_ensure` + +Data type: `String` + + + +Default value: 'running' + +##### `service_enable` + +Data type: `Boolean` + + + +Default value: `true` + +##### `manage_service` + +Data type: `Boolean` + + + +Default value: `true` + +##### `env_vars` + +Data type: `Hash[String, Scalar]` + + + +Default value: {} + +##### `env_file_path` + +Data type: `Optional[String]` + + + +Default value: $prometheus::env_file_path + +##### `extract_command` + +Data type: `Optional[String[1]]` + + + +Default value: $prometheus::extract_command + +##### `export_scrape_job` + +Data type: `Boolean` + + + +Default value: `false` + +##### `scrape_host` + +Data type: `Stdlib::Host` + + + +Default value: $facts['networking']['fqdn'] + +##### `scrape_port` + +Data type: `Optional[Stdlib::Port]` + + + +Default value: `undef` + +##### `scrape_job_name` + +Data type: `String[1]` + + + +Default value: $name + +##### `scrape_job_labels` + +Data type: `Hash` + + + +Default value: { 'alias' => $scrape_host } + +##### `usershell` + +Data type: `Stdlib::Absolutepath` + + + +Default value: $prometheus::usershell + +### prometheus::scrape_job + +Define: prometheus::scrape_job + +This define is used to export prometheus scrape settings from nodes to be scraped to the node +running prometheus itself. +This can be used to make prometheus find instances of your running service or application. + + [*job_name*] + The name of the scrape job. This will be used when collecting resources on the prometheus node. + Corresponds to the prometheus::collect_scrape_jobs parameter. + + [*targets*] + Array of hosts and ports in the form "host:port" + + [*labels*] + Labels added to the scraped metrics on the prometheus side, as label:values pairs + + [*collect_dir*] + Directory used for collecting scrape definitions. + NOTE: this is a prometheus setting and will be overridden during collection. + +#### Parameters + +The following parameters are available in the `prometheus::scrape_job` defined type. + +##### `job_name` + +Data type: `String[1]` + + + +##### `targets` + +Data type: `Array[String[1]]` + + + +##### `labels` + +Data type: `Hash[String[1], String[1]]` + + + +Default value: {} + +##### `collect_dir` + +Data type: `Stdlib::Absolutepath` + + + +Default value: `undef` + +## Data types + +### Prometheus::Initstyle + +The Prometheus::Initstyle data type. + +Alias of `Enum['sysv', 'redhat', 'systemd', 'sles', 'debian', 'launchd', 'upstart', 'none']` + +### Prometheus::S3Uri + +The Prometheus::S3Uri data type. + +Alias of `Pattern[/^s3:\/\//]` + +### Prometheus::Uri + +The Prometheus::Uri data type. + +Alias of `Variant[Stdlib::HTTPUrl, Stdlib::HTTPSUrl, Prometheus::S3Uri]` + diff --git a/manifests/daemon.pp b/manifests/daemon.pp index 5a7a90568..909f7d6ec 100644 --- a/manifests/daemon.pp +++ b/manifests/daemon.pp @@ -61,7 +61,7 @@ # # [*init_style*] # Service startup scripts style (e.g. rc, upstart or systemd). -# Can also be set to `'none'` when you don't want the class to create a startup script/unit_file for you. +# Can also be set to `none` when you don't want the class to create a startup script/unit_file for you. # Typically this can be used when a package is already providing the file. define prometheus::daemon ( String $version, diff --git a/manifests/postfix_exporter.pp b/manifests/postfix_exporter.pp new file mode 100644 index 000000000..3029b43db --- /dev/null +++ b/manifests/postfix_exporter.pp @@ -0,0 +1,126 @@ +# @summary manages prometheus postfix_exporter +# +# @example Basic usage +# include prometheus::postfix_exporter +# +# @see https://github.com/kumina/postfix_exporter +# +# @param install_method +# Installation method: `url` or `package`. (Note `package` is not available on most OSes.) +# @param download_url +# Complete URL corresponding to the where the release can be downloaded. (This option is only relevant when `install_method` is `url`.) +# @param download_url_base +# Base URL for the binary archive. (This option is only relevant when `install_method` is `url`.) +# @param download_extension +# Extension for the release binary archive. (This option is only relevant when `install_method` is `url`.) +# @param version +# The binary release version. (This option is only relevant when `install_method` is `url`.) +# @param package_ensure +# Used when `install_method` is `package`. +# @param package_name +# Used when `install_method` is `package`. +# @param manage_user +# Whether to create and manage the exporter's user. This can eg. be set to `false` if your package already creates a user for you. +# @param user +# User which runs the service. +# @param manage_group +# Whether to create and manage the exporter's group. This can eg. be set to `false` if your package already creates a group for you. +# @param group +# Group to run the service as. +# @param extra_groups +# Extra groups to add the exporter user to. +# @param manage_service +# Should puppet manage the service? +# @param init_style +# Service startup scripts style. When not set, the correct default for your OS will be used. +# Can also be set to `none` when you don't want the class to create a startup script/unit_file for you. +# Typically this can be used when a package is already providing the file. +# @param service_name +# The name of the service. +# @param service_ensure +# Desired state for the service. +# @param service_enable +# Whether to enable the service from puppet. +# @param extra_options +# Extra options added to the startup command. Override these if you want to monitor a logfile instead of systemd. +# @param restart_on_change +# Should puppet restart the service on configuration change? +# @param export_scrape_job +# Whether to export a `prometheus::scrape_job` to puppetDB for collecting on your prometheus server. +# @param scrape_port +# The port to use in the scrape job. This won't normally need to be changed unless you run the exporter with a non-default port by overriding `extra_options`. +# @param scrape_job_name +# The name of the scrape job. When configuring prometheus with this puppet module, the jobs to be collected are configured with `prometheus::collect_scrape_jobs`. +# @param scrape_job_labels +# Labels to configure on the scrape job. If not set, the `prometheus::daemon` default (`{ 'alias' => $scrape_host }`) will be used. +class prometheus::postfix_exporter ( + # Installation options + Enum['url','package'] $install_method = 'url', + Optional[Stdlib::HTTPUrl] $download_url = undef, + Stdlib::HTTPUrl $download_url_base = 'https://github.com/kumina/postfix_exporter/releases', + String $download_extension = '', + String[1] $version = '0.2.0', + + # Package options (relevant when `install_method == 'package'`) + String[1] $package_ensure = 'installed', + String[1] $package_name = 'postfix_exporter', + + # user/group configuration + Boolean $manage_user = true, + String[1] $user = 'postfix-exporter', + Boolean $manage_group = true, + String[1] $group = 'postfix-exporter', + Array[String[1]] $extra_groups = [], + + # service related options + Boolean $manage_service = true, + Optional[Prometheus::Initstyle] $init_style = undef, + String[1] $service_name = 'postfix_exporter', + Stdlib::Ensure::Service $service_ensure = 'running', + Boolean $service_enable = true, + + # exporter configuration + String $extra_options = '--systemd.enable --systemd.unit=\'postfix.service\' --postfix.logfile_path=\'\'', + Boolean $restart_on_change = true, + + # scrape job configuration + Boolean $export_scrape_job = false, + Stdlib::Port $scrape_port = 9154, + String[1] $scrape_job_name = 'postfix', + Optional[Hash] $scrape_job_labels = undef, +) { + include prometheus + + $real_download_url = pick($download_url,"${download_url_base}/download/${version}/${package_name}") + $notify_service = $restart_on_change ? { + true => Service[$service_name], + default => undef, + } + + prometheus::daemon { $service_name: + install_method => $install_method, + version => $version, + download_extension => $download_extension, + os => $prometheus::os, + arch => $prometheus::real_arch, + real_download_url => $real_download_url, + bin_dir => $prometheus::bin_dir, + notify_service => $notify_service, + package_name => $package_name, + package_ensure => $package_ensure, + manage_user => $manage_user, + user => $user, + extra_groups => $extra_groups, + group => $group, + manage_group => $manage_group, + options => $extra_options, + init_style => $init_style, + service_ensure => $service_ensure, + service_enable => $service_enable, + manage_service => $manage_service, + export_scrape_job => $export_scrape_job, + scrape_port => $scrape_port, + scrape_job_name => $scrape_job_name, + scrape_job_labels => $scrape_job_labels, + } +} diff --git a/spec/acceptance/postfix_exporter_spec.rb b/spec/acceptance/postfix_exporter_spec.rb new file mode 100644 index 000000000..68625eb21 --- /dev/null +++ b/spec/acceptance/postfix_exporter_spec.rb @@ -0,0 +1,36 @@ +require 'spec_helper_acceptance' + +describe 'prometheus postfix exporter' do + describe 'install postfix' do + before do + install_module_from_forge('camptocamp/postfix', '>= 1.8.0 < 2.0.0') + end + it do + pp = 'include postfix' + apply_manifest(pp, catch_failures: true) + apply_manifest(pp, catch_changes: true) + end + end + context 'default version' do + it 'postfix_exporter works idempotently with no errors' do + pp = 'include prometheus::postfix_exporter' + apply_manifest(pp, catch_failures: true) + apply_manifest(pp, catch_changes: true) + end + + describe service('postfix_exporter') do + it { is_expected.to be_running } + it { is_expected.to be_enabled } + end + + describe port(9154) do + it { is_expected.to be_listening.with('tcp6') } + end + + it 'provides postfix metrics' do + shell('curl -s http://127.0.0.1:9154/metrics') do |r| + expect(r.stdout).to match(%r{postfix_smtpd_connects_total}) + end + end + end +end