Giter VIP home page Giter VIP logo

ansible-telegraf's Introduction

ansible-telegraf

A role to deploy Telegraf agent.

Requirements

Role Variables

Dependencies

This is a standalone role.

Example Playbook

Configure a system/net monitoring with an influxdb backend:

- hosts: servers
  roles:
     - ansible-telegraf
  vars:
     telegraf_output_influxdb_config:
        urls: ["http://metrics.example.com:8086"]
        database: "telegraf"
        skip_database_creation: true
        retention_policy: ""
        timeout: 5s
        insecure_skip_verify: true

Create an InfluxDB proxy:

- hosts: servers
  roles:
     - ansible-telegraf
  vars:
     telegraf_output_influxdb_config:
        urls: ["http://metrics.example.com:8086"]
        database: "telegraf"
        skip_database_creation: true
        retention_policy: ""
        timeout: 5s
        insecure_skip_verify: true
     telegraf_influxdb_listener_config:
        service_address: ":8186"
        read_timeout: 10s
        write_timeout: 10s
        max_body_size: 0
        max_line_size: 0

Set agent options:

- hosts: servers
  roles:
     - ansible-telegraf
  vars:
     telegraf_output_influxdb_config:
        urls: ["http://metrics.example.com:8086"]
        database: "telegraf"
        skip_database_creation: true
        retention_policy: ""
        timeout: 5s
        insecure_skip_verify: true
     telegraf_main_config:
        global_tags:
            os_project: "cloud-1"
        add_node_type: false
        agent:
            interval: "{{ telegraf_metrics_agent_interval_seconds }}"
            round_interval: false
            metric_batch_size: 1024
            metric_buffer_limit: 10240
            collection_jitter: 8s
            flush_jitter: 8s
            precision: ""
            debug: false
            quiet: false
            logfile: ""
            omit_hostname: false

Use InfluxDB v2:

- hosts: servers
  roles:
     - ansible-telegraf
  vars:
     telegraf_output_influxdbv2_config
         urls: ["http://localhost:8086"]
         token: "secret" 
         org: "my-org"
         bucket: "default"
         bucket_tag: ""
         exclude_bucket_tag: false
         insecure_skip_verify: false
     telegraf_main_config:
        global_tags:
            os_project: "cloud-1"
        add_node_type: false
        agent:
            interval: "{{ telegraf_metrics_agent_interval_seconds }}"
            round_interval: false
            metric_batch_size: 1024
            metric_buffer_limit: 10240
            collection_jitter: 8s
            flush_jitter: 8s
            precision: ""
            debug: false
            quiet: false
            logfile: ""
            omit_hostname: false

Use custom input:

- hosts: servers
  roles:
     - ansible-telegraf
  vars:
     telegraf_custom_inputs:
        - name: grafana
          plugin: prometheus
          options:
             - urls: '[ "http://localhost:3000/metrics" ]'
     telegraf_main_config:
        global_tags:
            os_project: "cloud-1"
        add_node_type: false
        agent:
            interval: "{{ telegraf_metrics_agent_interval_seconds }}"
            round_interval: false
            metric_batch_size: 1024
            metric_buffer_limit: 10240
            collection_jitter: 8s
            flush_jitter: 8s
            precision: ""
            debug: false
            quiet: false
            logfile: ""
            omit_hostname: false

License

GPL-3+

Author Information

Mathieu GRZYBEK

ansible-telegraf's People

Contributors

mgrzybek avatar neyrick avatar

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.