Installs and configures Telegraf.
This role requires Ansible 1.9 or higher.
Name | Default | Description |
---|---|---|
telegraf_version | 1.0.1 | Version of Telegraf to install |
telegraf_global_tags | {} | All metrics being gathered on this host will be tagged with the tags specified here. |
telegraf_agent_interval | 10s | Default data collection interval for all inputs |
telegraf_agent_round_interval | true | Rounds collection interval to ‘interval’ ie, if interval=“10s” then always collect on :00, :10, :20, etc. |
telegraf_agent_metric_batch_size | 1000 | Telegraf will send metrics to output in batch of at most metric_batch_size metrics. |
telegraf_agent_metric_buffer_limit | 10000 | Telegraf will cache metric_buffer_limit metrics for each output, and will flush this buffer on a successful write. This should be a multiple of metric_batch_size and could not be less than 2 times metric_batch_size. |
telegraf_agent_collection_jitter | 0s | Collection jitter is used to jitter the collection by a random amount. Each plugin will sleep for a random time within jitter before collecting. This can be used to avoid many plugins querying things like sysfs at the same time, which can have a measurable effect on the system. |
telegraf_agent_flush_interval | 10s | Default data flushing interval for all outputs. You should not set this below interval. Maximum flush_interval will be flush_interval + flush_jitter |
telegraf_agent_flush_jitter | 0s | Jitter the flush interval by a random amount. This is primarily to avoid large write spikes for users running a large number of telegraf instances. ie, a jitter of 5s and flush_interval 10s means flushes will happen every 10-15s. |
telegraf_agent_precision | '' | Set precision (ns, us, ms or s) |
telegraf_agent_debug | false | Run telegraf in debug mode. |
telegraf_agent_quiet | false | Run telegraf in quiet mode. |
telegraf_agent_hostname | '' | Override default hostname |
telegraf_agent_omit_hostname | false | Omit hostname |
telegraf_output_influxdb_enabled | true | Enable InfluxDB output plugin |
telegraf_output_influxdb_urls | ["http://localhost:8086"] | List of strings, this is for InfluxDB clustering support. On each flush interval, Telegraf will randomly choose one of the urls to write to. Each URL should start with either http:// or udp:// |
telegraf_output_influxdb_database | telegraf | The name of the database to write to. |
telegraf_output_influxdb_retention_policy | '' | Retention policy to write to. (Empty string writes to the default retention policy) |
telegraf_output_influxdb_timeout | 5s | Write timeout (for the InfluxDB client), formatted as a string. If not provided, will default to 5s. 0s means no timeout (not recommended). |
telegraf_output_influxdb_username | '' | Username for influxdb |
telegraf_output_influxdb_password | '' | Password for influxdb |
telegraf_output_influxdb_user_agent | telegraf | Set the user agent for HTTP POSTs (can be useful for log differentiation) |
telegraf_output_influxdb_udp_payload | 512 | Set UDP payload size, defaults to InfluxDB UDP Client default (512 bytes) |
telegraf_output_influxdb_ssl_ca | '' | SSL CA |
telegraf_output_influxdb_ssl_cert | '' | SSL certificate |
telegraf_output_influxdb_ssl_key | '' | SSL key |
telegraf_output_influxdb_insecure_skip_verify | false | Use SSL but skip chain & host verification |
telegraf_output_influxdb_write_consistency | any | Write consistency for clusters only, can be: "any", "one", "quorom", "all" |
telegraf_output_file_enabled | false | Enable files output |
telegraf_output_file_files | ["stdout", "/tmp/metrics.out"] | Files to write to, "stdout" is a specially handled file. |
telegraf_output_file_data_format | influx | Data format to output. |
telegraf_input_cpu_enabled | true | Enable CPU input |
telegraf_input_cpu_percpu | true | Whether to report per-cpu stats or not |
telegraf_input_cpu_totalcpu | true | Whether to report total system cpu stats or not |
telegraf_input_cpu_fielddrop | ["time_*"] | Remote "time_*" if you want the raw CPU time metrics |
telegraf_input_disk_enabled | true | Enable disk input |
telegraf_input_disk_mount_points | [] | By default, gather stats for all mountpoints. Setting mountpoints will restrict the stats to the specified mountpoints. |
telegraf_input_disk_ignore_fs | ["tmpfs", "devtmpfs"] | Ignore some mountpoints by filesystem type. For example (dev)tmpfs (usually present on /run, /var/run, /dev/shm or /dev). |
telegraf_input_diskio_enabled | true | Enable diskio input |
telegraf_input_diskio_devices | [] | By default, gather stats for all devices including disk partitions. Setting devices will restrict the stats to the specified devices. |
telegraf_input_diskio_skip_serial_number | false | Skip disk serial numbers |
telegraf_input_kernel_enabled | true | Enable kernel input |
telegraf_input_mem_enabled | true | Enable mem input |
telegraf_input_netstat_enabled | false | Enable netstat input |
telegraf_input_processes_enabled | true | Enable processes input |
telegraf_input_swap_enabled | true | Enable swap input |
telegraf_input_system_enabled | true | Enable system input |
telegraf_input_net_enabled | false | Enable network input |
None
Install Telegraf
- hosts: all
roles:
- kbrebanov.telegraf
BSD
Kevin Brebanov