Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
be9f246
patch: :tada: automated upstream release update
prombot Jan 9, 2025
b266102
patch: :tada: automated upstream release update
prombot Jan 11, 2025
da3935e
pushgateway extra parameters
weakcamel Mar 22, 2024
5ebfc2f
update pushgateway docs
weakcamel Apr 10, 2024
9fe2af2
Update roles/pushgateway/defaults/main.yml
speechmatics-bot Jul 31, 2024
e8a43f9
chore: update version
gardar Jan 12, 2025
710f80c
Use variables from ansible_facts
kleini Nov 28, 2024
00d1941
patch: :tada: automated upstream release update
prombot Jan 16, 2025
bb01a02
Add role for elasticsearch_exporter
juju4 Jan 18, 2025
bbd6cd5
ci: fix arguments-spec-lint
juju4 Jan 18, 2025
2869295
ci: add test/integration/targets
juju4 Jan 19, 2025
58914ee
Add check_mode to the checksum task
santilococo Jan 28, 2025
e0f2d82
Use check_mode in the checksum block
santilococo Jan 28, 2025
ec1dc47
patch: :tada: automated upstream release update
prombot Jan 22, 2025
fa2373c
Switch release to ansible-core
SuperQ Jan 27, 2025
a36c978
chore: update version
SuperQ Jan 28, 2025
d26d930
fix: use throttle: 1 for localhost unarchive
travisdowns Dec 20, 2024
2a6d459
patch: :tada: automated upstream release update
prombot Feb 7, 2025
a849d8d
chore: update version
gardar Feb 7, 2025
b76770c
feat: Add consul_exporter role
anviar Jan 15, 2025
b0c0cf3
test: add ansible-test integration for consul_exporter and fix version
anviar Jan 15, 2025
061f976
Update roles/consul_exporter/tasks/main.yml
anviar Jan 15, 2025
4a564c8
Update roles/consul_exporter/tasks/main.yml
anviar Jan 15, 2025
51f47f1
Update roles/consul_exporter/tasks/main.yml
anviar Jan 15, 2025
67fd6d3
Update roles/consul_exporter/tasks/main.yml
anviar Jan 15, 2025
4f434c1
Update roles/consul_exporter/tasks/main.yml
anviar Jan 15, 2025
1e6ca38
fix: :white_check_mark: fix molecule alternative version
anviar Jan 23, 2025
ee879a9
fix: :white_check_mark: fix molecule alternative listen addr
anviar Jan 23, 2025
586e534
fix: :white_check_mark: fix configuration logic for consul exporter
anviar Jan 27, 2025
5f1ca6d
fix: :bug: consul_exporter fix systemd template
anviar Jan 28, 2025
c59f5d3
fix: consul_exporter install dir
anviar Jan 31, 2025
84e0c63
chore: update version
gardar Feb 7, 2025
df50e7e
fix: identation in service file
Feb 7, 2025
0e381b4
chore: update version
gardar Feb 7, 2025
13b171c
patch: :tada: automated upstream release update
prombot Feb 13, 2025
47eed58
chore: update version
gardar Feb 14, 2025
64c35e2
fix: switch to ansible_facts
juju4 Feb 22, 2025
d3b2d66
fix: switch to ansible_facts (2)
juju4 Feb 22, 2025
d8eb784
fix: switch to ansible_facts (3)
juju4 Feb 22, 2025
6db40aa
fix: align on elastic-exp group name
juju4 Feb 22, 2025
a9f7b05
refactor(snmp_exporter): Start the daemon using the account made by `…
umatare5 Dec 10, 2024
0f5ca31
refactor(alertmanager): Start the daemon using the account made by `_…
umatare5 Dec 10, 2024
0db8a3d
fix: add `enabled: true` to alertmanager
sugyan Feb 8, 2025
e57c79d
remove check_mode condition, add tags
sugyan Feb 10, 2025
120a4b5
chore: update version
gardar Feb 18, 2025
5b6c6b5
feature: Add apache exporter
Feb 7, 2025
5399e0a
chore: code review & linting
Feb 8, 2025
f1859ec
Update roles/apache_exporter/tasks/main.yml
tbauriedel Feb 11, 2025
dafd342
chore: update version
gardar Feb 18, 2025
d6d3df5
patch: :tada: automated upstream release update
prombot Feb 17, 2025
e3abb98
patch: :tada: automated upstream release update
prombot Feb 18, 2025
45da8cd
chore: update version
gardar Feb 18, 2025
1314bbc
chore: update version
gardar Feb 19, 2025
769d970
minor: bump support for ansible from v2.17.* to v2.18.*
gardar Feb 19, 2025
7f40590
fix: add sanity ignore for ansible 2.18
gardar Feb 19, 2025
81aaf1c
fix: skip testing ansible 2.18 on almalinux 8
gardar Feb 19, 2025
dbd0476
chore: update version
gardar Feb 19, 2025
ceb0f54
patch: :tada: automated upstream release update
prombot Mar 5, 2025
a05a8db
chore(deps): update svenstaro/upload-release-action digest to 04733e0
renovate[bot] Mar 17, 2025
1374465
patch: :tada: automated upstream release update
prombot Mar 18, 2025
41bb034
chore(deps): update ansible/ansible-lint action to v25.2.1
renovate[bot] Apr 3, 2025
5868251
Merge branch 'main' into devel-elasticsearch
juju4 Apr 6, 2025
a3c26e1
Merge pull request #560 from prometheus-community/renovate/svenstaro-…
gardar Apr 7, 2025
d996d75
Merge pull request #561 from prometheus-community/autoupdate/apache_e…
gardar Apr 7, 2025
265a3e6
chore: update version
gardar Apr 7, 2025
95e8783
Merge pull request #570 from prometheus-community/renovate/ansible-an…
gardar Apr 7, 2025
738e489
chore: update version
gardar Apr 7, 2025
4d31ad5
chore(deps): update ansible-community/ansible-test-gh-action digest t…
renovate[bot] Apr 7, 2025
d0551f0
Merge pull request #558 from prometheus-community/renovate/ansible-co…
gardar Apr 7, 2025
fbf57c6
chore: update version
gardar Apr 7, 2025
30a47cb
skip_changelog: Update supported testing
SuperQ Apr 7, 2025
e803ab6
Merge pull request #572 from prometheus-community/superq/20.04-3.8
gardar Apr 7, 2025
b320d4a
patch: :tada: automated upstream release update
prombot Apr 5, 2025
b948fe4
patch: :tada: automated upstream release update
prombot Apr 2, 2025
01f7889
patch: :tada: automated upstream release update
prombot Mar 31, 2025
0cee11a
patch: :tada: automated upstream release update
prombot Mar 26, 2025
10f633e
patch: :tada: automated upstream release update
prombot Mar 15, 2025
f0d7847
patch: :tada: automated upstream release update
prombot Mar 14, 2025
300d5ed
patch: :tada: automated upstream release update
prombot Mar 8, 2025
ac177df
fix: version string in roles/nginx_exporter/defaults/main.yml
gardar Apr 7, 2025
7e5feaa
fix: version string in argument_specs.yml
gardar Apr 7, 2025
7b2973f
Merge pull request #565 from prometheus-community/autoupdate/memcache…
SuperQ Apr 7, 2025
ac8ad70
Merge pull request #568 from prometheus-community/autoupdate/node_exp…
SuperQ Apr 7, 2025
771b459
Merge branch 'main' into autoupdate/cadvisor/0.52.1
SuperQ Apr 7, 2025
485ddc8
Merge pull request #555 from prometheus-community/autoupdate/redis_ex…
SuperQ Apr 7, 2025
bdaed03
Merge pull request #509 from prometheus-community/autoupdate/nginx_ex…
gardar Apr 7, 2025
b9af18f
Merge pull request #549 from prometheus-community/autoupdate/alertman…
gardar Apr 7, 2025
991541a
Merge pull request #554 from prometheus-community/autoupdate/systemd_…
gardar Apr 7, 2025
1e8ab78
Merge pull request #545 from prometheus-community/autoupdate/cadvisor…
SuperQ Apr 7, 2025
d161262
Merge pull request #571 from prometheus-community/autoupdate/fail2ban…
SuperQ Apr 7, 2025
7e5dd5d
Merge branch 'main' into autoupdate/mongodb_exporter/0.44.0
SuperQ Apr 7, 2025
9ce79b1
Merge pull request #567 from prometheus-community/autoupdate/mongodb_…
gardar Apr 7, 2025
150f443
patch: :tada: automated upstream release update
prombot Apr 8, 2025
3e2b01f
Merge pull request #573 from prometheus-community/autoupdate/smokepin…
gardar Apr 9, 2025
6f703bb
chore: update version
gardar Apr 9, 2025
8e3ebf8
patch: :tada: automated upstream release update
prombot Apr 9, 2025
259b726
patch: :tada: automated upstream release update
prombot Apr 12, 2025
0077837
Merge pull request #577 from prometheus-community/autoupdate/redis_ex…
SuperQ Apr 13, 2025
a38a1ea
Merge pull request #575 from prometheus-community/autoupdate/pushgate…
SuperQ Apr 13, 2025
b9b412a
chore(deps): update hoo29/little-timmy action to v3
renovate[bot] Apr 13, 2025
51dfd92
patch: :tada: automated upstream release update
prombot Apr 18, 2025
1fdf3bd
Pin action hoo29/little-timmy
SuperQ Apr 18, 2025
e2d0e62
Merge pull request #578 from prometheus-community/renovate/hoo29-litt…
SuperQ Apr 18, 2025
c41a180
Merge branch 'main' into autoupdate/prometheus/3.3.0
SuperQ Apr 18, 2025
caaa0a2
chore: update version
SuperQ Apr 18, 2025
71a3467
Merge pull request #580 from prometheus-community/autoupdate/promethe…
SuperQ Apr 18, 2025
f445707
chore: update version
SuperQ Apr 18, 2025
8f781af
Add role for elasticsearch_exporter
juju4 Jan 18, 2025
679a2d0
ci: fix arguments-spec-lint
juju4 Jan 18, 2025
e368f6f
ci: add test/integration/targets
juju4 Jan 19, 2025
4db9b45
fix: switch to ansible_facts
juju4 Feb 22, 2025
7970cc6
fix: switch to ansible_facts (2)
juju4 Feb 22, 2025
5a0f47e
fix: switch to ansible_facts (3)
juju4 Feb 22, 2025
2c5f80a
fix: align on elastic-exp group name
juju4 Feb 22, 2025
a156909
Merge branch 'devel-elasticsearch' of github.com:juju4/ansible-promet…
juju4 Apr 19, 2025
d011399
feat: Add role for elasticsearch_exporter
juju4 Apr 19, 2025
2dfa368
Merge branch 'devel-elasticsearch' of github.com:juju4/ansible-promet…
juju4 Apr 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .config/molecule/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ provisioner:
exclude_ansible_vers:
- "2.17"
- "2.18"
ubuntu-20.04:
exclude_ansible_vers:
- "2.18"
ubuntu-24.04:
exclude_ansible_vers:
- "2.9"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ansible-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Lint collection
uses: ansible/ansible-lint@6a4fcdb135dd2be6e8ee5ddb5bf59d3d78cbe7b0 # v25.2.0
uses: ansible/ansible-lint@c16f018b1bdfdea6717f4b5b1b141a78b86021cd # v25.2.1
with:
requirements_file: requirements.yml

