sbaerlocher / ansible.telegraf Goto Github PK
View Code? Open in Web Editor NEWInstalling and configuring Telegraf for RedHat/Debian/Ubuntu/Windows/Suse.
License: MIT License
Installing and configuring Telegraf for RedHat/Debian/Ubuntu/Windows/Suse.
License: MIT License
---
# tasks file for sbaerlocher.telegraf
- name: 'red hat : install YUM repository'
become: true
yum_repository:
name: influxdb-stable
description: Stable InfluxDB YUM Repository
baseurl: https://repos.influxdata.com/rhel/$releasever/$basearch/stable
gpgkey: https://repos.influxdata.com/influxdb.key
gpgcheck: yes
enabled: yes
- name: 'red hat : Install Telegraf package'
become: true
yum:
name: '{{ telegraf_package }}'
state: latest
register: register_telegraf_package_installed
until: register_telegraf_package_installed is succeeded
notify: 'Restart Telegraf'
- name: 'red hat : include configuration tasks'
include_tasks: 'Linux/configuration.yml'
Default setup leads to:
Oct 14 20:50:18 amdci2 systemd[1]: Failed to start The plugin-driven server agent for reporting metrics into InfluxDB.
Oct 14 20:59:17 amdci2 systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.
Oct 14 20:59:17 amdci2 telegraf[55227]: 2020-10-15T00:59:17Z I! Starting Telegraf 1.15.3
Oct 14 20:59:17 amdci2 telegraf[55227]: 2020-10-15T00:59:17Z E! [telegraf] Error running agent: Error loading config file /etc/telegraf/telegraf.conf: open /etc/telegraf/telegraf.conf: permission denied
Oct 14 20:59:17 amdci2 systemd[1]: telegraf.service: Main process exited, code=exited, status=1/FAILURE
Oct 14 20:59:17 amdci2 systemd[1]: telegraf.service: Failed with result 'exit-code'.
Oct 14 20:59:18 amdci2 systemd[1]: telegraf.service: Service hold-off time over, scheduling restart.
Oct 14 20:59:18 amdci2 systemd[1]: telegraf.service: Scheduled restart job, restart counter is at 1.
Oct 14 20:59:18 amdci2 systemd[1]: Stopped The plugin-driven server agent for reporting metrics into InfluxDB.
Oct 14 20:59:18 amdci2 systemd[1]: Started The plugin-driven server agent for reporting metrics into InfluxDB.
Oct 14 20:59:18 amdci2 telegraf[55262]: 2020-10-15T00:59:18Z I! Starting Telegraf 1.15.3
Oct 14 20:59:18 amdci2 telegraf[55262]: 2020-10-15T00:59:18Z E! [telegraf] Error running agent: Error loading config file /etc/telegraf/telegraf.conf: open /etc/telegraf/telegraf.conf: permission denied
Oct 14 20:59:18 amdci2 systemd[1]: telegraf.service: Main process exited, code=exited, status=1/FAILURE
Permissions are -rw-r----- 1 root root 1882 Oct 14 21:09 telegraf.conf
TASK [sbaerlocher.telegraf : windows : register service] *************************************************************************
fatal: [SEFSPS99014SRV]: FAILED! => {
"changed": false,
"cmd": ""C:\\Program Files\\telegraf\telegraf.exe" --service install --config "C:\\Program Files\\telegraf\\telegraf.conf" --config-directory "C:\\Program Files\\telegraf\\telegraf.d"",
"rc": 2
}
MSG:
Exception calling "SearchPath" with "1" argument(s): "Could not find file 'C:\Program Files\telegraf\telegraf.exe'."
'''
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.