Initial commit

This commit is contained in:
2021-03-31 15:50:39 +02:00
commit 4570e285eb
26 changed files with 21036 additions and 0 deletions
@@ -0,0 +1,31 @@
[global_tags]
# Configuration for telegraf agent
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 100000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
debug = false
quiet = false
logfile = ""
hostname = ""
omit_hostname = false
[[inputs.tail]]
files = ["/home/appuser/wo-bisch-lorahandler/wo-bisch-lorahandler.log"]
from_beginning = false
pipe = false
tagexclude = ["path","host"]
data_format = "influx"
# Configuration for sending metrics to InfluxDB 2.0
[[outputs.influxdb_v2]]
urls = ["http://127.0.0.1:8086"]
token = "PWuleFEPB2YSduUkzkcW94V_-KFDK5Fi3MAeaA999Qe51OsGlJJSrcZ41pUAppCwF-z3rUNnyFQQJs8fCSTFzg=="
organization = "wobischorg"
bucket = "wobischbucket"
+5
View File
@@ -0,0 +1,5 @@
---
- name: Restart telegraf
service:
name=telegraf
state=restarted
+36
View File
@@ -0,0 +1,36 @@
---
- name: Add repository
yum_repository:
name: influxrepo
description: InfluxDB Repository - RHEL
baseurl: https://repos.influxdata.com/rhel/8/x86_64/stable/
gpgkey: https://repos.influxdata.com/influxdb.key
gpgcheck: yes
- name: Install influx packages
yum:
name: "{{ item }}"
loop:
- telegraf
- influxdb2
- name: enable telegraf
systemd:
name: telegraf
enabled: yes
- name: enable influxdb
systemd:
name: influxdb
enabled: yes
state: started
- name: copy telegraf config
copy:
src: telegraf.conf
dest: /etc/telegraf/telegraf.conf
mode: '0644'
notify: Restart telegraf