{"id":16130041,"url":"https://github.com/atosatto/ansible-prometheus","last_synced_at":"2025-03-18T14:30:51.529Z","repository":{"id":71072058,"uuid":"118232220","full_name":"atosatto/ansible-prometheus","owner":"atosatto","description":"An Ansible role to install and configure Prometheus (https://prometheus.io)","archived":false,"fork":false,"pushed_at":"2020-04-03T18:39:19.000Z","size":47,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T10:04:08.888Z","etag":null,"topics":["ansible","molecule","monitoring","prometheus"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/atosatto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2018-01-20T10:22:27.000Z","updated_at":"2024-01-13T10:31:28.000Z","dependencies_parsed_at":"2024-02-19T15:00:52.725Z","dependency_job_id":null,"html_url":"https://github.com/atosatto/ansible-prometheus","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atosatto%2Fansible-prometheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atosatto%2Fansible-prometheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atosatto%2Fansible-prometheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/atosatto%2Fansible-prometheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/atosatto","download_url":"https://codeload.github.com/atosatto/ansible-prometheus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933413,"owners_count":20370987,"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":["ansible","molecule","monitoring","prometheus"],"created_at":"2024-10-09T22:14:17.584Z","updated_at":"2025-03-18T14:30:51.521Z","avatar_url":"https://github.com/atosatto.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ansible Role: Prometheus\n========================\n\n[![Build Status](https://travis-ci.org/atosatto/ansible-prometheus.svg?branch=master)](https://travis-ci.org/atosatto/ansible-prometheus)\n[![Galaxy](https://img.shields.io/badge/galaxy-atosatto.prometheus-blue.svg?style=flat-square)](https://galaxy.ansible.com/atosatto/prometheus)\n\nInstall and configure Prometheus.\n\nRequirements\n------------\n\nAn Ansible 2.2 or higher installation.\u003cbr /\u003e\nThis role makes use of the Ansible `json_filter` that requires `jmespath` to be installed on the Ansible machine.\nSee the `requirements.txt` file for further details on the specific version of `jmespath` required by the role.\n\nRole Variables\n--------------\n\nAvailable variables are listed below, along with default values (see defaults/main.yml):\n\n    prometheus_release_tag: \"latest\"\n\nThe Prometheus release to be installed.\nBy default, the latest release published at https://github.com/prometheus/prometheus/releases.\n\n    prometheus_release_url: \"\"\n\nIf set, the role will download Prometheus from the provided URL instead of using the download URL indicated in the Prometheus Github release metadata.\n\n    prometheus_user: \"prometheus\"\n    prometheus_group: \"prometheus\"\n\nPrometheus system user and group.\n\n    prometheus_install_path: \"/opt\"\n\nDirectory containing the downloaded Prometheus release artifacts.\n\n    prometheus_bin_path: \"/usr/local/bin\"\n\nDirectory to which the Prometheus binaries will be symlinked.\n\n    prometheus_config_path: \"/etc/prometheus\"\n    prometheus_config_file: \"prometheus.yml\"\n\nPrometheus configuration file and directory\n\n    prometheus_config: {}\n\nYAML dictionary holding the Prometheus configuration.\nThe complete Prometheus configuration reference can be found at\nhttps://prometheus.io/docs/prometheus/latest/configuration/configuration/.\u003cbr/\u003e\n**NOTE**: the provided prometheus configuration will be merged with the default one defined in `vars/main.yml`.\n\n    prometheus_rule_files_path: \"{{ prometheus_config_path }}/rules\"\n    prometheus_rule_files: {}\n    # e.g.\n    # prometheus_rule_files:\n    # alertmanager: |\n    #   groups:\n    #     - name: alertmanager.rules\n    #       rules:\n    #         - alert: AlertmanagerNotificationsFailing\n    #           expr: rate(alertmanager_notifications_failed_total[1m]) \u003e 0\n    #           for: 1m\n    #           labels:\n    #             service: alertmanager\n    #             severity: critical\n    #           annotations:\n    #             title: Alertmanager is failing sending notications\n    #             description: Alertmanager is seeing errors for integration {{$labels.integration}}\n\nDictionary of Prometheus rule files to be created into the specified `prometheus_rule_files_path`.\n\n    prometheus_listen_address: \"127.0.0.1:9090\"\n\nThe Prometheus WebServer listen ip address and port.\u003cbr/\u003e\n**NOTE**: the Prometheus metrics will be available at `{{ prometheus_listen_address }}/metrics`.\n\n    prometheus_tsdb_path: \"/var/lib/prometheus\"\n    prometheus_tsdb_retention: |-\n      {%- if prometheus_release_tag == 'latest' or prometheus_release_tag | regex_replace('^v(.*)$', '\\\\1') is version_compare('2.0.0', '\u003e=') -%}\n      15d\n      {%- else -%}\n      360h0m0s\n      {%- endif -%}\n\nDirectory containing the Prometheus time-series database files.\nBy default, the old data will be deleted after 14 days.\nAn in depth analysis of the Operational Aspects of Prometheus Storage is available at\nhttps://prometheus.io/docs/prometheus/latest/storage/#operational-aspects.\n\n    prometheus_log_level: \"info\"\n\nPrometheus deamon log verbosity level.\n\n    prometheus_additional_cli_args: \"\"\n\nAdditional command-line arguments to be added to the Prometheus service unit.\nFor the complete refence of the available CLI arguments please refer to the output\nof the `prometheus --help` command.\n\nDependencies\n------------\n\nNone.\n\nExample Playbooks\n-----------------\n\n    $ cat playbook.yml\n    - name: \"Install and configure Prometheus\"\n      hosts: all\n      roles:\n        - { role: atosatto.prometheus }\n\nTesting\n-------\n\nTests are automated with [Molecule](http://molecule.readthedocs.org/en/latest/).\n\n    $ pip install tox\n\nTo test all the scenarios run\n\n    $ tox\n\nTo run a custom molecule command\n\n    $ tox -e py27-ansible29 -- molecule test -s prometheus-latest\n\nLicense\n-------\n\nMIT\n\nAuthor Information\n------------------\n\nAndrea Tosatto ([@\\_hilbert\\_](https://twitter.com/_hilbert_))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatosatto%2Fansible-prometheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fatosatto%2Fansible-prometheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fatosatto%2Fansible-prometheus/lists"}