Add Telegraf
This commit is contained in:
parent
8fb7c297d1
commit
3393986f34
4 changed files with 61 additions and 0 deletions
26
docs/services/telegraf.md
Normal file
26
docs/services/telegraf.md
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# Telegraf
|
||||||
|
|
||||||
|
[Telegraf](https://www.influxdata.com/) is a plugin-driven server agent for collecting & reporting metric, that this playbook can install, powered by the [mother-of-all-self-hosting/ansible-role-influxdb](https://github.com/mother-of-all-self-hosting/ansible-role-influxdb) Ansible role. It heavily depends on [InfluxDB](influxdb.md)
|
||||||
|
|
||||||
|
## Prerequisits
|
||||||
|
|
||||||
|
* A installed and running [infuxdb](influxdb.md).
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
|
||||||
|
To enable this service, add the following configuration to your `vars.yml` file and re-run the [installation](../installing.md) process:
|
||||||
|
|
||||||
|
This role depends on a influxdb configuring telegraf. You need to obtain the influx token and config link in the influxdb.
|
||||||
|
In your browser, visit the influxdb and go to Load Data -> Telegraf.
|
||||||
|
There you need to add a telegraf configuraion. You can now obtain these values from the setup instructions and oaste them here.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
telegraf_enabled: true
|
||||||
|
telegraf_influx_token: SUPERSECRETTOKEN
|
||||||
|
telegraf_config_link: https://influxdb.example.org/api/v2/telegrafs/0123456789
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
In your influxdb configure the telegraf plugins as you like.
|
||||||
|
|
|
@ -191,6 +191,8 @@ devture_systemd_service_manager_services_list_auto: |
|
||||||
+
|
+
|
||||||
([{'name': (syncthing_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'syncthing']}] if syncthing_enabled else [])
|
([{'name': (syncthing_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'syncthing']}] if syncthing_enabled else [])
|
||||||
+
|
+
|
||||||
|
([{'name': (telegraf_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'telegraf']}] if telegraf_enabled else [])
|
||||||
|
+
|
||||||
([{'name': (vaultwarden_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'vaultwarden', 'vaultwarden-server']}] if vaultwarden_enabled else [])
|
([{'name': (vaultwarden_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'vaultwarden', 'vaultwarden-server']}] if vaultwarden_enabled else [])
|
||||||
+
|
+
|
||||||
([{'name': (uptime_kuma_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'uptime-kuma']}] if uptime_kuma_enabled else [])
|
([{'name': (uptime_kuma_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'uptime-kuma']}] if uptime_kuma_enabled else [])
|
||||||
|
@ -2397,6 +2399,34 @@ syncthing_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certRes
|
||||||
# #
|
# #
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# #
|
||||||
|
# telegraf #
|
||||||
|
# #
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
telegraf_enabled: false
|
||||||
|
|
||||||
|
telegraf_identifier: "{{ mash_playbook_service_identifier_prefix }}telegraf"
|
||||||
|
|
||||||
|
telegraf_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_base_directory_name_prefix }}telegraf"
|
||||||
|
|
||||||
|
telegraf_uid: "{{ mash_playbook_uid }}"
|
||||||
|
telegraf_gid: "{{ mash_playbook_gid }}"
|
||||||
|
|
||||||
|
telegraf_systemd_required_services_list: |
|
||||||
|
{{
|
||||||
|
(['docker.service'])
|
||||||
|
+
|
||||||
|
([(influxdb_identifier + '.service')] if influxdb_enabled else [])
|
||||||
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
########################################################################
|
||||||
|
# #
|
||||||
|
# /telegraf #
|
||||||
|
# #
|
||||||
|
########################################################################
|
||||||
|
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
|
@ -152,6 +152,9 @@
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-syncthing.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-syncthing.git
|
||||||
version: v1.23.5-0
|
version: v1.23.5-0
|
||||||
name: syncthing
|
name: syncthing
|
||||||
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-telegraf.git
|
||||||
|
version: v1.27.1-1
|
||||||
|
name: telegraf
|
||||||
- src: git+https://gitlab.com/etke.cc/roles/uptime_kuma.git
|
- src: git+https://gitlab.com/etke.cc/roles/uptime_kuma.git
|
||||||
version: v1.22.0-0
|
version: v1.22.0-0
|
||||||
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-vaultwarden.git
|
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-vaultwarden.git
|
||||||
|
|
|
@ -131,6 +131,8 @@
|
||||||
|
|
||||||
- role: galaxy/syncthing
|
- role: galaxy/syncthing
|
||||||
|
|
||||||
|
- role: galaxy/telegraf
|
||||||
|
|
||||||
- role: galaxy/vaultwarden
|
- role: galaxy/vaultwarden
|
||||||
|
|
||||||
- role: galaxy/uptime_kuma
|
- role: galaxy/uptime_kuma
|
||||||
|
|
Loading…
Add table
Reference in a new issue