{"id":13463773,"url":"https://github.com/voxpupuli/puppet-prometheus","last_synced_at":"2026-04-04T12:57:31.681Z","repository":{"id":37579822,"uuid":"52801143","full_name":"voxpupuli/puppet-prometheus","owner":"voxpupuli","description":"Puppet module for prometheus","archived":false,"fork":false,"pushed_at":"2026-03-30T07:47:36.000Z","size":2777,"stargazers_count":60,"open_issues_count":36,"forks_count":248,"subscribers_count":34,"default_branch":"master","last_synced_at":"2026-04-02T11:49:04.901Z","etag":null,"topics":["archlinux-puppet-module","centos-puppet-module","debian-puppet-module","hacktoberfest","linux-puppet-module","puppet","redhat-puppet-module","ubuntu-puppet-module"],"latest_commit_sha":null,"homepage":"https://forge.puppet.com/puppet/prometheus","language":"Puppet","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"bastelfreak/puppet-prometheus2","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/voxpupuli.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"vox-pupuli","github":"voxpupuli"}},"created_at":"2016-02-29T15:20:39.000Z","updated_at":"2026-03-30T07:47:38.000Z","dependencies_parsed_at":"2025-12-03T14:08:55.689Z","dependency_job_id":null,"html_url":"https://github.com/voxpupuli/puppet-prometheus","commit_stats":{"total_commits":959,"total_committers":139,"mean_commits":6.899280575539568,"dds":0.589155370177268,"last_synced_commit":"3c694685604adfb69dafb347807f0dc7d7f2285f"},"previous_names":["brutus333/puppet-prometheus"],"tags_count":69,"template":false,"template_full_name":null,"purl":"pkg:github/voxpupuli/puppet-prometheus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-prometheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-prometheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-prometheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-prometheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voxpupuli","download_url":"https://codeload.github.com/voxpupuli/puppet-prometheus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voxpupuli%2Fpuppet-prometheus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31400460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["archlinux-puppet-module","centos-puppet-module","debian-puppet-module","hacktoberfest","linux-puppet-module","puppet","redhat-puppet-module","ubuntu-puppet-module"],"created_at":"2024-07-31T14:00:28.324Z","updated_at":"2026-04-04T12:57:31.652Z","avatar_url":"https://github.com/voxpupuli.png","language":"Puppet","funding_links":["https://opencollective.com/vox-pupuli","https://github.com/sponsors/voxpupuli"],"categories":["Tools"],"sub_categories":[],"readme":"# puppet-prometheus\n\n[![Build Status](https://github.com/voxpupuli/puppet-prometheus/workflows/CI/badge.svg)](https://github.com/voxpupuli/puppet-prometheus/actions?query=workflow%3ACI)\n[![Release](https://github.com/voxpupuli/puppet-prometheus/actions/workflows/release.yml/badge.svg)](https://github.com/voxpupuli/puppet-prometheus/actions/workflows/release.yml)\n[![Puppet Forge](https://img.shields.io/puppetforge/v/puppet/prometheus.svg)](https://forge.puppetlabs.com/puppet/prometheus)\n[![Puppet Forge - downloads](https://img.shields.io/puppetforge/dt/puppet/prometheus.svg)](https://forge.puppetlabs.com/puppet/prometheus)\n[![Puppet Forge - endorsement](https://img.shields.io/puppetforge/e/puppet/prometheus.svg)](https://forge.puppetlabs.com/puppet/prometheus)\n[![Puppet Forge - scores](https://img.shields.io/puppetforge/f/puppet/prometheus.svg)](https://forge.puppetlabs.com/puppet/prometheus)\n[![Apache-2 License](https://img.shields.io/github/license/voxpupuli/puppet-prometheus.svg)](LICENSE)\n\n## Table of Contents\n\n- [puppet-prometheus](#puppet-prometheus)\n  - [Table of Contents](#table-of-contents)\n  - [Compatibility](#compatibility)\n  - [Background](#background)\n    - [What This Module Affects](#what-this-module-affects)\n    - [Example Usage](#example-usage)\n    - [Monitored Nodes](#monitored-nodes)\n  - [Example](#example)\n    - [How to Automatically Generate Scrape Configs](#how-to-automatically-generate-scrape-configs)\n  - [Known issues](#known-issues)\n  - [Development](#development)\n    - [Component versions](#component-versions)\n  - [Transfer Notice](#transfer-notice)\n\n----\n\n## Compatibility\n\nThis module supports below Prometheus architectures:\n- x86_64/amd64\n- i386\n- armv71 (Tested on raspberry pi 3)\n\nThe `prometheus::ipmi_exporter` and `prometheus::cgroup_exporter` classes have a dependency on [saz/sudo](https://forge.puppet.com/modules/saz/sudo) Puppet module.\n\n## Background\n\nThis module automates the install and configuration of Prometheus monitoring tool: [Prometheus web site](https://prometheus.io/docs/introduction/overview/)\n\n### What This Module Affects\n\n* Installs the prometheus daemon, alertmanager or exporters(via url or package)\n  * The package method was implemented, but currently there isn't any package for prometheus\n* Optionally installs a user to run it under (per exporter)\n* Installs a configuration file for prometheus daemon (/etc/prometheus/prometheus.yaml) or for alertmanager (/etc/prometheus/alert.rules)\n* Manages the services via sysv, or systemd\n* Optionally creates alert rules\n\n### Example Usage\n\n```puppet\nclass { 'prometheus::server':\n  version        =\u003e '2.52.0',\n  alerts         =\u003e {\n    'groups' =\u003e [\n      {\n        'name'  =\u003e 'alert.rules',\n        'rules' =\u003e [\n          {\n            'alert'       =\u003e 'InstanceDown',\n            'expr'        =\u003e 'up == 0',\n            'for'         =\u003e '5m',\n            'labels'      =\u003e {\n              'severity' =\u003e 'page',\n            },\n            'annotations' =\u003e {\n              'summary'     =\u003e 'Instance {{ $labels.instance }} down',\n              'description' =\u003e '{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes.'\n            }\n          },\n        ],\n      },\n    ],\n  },\n  scrape_configs =\u003e [\n    {\n      'job_name'        =\u003e 'prometheus',\n      'scrape_interval' =\u003e '10s',\n      'scrape_timeout'  =\u003e '10s',\n      'static_configs'  =\u003e [\n        {\n          'targets' =\u003e [ 'localhost:9090' ],\n          'labels'  =\u003e {\n            'alias' =\u003e 'Prometheus',\n          }\n        }\n      ],\n    },\n  ],\n}\n```\n\n\n### Monitored Nodes\n\n```puppet\ninclude prometheus::node_exporter\n```\n\nor:\n\n```puppet\nclass { 'prometheus::node_exporter':\n  version            =\u003e '0.27.0',\n  collectors_disable =\u003e ['loadavg', 'mdadm'],\n}\n```\n\n\n## Example\n\nReal Prometheus \u003e=2.0.0 setup example including alertmanager and slack_configs.\n\n```puppet\nclass { 'prometheus':\n  manage_prometheus_server =\u003e true,\n  version                  =\u003e '2.52.0',\n  alerts                   =\u003e {\n    'groups' =\u003e [\n      {\n        'name'  =\u003e 'alert.rules',\n        'rules' =\u003e [\n          {\n            'alert'       =\u003e 'InstanceDown',\n            'expr'        =\u003e 'up == 0',\n            'for'         =\u003e '5m',\n            'labels'      =\u003e {'severity' =\u003e 'page'},\n            'annotations' =\u003e {\n              'summary'     =\u003e 'Instance {{ $labels.instance }} down',\n              'description' =\u003e '{{ $labels.instance }} of job {{ $labels.job }} has been down for more than 5 minutes.'\n            },\n          },\n        ],\n      },\n    ],\n  },\n  scrape_configs           =\u003e [\n    {\n      'job_name'        =\u003e 'prometheus',\n      'scrape_interval' =\u003e '10s',\n      'scrape_timeout'  =\u003e '10s',\n      'static_configs'  =\u003e [\n        {\n          'targets' =\u003e ['localhost:9090'],\n          'labels'  =\u003e {'alias' =\u003e 'Prometheus'}\n        }\n      ],\n    },\n    {\n      'job_name'        =\u003e 'node',\n      'scrape_interval' =\u003e '5s',\n      'scrape_timeout'  =\u003e '5s',\n      'static_configs'  =\u003e [\n        {\n          'targets' =\u003e ['nodexporter.domain.com:9100'],\n          'labels'  =\u003e {'alias' =\u003e 'Node'}\n        },\n      ],\n    },\n  ],\n  alertmanagers_config     =\u003e [\n    {\n      'static_configs' =\u003e [{'targets' =\u003e ['localhost:9093']}],\n    },\n  ],\n}\n\nclass { 'prometheus::alertmanager':\n  version   =\u003e '0.27.0',\n  route     =\u003e {\n    'group_by'        =\u003e ['alertname', 'cluster', 'service'],\n    'group_wait'      =\u003e '30s',\n    'group_interval'  =\u003e '5m',\n    'repeat_interval' =\u003e '3h',\n    'receiver'        =\u003e 'slack',\n  },\n  receivers =\u003e [\n    {\n      'name'          =\u003e 'slack',\n      'slack_configs' =\u003e [\n        {\n          'api_url'       =\u003e 'https://hooks.slack.com/services/ABCDEFG123456',\n          'channel'       =\u003e '#channel',\n          'send_resolved' =\u003e true,\n          'username'      =\u003e 'username'\n        },\n      ],\n    },\n  ],\n}\n```\n\nAnd if you want to use Hiera to declare the values instead, you can simply include the `prometheus` class and set your Hiera data as shown below:\n\n**Puppet Code**\n```puppet\ninclude prometheus\n```\n\n**Hiera Data (in yaml)**\n```yaml\n---\nprometheus::manage_prometheus_server: true\n\nprometheus::version: '2.52.0'\n\nprometheus::alerts:\n  groups:\n    - name: 'alert.rules'\n      rules:\n        - alert: 'InstanceDown'\n          expr: 'up == 0'\n          for: '5m'\n          labels:\n            severity: 'page'\n          annotations:\n            summary: 'Instance {{ $labels.instance }} down'\n            description: '{{ $labels.instance }} of job {{ $labels.job }} has been\n              down for more than 5 minutes.'\n\nprometheus::scrape_configs:\n  - job_name: 'prometheus'\n    scrape_interval: '10s'\n    scrape_timeout: '10s'\n    static_configs:\n      - targets:\n          - 'localhost:9090'\n        labels:\n          alias: 'Prometheus'\n  - job_name: 'node'\n    scrape_interval: '10s'\n    scrape_timeout: '10s'\n    static_configs:\n      - targets:\n          - 'nodexporter.domain.com:9100'\n        labels:\n          alias: 'Node'\n\nprometheus::alertmanagers_config:\n  - static_configs:\n      - targets:\n          - 'localhost:9093'\n\nprometheus::alertmanager::version: '0.27.0'\n\nprometheus::alertmanager::route:\n  group_by:\n    - 'alertname'\n    - 'cluster'\n    - 'service'\n  group_wait: '30s'\n  group_interval: '5m'\n  repeat_interval: '3h'\n  receiver: 'slack'\n\nprometheus::alertmanager::receivers:\n  - name: 'slack'\n    slack_configs:\n      - api_url: 'https://hooks.slack.com/services/ABCDEFG123456'\n        channel: \"#channel\"\n        send_resolved: true\n        username: 'username'\n```\n\n### How to Automatically Generate Scrape Configs\n\nYou can dynamically generate scrape configurations using exported resources. For any exporter\nmanaged by this module, you can enable this feature with a simple parameter. This exports the\nscrape job definition from the monitored node.\n\n```puppet\nclass {'prometheus::node_exporter':\n  # set this to true to export the scrape job for any\n  # prometheus exporter defined by this module\n  export_scrape_job =\u003e true,\n  # ... other parameters\n}\n```\n\nFor custom exporters not managed by this module, you can\nmanually define and export a `prometheus::scrape_job` resource:\n\n```puppet\n# on a node with a custom prometheus exporter\n@@prometheus::scrape_job { \"myjob-${facts['networking']['fqdn']}\":\n  job_name =\u003e 'myjob',\n  targets  =\u003e [\n    \"${facts['networking']['fqdn']}:1234\",\n  ],\n  labels   =\u003e {\n    foo =\u003e 'bar',\n  },\n}\n```\n\nOn your Prometheus server, you then collect these exported resources\nby defining `prometheus::collect_scrape_jobs`. You can also add or override\nany scrape configuration parameters.\n\n```yaml\n# In your Prometheus server's Hiera data\nprometheus::collect_scrape_jobs:\n  # corresponds to the job_name from the node_exporter\n  - job_name: 'node'\n  - job_name: 'myjob'\n    # add or override any scrape parameters for this job\n    metrics_path: /custom\n    scheme: https\n```\n\nThis setup instructs the Prometheus server to collect all exported\n`scrape_job` resources that match the specified `job_name` values.\nThe module then generates file-based service discovery\nconfigurations, resulting in a `prometheus.yaml` entry similar to this:\n\n```yaml\n# /etc/prometheus/prometheus.yaml\nscrape_configs:\n- job_name: myjob\n  metrics_path: /custom\n  scheme: https\n  file_sd_configs:\n  - files:\n    - \"/etc/prometheus/file_sd_config.d/myjob_*.yaml\"\n# ... other jobs\n```\n\nWithin the directory `/etc/prometheus/file_sd_configs.d`,\nyou will find the configuration files for each target\ndefined by the exported `scrape_job` resource. Example:\n\n```yaml\n- targets:\n  - \u003chost.example.org\u003e:1234\n  labels:\n    foo: bar\n```\n\n## Known issues\n\nPostfix is not supported on Archlinux because it relies on puppet-postfix, which does not support Archlinux.\n\n## Development\n\nSee https://voxpupuli.org/docs/how_to_run_tests/ for information on how to run test locally.\n\n### Component versions\n\nFor this repository a renovate github action is enabled. It will create PRs for updating the versions of the components. Each version defintion (in data/defaults.yaml or in the manifests directly) has a comment in the form of `# renovate: depName=\u003cgithub-repo-slug\u003e` which is used by renovate to identify the components to update. If new components (usually exporters) are added, please ensure to add the comment to the version definition.\nThe PRs created by renovate have to be classified on a case-by-case basis by the reiviewer. Most of these PRs should be simple einhancements, but some might require more attention and be classiefied as backward-incompatible.\n\n## Transfer Notice\nThis plugin was originally authored by [brutus333](https://github.com/brutus333/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-prometheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoxpupuli%2Fpuppet-prometheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoxpupuli%2Fpuppet-prometheus/lists"}