Expand All @@ -45,7 +45,7 @@ jobs:
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Run action
uses: hoo29/little-timmy@v2-action
uses: hoo29/little-timmy@c8ca5086db961499fc3d4e37637f566c3d0ec6d6 # v3-action

discover-ansible-versions:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ansible-test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
name: "${{ matrix.targets.name }}-${{ matrix.ansible-core-versions }}"
steps:
- name: "Perform ${{ matrix.targets.test }} integration test with ansible-test"
uses: ansible-community/ansible-test-gh-action@e083357d3acff9e6631b0ad08d8ca4421e5a75d3 # v1.16.0
uses: ansible-community/ansible-test-gh-action@b416b6ecf7ddb0ea3b0a51c1d198d715eba52c9d # v1.16.0
with:
ansible-core-version: ${{ matrix.ansible-core-versions }}
target-python-version: ${{ matrix.target-python-versions }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ansible-test-sanity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
name: "sanity-${{ matrix.ansible-core-versions }}"
steps:
- name: "Perform sanity test with ansible-test"
uses: ansible-community/ansible-test-gh-action@e083357d3acff9e6631b0ad08d8ca4421e5a75d3 # v1.16.0
uses: ansible-community/ansible-test-gh-action@b416b6ecf7ddb0ea3b0a51c1d198d715eba52c9d # v1.16.0
with:
ansible-core-version: ${{ matrix.ansible-core-versions }}
testing-type: sanity
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: ansible-community/github-action-build-collection@main

- name: "Upload built collection to release"
uses: svenstaro/upload-release-action@2b4adf59f26ea3ed6ddecb8e00f80acc6bc16bd4 # 2.9.0
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # 2.9.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ steps.build-collection.outputs.artifact-filename }}
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ Prometheus.Prometheus Release Notes

.. contents:: Topics

v0.26.2
=======

v0.26.1
=======

Expand Down
2 changes: 1 addition & 1 deletion changelogs/.plugin-cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ plugins:
strategy: {}
test: {}
vars: {}
version: 0.26.1
version: 0.26.2
7 changes: 5 additions & 2 deletions changelogs/changelog.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
---
ancestor:
releases:
0.26.1:
0.26.2:
changes:
trivial:
- 'chore(deps): update ansible/ansible-lint action to v25.2.0 (https://github.com/prometheus-community/ansible/pull/569)'
- 'patch: New prometheus/prometheus upstream release 3.3.0! (https://github.com/prometheus-community/ansible/pull/580)'
- 'chore(deps): update hoo29/little-timmy action to v3 (https://github.com/prometheus-community/ansible/pull/578)'
release_date: '2025-04-18'
0.26.1:
release_date: '2025-04-02'
0.26.0:
changes:
Expand Down
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
namespace: prometheus
name: prometheus
version: 0.26.1
version: 0.26.2
readme: README.md
authors:
- "Ben Kochie (https://github.com/SuperQ)"
Expand Down
2 changes: 1 addition & 1 deletion roles/alertmanager/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
alertmanager_version: 0.28.0
alertmanager_version: 0.28.1
alertmanager_binary_url: "https://github.com/{{ _alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/\
alertmanager-{{ alertmanager_version }}.{{ ansible_facts['system'] | lower }}-{{ _alertmanager_go_ansible_arch }}.tar.gz"
alertmanager_checksums_url: "https://github.com/{{ _alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/sha256sums.txt"
Expand Down
2 changes: 1 addition & 1 deletion roles/alertmanager/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ argument_specs:
options:
alertmanager_version:
description: "Alertmanager package version. Also accepts `latest` as parameter."
default: 0.28.0
default: 0.28.1
alertmanager_binary_url:
description: "URL of the alertmanager binaries .tar.gz file"
default: "https://github.com/{{ _alertmanager_repo }}/releases/download/v{{ alertmanager_version }}/alertmanager-{{ alertmanager_version }}.{{ ansible_facts['system'] | lower }}-{{ _alertmanager_go_ansible_arch }}.tar.gz"
Expand Down
2 changes: 1 addition & 1 deletion roles/apache_exporter/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
apache_exporter_version: 1.0.9
apache_exporter_version: 1.0.10
apache_exporter_binary_url: "https://github.com/{{ _apache_exporter_repo }}/releases/download/v{{ apache_exporter_version }}/\
apache_exporter-{{ apache_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _apache_exporter_go_ansible_arch }}.tar.gz"
apache_exporter_checksums_url: "https://github.com/{{ _apache_exporter_repo }}/releases/download/v{{ apache_exporter_version }}/sha256sums.txt"
Expand Down
2 changes: 1 addition & 1 deletion roles/apache_exporter/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ argument_specs:
options:
apache_exporter_version:
description: "apache_exporter package version. Also accepts latest as parameter."
default: "1.0.9"
default: "1.0.10"
apache_exporter_binary_url:
description: "URL of the apache_exporter binaries .tar.gz file"
default: "https://github.com/{{ _apache_exporter_repo }}/releases/download/v{{ apache_exporter_version }}/apache_exporter_{{ apache_exporter_version }}_{{ ansible_facts['system'] | lower }}-{{ _apache_exporter_go_ansible_arch }}.tar.gz"
Expand Down
2 changes: 1 addition & 1 deletion roles/cadvisor/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
cadvisor_version: 0.49.2
cadvisor_version: 0.52.1
cadvisor_binary_url: "https://github.com/{{ _cadvisor_repo }}/releases/download/v{{ cadvisor_version }}/\
cadvisor-v{{ cadvisor_version }}-{{ ansible_facts['system'] | lower }}-{{ _cadvisor_go_ansible_arch }}"

Expand Down
2 changes: 1 addition & 1 deletion roles/cadvisor/meta/argument_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ argument_specs:
options:
cadvisor_version:
description: "cAdvisor package version. Also accepts latest as parameter."
default: "0.49.2"
default: "0.52.1"
cadvisor_binary_url:
description: "URL of the cadvisor binary file"
default: "https://github.com/{{ _cadvisor_repo }}/releases/download/v{{ cadvisor_version }}/cadvisor-v{{ cadvisor_version }}-{{ ansible_facts['system'] | lower }}-{{ _cadvisor_go_ansible_arch }}"
Expand Down
45 changes: 45 additions & 0 deletions roles/elasticsearch_exporter/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Ansible Role: elasticsearch exporter

## Description

Deploy prometheus [elasticsearch exporter](https://github.com/prometheus-community/elasticsearch_exporter) using ansible.

Grafana dashboard example: https://github.com/prometheus-community/elasticsearch_exporter/blob/master/examples/grafana/dashboard.json

## Requirements

- Ansible >= 2.9 (It might work on previous versions, but we cannot guarantee it)
- gnu-tar on Mac deployer host (`brew install gnu-tar`)
- Passlib is required when using the basic authentication feature (`pip install passlib[bcrypt]`)

## Role Variables

All variables which can be overridden are stored in [defaults/main.yml](defaults/main.yml) file as well as in [meta/argument_specs.yml](meta/argument_specs.yml).
Please refer to the [collection docs](https://prometheus-community.github.io/ansible/branch/main/elasticsearch_exporter_role.html) for description and default values of the variables.

## Example

### Playbook

Use it in a playbook as follows:
```yaml
- hosts: all
roles:
- prometheus.prometheus.elasticsearch_exporter
```

## Local Testing

The preferred way of locally testing the role is to use Docker and [molecule](https://github.com/ansible-community/molecule) (v3.x). You will have to install Docker on your system. See "Get started" for a Docker package suitable for your system. Running your tests is as simple as executing `molecule test`.

## Contributing

See [contributor guideline](CONTRIBUTING.md).

## Troubleshooting

See [troubleshooting](TROUBLESHOOTING.md).

## License

This project is licensed under MIT License. See [LICENSE](/LICENSE) for more details.
1 change: 1 addition & 0 deletions roles/elasticsearch_exporter/TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Troubleshooting
37 changes: 37 additions & 0 deletions roles/elasticsearch_exporter/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
elasticsearch_exporter_version: 1.8.0
elasticsearch_exporter_binary_url: "https://github.com/{{ _elasticsearch_exporter_repo }}/releases/download/v{{ elasticsearch_exporter_version }}/\
elasticsearch_exporter-{{ elasticsearch_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _elasticsearch_exporter_go_ansible_arch }}.tar.gz"
elasticsearch_exporter_checksums_url: "https://github.com/{{ _elasticsearch_exporter_repo }}/releases/download/v{{ elasticsearch_exporter_version }}/sha256sums.txt"

elasticsearch_exporter_web_disable_exporter_metrics: false
elasticsearch_exporter_web_listen_address: "0.0.0.0:9114"
elasticsearch_exporter_web_telemetry_path: "/metrics"

elasticsearch_exporter_textfile_dir: "/var/lib/elasticsearch_exporter"

elasticsearch_exporter_tls_server_config: {}

elasticsearch_exporter_http_server_config: {}

elasticsearch_exporter_basic_auth_users: {}

elasticsearch_exporter_enabled_collectors:
- systemd
- textfile:
directory: "{{ elasticsearch_exporter_textfile_dir }}"
# - filesystem:
# ignored-mount-points: "^/(sys|proc|dev)($|/)"
# ignored-fs-types: "^(sys|proc|auto)fs$"

elasticsearch_exporter_disabled_collectors: []

elasticsearch_exporter_binary_install_dir: "/usr/local/bin"
elasticsearch_exporter_system_group: "elastic-exp"
elasticsearch_exporter_system_user: "{{ elasticsearch_exporter_system_group }}"
# systemd cli extra arguments
elasticsearch_exporter_extra_args: []

elasticsearch_exporter_config_dir: "/etc/elasticsearch_exporter"
# Local path to stash the archive and its extraction
elasticsearch_exporter_local_cache_path: "/tmp/elasticsearch_exporter-{{ ansible_facts['system'] | lower }}-{{ _elasticsearch_exporter_go_ansible_arch }}/{{ elasticsearch_exporter_version }}"
10 changes: 10 additions & 0 deletions roles/elasticsearch_exporter/handlers/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
- name: Restart elasticsearch_exporter
listen: "restart elasticsearch_exporter"
become: true
ansible.builtin.systemd:
daemon_reload: true
name: elasticsearch_exporter
state: restarted
when:
- not ansible_check_mode
89 changes: 89 additions & 0 deletions roles/elasticsearch_exporter/meta/argument_specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
# yamllint disable rule:line-length
argument_specs:
main:
short_description: "Prometheus Elasticsearch Exporter"
description:
- "Deploy prometheus L(elasticsearch exporter,https://github.com/prometheus-community/elasticsearch_exporter) using ansible"
author:
- "Prometheus Community"
options:
elasticsearch_exporter_version:
description: "Elasticsearch exporter package version. Also accepts latest as parameter."
default: "1.8.0"
elasticsearch_exporter_binary_url:
description: "URL of the elasticsearch exporter binaries .tar.gz file"
default: "https://github.com/{{ _elasticsearch_exporter_repo }}/releases/download/v{{ elasticsearch_exporter_version }}/elasticsearch_exporter-{{ elasticsearch_exporter_version }}.{{ ansible_facts['system'] | lower }}-{{ _elasticsearch_exporter_go_ansible_arch }}.tar.gz"
elasticsearch_exporter_checksums_url:
description: "URL of the elasticsearch exporter checksums file"
default: "https://github.com/{{ _elasticsearch_exporter_repo }}/releases/download/v{{ elasticsearch_exporter_version }}/sha256sums.txt"
elasticsearch_exporter_web_disable_exporter_metrics:
description: "Exclude metrics about the exporter itself (promhttp_*, process_*, go_*)."
type: bool
default: false
elasticsearch_exporter_web_listen_address:
description: "Address on which elasticsearch exporter will listen"
default: "0.0.0.0:9114"
elasticsearch_exporter_web_telemetry_path:
description: "Path under which to expose metrics"
default: "/metrics"
elasticsearch_exporter_enabled_collectors:
description:
- "List of dicts defining additionally enabled collectors and their configuration."
- "It adds collectors to L(those enabled by default,https://github.com/prometheus/elasticsearch_exporter#enabled-by-default)."
type: "list"
default:
- systemd
- textfile:
directory: "{{ elasticsearch_exporter_textfile_dir }}"
elasticsearch_exporter_disabled_collectors:
description:
- "List of disabled collectors."
- "By default elasticsearch_exporter disables collectors listed L(here,https://github.com/prometheus/elasticsearch_exporter#disabled-by-default)."
type: "list"
elements: "str"
elasticsearch_exporter_textfile_dir:
description:
- "Directory used by the L(Textfile Collector,https://github.com/prometheus/elasticsearch_exporter#textfile-collector)."
- "To get permissions to write metrics in this directory, users must be in C(elastic-exp) system group."
- "B(Note:) More information in TROUBLESHOOTING.md guide."
default: "/var/lib/elasticsearch_exporter"
elasticsearch_exporter_tls_server_config:
description:
- "Configuration for TLS authentication."
- "Keys and values are the same as in L(elasticsearch_exporter docs,https://prometheus.io/docs/prometheus/latest/configuration/https/)."
type: "dict"
elasticsearch_exporter_http_server_config:
description:
- "Config for HTTP/2 support."
- "Keys and values are the same as in L(elasticsearch_exporter docs,https://prometheus.io/docs/prometheus/latest/configuration/https/)."
type: "dict"
elasticsearch_exporter_basic_auth_users:
description: "Dictionary of users and password for basic authentication. Passwords are automatically hashed with bcrypt."
type: "dict"
elasticsearch_exporter_binary_install_dir:
description:
- "I(Advanced)"
- "Directory to install elasticsearch_exporter binary"
default: "/usr/local/bin"
elasticsearch_exporter_system_group:
description:
- "I(Advanced)"
- "System group for elasticsearch exporter"
default: "elastic-exp"
elasticsearch_exporter_system_user:
description:
- "I(Advanced)"
- "Elasticsearch exporter user"
default: "elastic-exp"
elasticsearch_exporter_extra_args:
description:
- "I(Advanced)"
- "Elasticsearch exporter cli extra arguments to be added to systemd unit"
default: []
elasticsearch_exporter_local_cache_path:
description: "Local path to stash the archive and its extraction"
default: "/tmp/elasticsearch_exporter-{{ ansible_facts['system'] | lower }}-{{ _elasticsearch_exporter_go_ansible_arch }}/{{ elasticsearch_exporter_version }}"
elasticsearch_exporter_config_dir:
description: "Path to directory with elasticsearch_exporter configuration"
default: "/etc/elasticsearch_exporter"
25 changes: 25 additions & 0 deletions roles/elasticsearch_exporter/meta/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
galaxy_info:
author: "Prometheus Community"
description: "Prometheus Elasticsearch Exporter"
license: "Apache"
min_ansible_version: "2.9"
platforms:
- name: "Ubuntu"
versions:
- "focal"
- "jammy"
- "noble"
- name: "Debian"
versions:
- "bullseye"
- name: "EL"
versions:
- "8"
- "9"
galaxy_tags:
- "monitoring"
- "prometheus"
- "exporter"
- "metrics"
- "system"
26 changes: 26 additions & 0 deletions roles/elasticsearch_exporter/molecule/alternative/molecule.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
provisioner:
playbooks:
prepare: "${MOLECULE_PROJECT_DIRECTORY}/../../.config/molecule/alternative/prepare.yml"
inventory:
group_vars:
all:
elasticsearch_exporter_local_cache_path: "/tmp/elasticsearch_exporter-linux-amd64"
elasticsearch_exporter_web_listen_address:
- '127.0.0.1:8080'
- '127.0.1.1:8080'
elasticsearch_exporter_textfile_dir: ""
elasticsearch_exporter_enabled_collectors:
- entropy
elasticsearch_exporter_disabled_collectors:
- diskstats
elasticsearch_exporter_tls_server_config:
cert_file: /etc/elasticsearch_exporter/tls.cert
key_file: /etc/elasticsearch_exporter/tls.key
elasticsearch_exporter_http_server_config:
http2: true
elasticsearch_exporter_basic_auth_users:
randomuser: examplepassword
elasticsearch_exporter_version: 1.8.0
elasticsearch_exporter_binary_url: "https://github.com/prometheus-community/elasticsearch_exporter/releases/download/v{{\
\ elasticsearch_exporter_version }}/elasticsearch_exporter-{{ elasticsearch_exporter_version }}.linux-amd64.tar.gz"
Loading