Skip to content

tombokombo/ansible-process_exporter

This branch is 1 commit ahead of, 9 commits behind cloudalchemy/ansible-process_exporter:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0c7bcf8 Â· Oct 16, 2020

History

48 Commits
Dec 20, 2019
Jan 13, 2020
Oct 7, 2020
Aug 20, 2019
Nov 5, 2019
Nov 14, 2019
Oct 16, 2020
Aug 23, 2019
Oct 21, 2019
Aug 20, 2019
Aug 20, 2019
Nov 16, 2019
Jan 13, 2020
Nov 15, 2019
Oct 7, 2020
Dec 20, 2019
Aug 20, 2019
Oct 7, 2020
Sep 23, 2020
Jun 2, 2020
Jan 13, 2020

Repository files navigation

Ansible Role: process_exporter

Build Status License Ansible Role GitHub tag

Description

Deploy process-exporter using ansible.

Note. This repository and role uses the name process_exporter to conform with ansible galaxy constraints.

Requirements

  • Ansible >= 2.7 (It might work on previous versions, but we cannot guarantee it)

Role Variables

All variables which can be overridden are stored in defaults/main.yml file as well as in table below.

Name Default Value Description
process_exporter_version 0.7.2 Process exporter package version. Also accepts latest as parameter
process_exporter_web_listen_address "0.0.0.0:9256" Address on which process_exporter will listen
process_exporter_config_dir "/etc/process_exporter" Path to directory with process_exporter configuration
process_exporter_names see: defaults/main.yml Processes which should be monitored. Syntax is the same as in https://github.com/ncabatoff/process-exporter#using-a-config-file Default is consistent with deb/rpm packages.

process_exporter_names handling has been set up in an unusual way to handle recommended process-exporter 'Template variables' (such as {{.Comm}}). Follow the example in defaults/main.yml if you want to define custom filtering/grouping of processes that use Template variables and make sure to keep the {% raw %} block delimiters.

Example

Playbook

Use it in a playbook as follows:

- hosts: all
  roles:
    - cloudalchemy.process_exporter

Local Testing

The preferred way of locally testing the role is to use Docker and molecule (v2.x). You will have to install Docker on your system. See "Get started" for a Docker package suitable to for your system. We are using tox to simplify process of testing on multiple ansible versions. To install tox execute:

pip3 install tox

To run tests on all ansible versions (WARNING: this can take some time)

tox

To run a custom molecule command on custom environment with only default test scenario:

tox -e py35-ansible28 -- molecule test -s default

For more information about molecule go to their docs.

If you would like to run tests on remote docker host just specify DOCKER_HOST variable before running tox tests.

Travis CI

Combining molecule and travis CI allows us to test how new PRs will behave when used with multiple ansible versions and multiple operating systems. This also allows use to create test scenarios for different role configurations. As a result we have a quite large test matrix which will take more time than local testing, so please be patient.

Contributing

See contributor guideline.

Troubleshooting

See troubleshooting.

License

This project is licensed under MIT License. See LICENSE for more details.

About

Provision process exporter for prometheus monitoring tool

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 65.2%
  • Python 23.2%
  • HTML 11.6%