{"id":13753684,"url":"https://github.com/ernestas-poskus/ansible-prometheus","last_synced_at":"2025-09-04T04:11:57.181Z","repository":{"id":53595966,"uuid":"67443303","full_name":"ernestas-poskus/ansible-prometheus","owner":"ernestas-poskus","description":"Ansible playbook for installing Prometheus monitoring system, exporters such as: node, snmp, blackbox, thus alert manager and push gateway","archived":false,"fork":false,"pushed_at":"2021-03-22T10:23:37.000Z","size":500,"stargazers_count":92,"open_issues_count":1,"forks_count":39,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-15T18:17:34.749Z","etag":null,"topics":["alertmanager","ansible","blackbox","blackbox-exporter","node-exporter","playbook","prometheus","prometheus-exporter","prometheus2","pushgateway","snmp-exporter","systemd"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ernestas-poskus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-05T18:43:03.000Z","updated_at":"2024-04-26T23:16:56.000Z","dependencies_parsed_at":"2022-09-05T07:11:52.281Z","dependency_job_id":null,"html_url":"https://github.com/ernestas-poskus/ansible-prometheus","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernestas-poskus%2Fansible-prometheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernestas-poskus%2Fansible-prometheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernestas-poskus%2Fansible-prometheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ernestas-poskus%2Fansible-prometheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ernestas-poskus","download_url":"https://codeload.github.com/ernestas-poskus/ansible-prometheus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249126000,"owners_count":21216705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["alertmanager","ansible","blackbox","blackbox-exporter","node-exporter","playbook","prometheus","prometheus-exporter","prometheus2","pushgateway","snmp-exporter","systemd"],"created_at":"2024-08-03T09:01:27.274Z","updated_at":"2025-04-15T18:17:43.807Z","avatar_url":"https://github.com/ernestas-poskus.png","language":"Ruby","funding_links":[],"categories":["systemd","Deployment tools"],"sub_categories":[],"readme":"ansible-prometheus\n=========\n\n[![Build Status](https://travis-ci.org/ernestas-poskus/ansible-prometheus.svg?branch=master)](https://travis-ci.org/ernestas-poskus/ansible-prometheus)\n\nAnsilbe playbook for installing Prometheus monitoring system.\n\nPlaybook installs and manages services using systemd. Currently supported:\n  - Prometheus\n  - Node Exporter (collects metrics of host machine)\n  - Alert manager\n  - Push gateway\n  - SNMP exporter\n  - Blackbox exporter\n\nPlaybook includes extensive configuration options check default/main.yml\n\nContribution\n------------\n\nIf you can't find exporter you need check these examples\n[#47](https://github.com/ernestas-poskus/ansible-prometheus/pull/47) or [#50](https://github.com/ernestas-poskus/ansible-prometheus/pull/50)\nand make pull request.\n\nInstallation\n------------\n\nansible-galaxy install ernestas-poskus.ansible-prometheus\n\nRequirements\n------------\n\nSystemd\n\nRole Variables\n--------------\n\n```yaml\n---\n# defaults file for ansible-prometheus\n\nprometheus_install: true\nprometheus_node_exporter_install: true\nprometheus_alert_manager_install: true\nprometheus_push_gateway_install: false\nprometheus_snmp_exporter_install: false\nprometheus_blackbox_exporter_install: false\n\nprometheus_owner: 'prometheus'\nprometheus_group: 'prometheus'\n\nprometheus_install_dir: '/usr/local/opt'\nprometheus_config_dir: '/etc/prometheus'\nprometheus_lib_dir: '/var/lib/prometheus'\nprometheus_rules_dir: \"{{ prometheus_config_dir }}/rules\"\n\nprometheus_data_dir: \"{{ prometheus_lib_dir }}/prometheus2\"\nprometheus_alert_manager_data_dir: \"{{ prometheus_lib_dir }}/alertmanager\"\nprometheus_alert_manager_config_dir: \"{{ prometheus_config_dir }}/alertmanager\"\nprometheus_alert_manager_templates_dir: \"{{ prometheus_config_dir }}/alertmanager/templates\"\nprometheus_snmp_exporter_config_dir: \"{{ prometheus_config_dir }}/snmpexporter\"\nprometheus_blackbox_exporter_config_dir: \"{{ prometheus_config_dir }}/blackboxexporter\"\n\n# Prometheus\nprometheus_version: '2.25.1'\nprometheus_platform_architecture: 'linux-amd64'\n\n# Number of open file allowed, value for LimitNOFILE\nprometheus_service_limitnofile: infinity\n\n# Node exporter\nprometheus_node_exporter_version: '1.1.2'\n\n# Alert manager\nprometheus_alert_manager_version: '0.21.0'\n\n# Pushgateway\nprometheus_push_gateway_version: '1.4.0'\n\n# SNMP exporter\nprometheus_snmp_exporter_version: '0.20.0'\n\n# Blackbox exporter\nprometheus_blackbox_exporter_version: '0.18.0'\n```\n\n[DOCS: Prometheus variables](https://github.com/ernestas-poskus/ansible-prometheus/blob/master/docs/prometheus.md)\n\n[DOCS: Node exporter variables](https://github.com/ernestas-poskus/ansible-prometheus/blob/master/docs/node_exporter.md)\n\n[DOCS: Alert manager variables](https://github.com/ernestas-poskus/ansible-prometheus/blob/master/docs/alert_manager.md)\n\n[DOCS: Pushgateway variables](https://github.com/ernestas-poskus/ansible-prometheus/blob/master/docs/push_gateway.md)\n\n[DOCS: SNMP exporter variables](https://github.com/ernestas-poskus/ansible-prometheus/blob/master/docs/snmp_exporter.md)\n\n[DOCS: Blackbox exporter variables](https://github.com/ernestas-poskus/ansible-prometheus/blob/master/docs/blackbox_exporter.md)\n\nDependencies\n------------\n\nNone.\n\nExample Playbook\n----------------\n\nIncluding an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:\n\n```yaml\n- name: Installing Prometheus on hosted machine\n  hosts: vagrant1\n  sudo: yes\n  roles:\n    - role: ansible-prometheus\n      prometheus_config_scrape_configs:\n        - job_name: 'prometheus'\n          honor_labels: true\n          scrape_interval: '15s'\n          scrape_timeout: '3s'\n          metrics_path: '/metrics'\n          scheme: 'http'\n          static_configs:\n            - targets:\n                - 'localhost:9090' # Prometheus itself\n                - 'localhost:9100' # Node exporter\n        - job_name: 'consul-services'\n          consul_sd_configs:\n            - server: \"localhost:8500\"\n```\n\nLicense\n-------\n\nCopyright (c) 2021, Ernestas Poskus\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n* Redistributions of source code must retain the above copyright notice, this\n  list of conditions and the following disclaimer.\n\n* Redistributions in binary form must reproduce the above copyright notice,\n  this list of conditions and the following disclaimer in the documentation\n  and/or other materials provided with the distribution.\n\n* Neither the name of ansible-prometheus nor the names of its\n  contributors may be used to endorse or promote products derived from\n  this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\nAuthor Information\n------------------\n\nTwitter: @ernestas_poskus\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fernestas-poskus%2Fansible-prometheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fernestas-poskus%2Fansible-prometheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fernestas-poskus%2Fansible-prometheus/lists"}