https://github.com/bodsch/ansible-go-carbon
ansible role for go-carbon. install and configure a carbon cache writer
https://github.com/bodsch/ansible-go-carbon
ansible automation cache carbon go go-carbon monitoring
Last synced: 2 months ago
JSON representation
ansible role for go-carbon. install and configure a carbon cache writer
- Host: GitHub
- URL: https://github.com/bodsch/ansible-go-carbon
- Owner: bodsch
- License: apache-2.0
- Created: 2021-02-23T05:38:32.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-06-14T04:41:41.000Z (about 4 years ago)
- Last Synced: 2025-01-09T05:38:34.277Z (over 1 year ago)
- Topics: ansible, automation, cache, carbon, go, go-carbon, monitoring
- Language: Python
- Homepage:
- Size: 61.5 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ansible Role: `go-carbon`
Ansible role to install and configure [go-carbon](https://github.com/go-graphite/go-carbon).
> Golang implementation of Graphite/Carbon server with classic architecture: Agent -> Cache -> Persister
[][ci]
[][issues]
[][releases]
[ci]: https://github.com/bodsch/ansible-go-carbon/actions
[issues]: https://github.com/bodsch/ansible-go-carbon/issues?q=is%3Aopen+is%3Aissue
[releases]: https://github.com/bodsch/ansible-go-carbon/releases
## configure
define your own *storage schemas*:
```yaml
go_carbon_storage_schema:
test:
pattern: '^test\.'
retentions: '5m:30d'
```
define your own *storage aggregation*:
```yaml
go_carbon_storage_aggregation:
count:
pattern: '\.count$'
xFilesFactor: 0
aggregationMethod: sum
```
You can use also the defaults under [`vars/main.yml`](vars/main.yml)
## clean up older whisper data
I use a small (with my modifications) Script from [Marianne Spiller](https://github.com/sysadmama) / [unixe.de](https://www.unixe.de/whisper-daten-aufraeumen/)
(There you will find more useful tips around the topic of monitoring.
**This page is highly recommended, which is what I am doing with it.**)
- You should make sure that a cron-daemon is installed.
- For *RedHat* based systems `cronie` can be used.
- For *Debian* based systems `cron` is available.
You can set the cron-daemon over `go_carbon_used_cron_daemon`.
**Support for systemd is currently not planned.**
To active this feature set `go_carbon_clean_data_enabled` to `true`
## example configuration
```yaml
go_carbon_whisper_data_directory: /opt/graphite/whisper
go_carbon_storage_schema:
telegraf:
# 1 Host and 1 Metric produce: 105.51 Kilobytes
pattern: '^telegraf\.'
retentions: '10s:2d,1m:6h,5m:30d'
grafana:
# 1 Host and 1 Metric produce: 556.94 Kilobytes
pattern: '^grafana\.'
retentions: '1m:15d,5m:30d,15m:120d,1h:240d'
icinga2:
# 1 Host and 1 Metric produce: 556.94 Kilobytes
pattern: '^icinga2\.'
retentions: '1m:15d,5m:30d,15m:120d,1h:240d'
```
## example playbook
```yaml
- hosts: monitoring
gather_facts: true
become: true
environment:
NETRC: ''
roles:
- role: go-carbon
```
## tests
You can use a set of test:
### default
```bash
tox -e py39-ansible29 -- molecule test -s default
```
### letest version from github
```bash
tox -e py39-ansible29 -- molecule test -s latest
```
### latest version with automatic clean of older whisper data
```bash
tox -e py39-ansible29 -- molecule test -s latest-with-clean-data
```
### named version
```bash
tox -e py39-ansible29 -- molecule test -s version-0.14
```