0x0i.prometheus

<p><img src="https://code.benco.io/icon-collection/logos/ansible.svg" alt="ansible logo" title="ansible" align="left" height="60" /></p>
<p><img src="https://cdn.worldvectorlogo.com/logos/prometheus.svg" alt="prometheus logo" title="prometheus" align="right" height="60" /></p>

Ansible Role :fire: :straight_ruler: Prometheus
=========
[![Galaxy Role](https://img.shields.io/ansible/role/d/0x0i/prometheus)](https://galaxy.ansible.com/0x0I/prometheus)
![Latest Release](https://img.shields.io/github/v/release/0x0I/ansible-role-prometheus?color=yellow)
[![License](https://img.shields.io/badge/License-MIT-blueviolet.svg)](https://opensource.org/licenses/MIT)

**Contents**
  - [Supported Platforms](#supported-platforms)
  - [Requirements](#requirements)
  - [Role Variables](#role-variables)
      - [Install](#install)
      - [Config](#config)
      - [Launch](#launch)
      - [Uninstall](#uninstall)
  - [Dependencies](#dependencies)
  - [Example Playbook](#example-playbook)
  - [License](#license)
  - [Author Information](#author-information)

This Ansible role helps you install and set up Prometheus, a tool for monitoring and alerting that handles time-series data.

##### Supported Platforms:
  • Debian
  • Redhat (CentOS/Fedora)
  • Ubuntu

Requirements
------------

You need to have the `unzip/gtar` tool installed on the target host. Check the ansible `unarchive` module [here](https://docs.ansible.com/ansible/latest/modules/unarchive_module.html#notes) for details.

Role Variables
--------------
Variables are organized based on the stages of software and machine setup:
* _install_
* _config_
* _launch_
* _uninstall_

#### Install

`prometheus` and its `alertmanager` can be installed from compressed files (`.tar`, `.zip`), which you can download from various sources.

_You can customize these variables to control the installation, including software version and source location:_

`managed_services: <list-of-services (prometheus | alertmanager)>` (**default**: *['prometheus']*)
- List of services to manage with this role.

`prometheus_user: <service-user-name>` (**default**: *prometheus*)
- The user and group under which Prometheus runs.

`install_dir: </path/to/installation/dir>` (**default**: `/opt/prometheus`)
- Directory on the host for Prometheus binaries.

`archive_url: <path-or-url-to-archive>` (**default**: see `defaults/main.yml`)
- URL of the compressed **tar or zip** file containing Prometheus binaries.

`archive_checksum: <path-or-url-to-checksum>` (**default**: see `defaults/main.yml`)
- Address of a checksum file for verifying the integrity of the Prometheus archive.

`alertmgr_installdir: </path/to/installation/dir>` (**default**: `/opt/alertmanager`)
- Path on target host for Alertmanager binaries.

`filesd_path: </path/to/file-sd-files>` (**default**: `{{ install_dir }}/filesd`)
- Directory for storing Prometheus file discovery files.

#### Config

With this role, you can set up the configuration for your Prometheus installation, including the configuration files for Prometheus and Alertmanager.

`config_dir: </path/to/configuration/dir>` (**default**: `{{ install_dir }}`)
- Directory for storing Prometheus config files.

#### Launch

This role supports starting up both Prometheus and Alertmanager using systemctl to manage them as system services.

###### Prometheus

`extra_run_args: <prometheus-cli-options>` (**default**: `[]`)
- Extra command-line options for running Prometheus.

###### Alertmanager

`extra_alertmgr_args: <alertmanager-cli-options>` (**default**: `[]`)
- Extra command-line options for running Alertmanager.

#### Uninstall

This role also supports uninstalling Prometheus and cleaning up any leftovers from the installation.

`perform_uninstall: <true | false>` (**default**: `false`)
- Specify whether to remove all artifacts from the Prometheus installation.

Dependencies
------------

- 0x0i.systemd

Example Playbook
----------------
Here's a basic example:
  • hosts: all roles:
    • role: 0x0I.prometheus

To only install and manage the Prometheus service:
  • hosts: all roles:
    • role: 0x0I.prometheus vars: managed_services: ['prometheus']

To install a specific version:

License
-------

MIT

Author Information
------------------

This role was created in 2019 by O1.IO.
Informazioni sul progetto

Prometheus - a multi-dimensional time-series data monitoring and alerting toolkit

Installa
ansible-galaxy install 0x0i.prometheus
Licenza
Unknown
Download
923
Proprietario