Git Product home page Git Product logo

ansible.telegraf's Introduction

sbaerlocher

sbaerlocher github statsTop Langs

ansible.telegraf's People

Contributors

sbaerlocher avatar

Watchers

 avatar  avatar  avatar  avatar

ansible.telegraf's Issues

permisssions of /etc/telegraf to tight

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

windows : register service

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'."
'''

Add RedHat/CentOS Support

---
# 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'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.