# Telegraf Configuration # Global tags can be specified here in key="value" format. [global_tags] # Configuration for telegraf agent [agent] ## Default data collection interval for all inputs interval = "30s" ## Rounds collection interval to 'interval' ## ie, if interval="10s" then always collect on :00, :10, :20, etc. round_interval = true metric_batch_size = 1000 metric_buffer_limit = 10000 collection_jitter = "0s" flush_interval = "40s" flush_jitter = "0s" ## Valid values are "ns", "us" (or "µs"), "ms", "s". precision = "" ## Run telegraf in debug mode debug = false ## Run telegraf in quiet mode quiet = false ## Override default hostname, if empty use os.Hostname() hostname = "" ## If set to true, do no set the "host" tag in the telegraf agent. omit_hostname = false ############################################################################### # OUTPUT PLUGINS # ############################################################################### # Configuration for influxdb server to send metrics to [[outputs.influxdb_v2]] ## URL onde está o influxdb. ## ex: urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"] ## urls = ["http://127.0.0.1:8086"] urls = ["https://IP_DO_INFLUXDB:8086"] ## API token para autenticação. token = "${INFLUX_TOKEN}" #token = "SEU_TOKEN" ## Nome da organizaçao onde será escrito os dados. organization = "SUA_ORGANIZACAO" ## Bucket de destino onde será gravado os dados. bucket = "SUA_BUCKET" ############################################################################### # INPUT PLUGINS # ############################################################################### [[inputs.net_response]] protocol = "tcp" address = "127.0.0.1:1234" timeout = "10s" [[inputs.net_response]] protocol = "tcp" address = "127.0.0.1:7890" timeout = "10s" [[inputs.net_response]] protocol = "tcp" address = "127.0.0.1:5555" timeout = "10s" # Read metrics about cpu usage [[inputs.cpu]] percpu = true totalcpu = true fielddrop = ["time_*"] collect_cpu_time = false report_active = false # Read metrics about system load & uptime [[inputs.system]] # Get kernel statistics from /proc/stat [[inputs.kernel]] # Get the number of processes and group them by status #[[inputs.processes]] # Read metrics about system load & uptime [[inputs.system]] # Collect TCP connections state and UDP socket counts [[inputs.netstat]] # Gather metrics about network interfaces [[inputs.net]] # Read metrics about disk usage by mount point [[inputs.disk]] # Read metrics about disk IO by device [[inputs.diskio]] # Read metrics about memory usage [[inputs.mem]] [[inputs.win_perf_counters]] [[inputs.win_perf_counters.object]] ObjectName = "Processor" Instances = ["*"] Counters = [ "% Idle Time", "% Interrupt Time", "% Privileged Time", "% User Time", "% DPC Time", "% Processor Time" ]# Measurement = "win_cpu" IncludeTotal=true [[inputs.win_perf_counters.object]] ObjectName = "Process" Instances = ["*"] Counters = ["Elapsed Time","% Processor Time"] Measurement = "win_services" [[inputs.win_perf_counters.object]] ObjectName = "LogicalDisk" Instances = ["*"] Counters = [ "% Idle Time", "% Disk Time", "% Disk Read Time", "% Disk Write Time", "% Free Space", "Current Disk Queue Length", "Free Megabytes", ] Measurement = "win_disk" [[inputs.win_perf_counters.object]] ObjectName = "PhysicalDisk" Instances = ["*"] Counters = [ "Disk Read Bytes/sec", "Disk Write Bytes/sec", "Current Disk Queue Length", "Disk Reads/sec", "Disk Writes/sec", "% Disk Time", "% Disk Read Time", "% Disk Write Time", "Avg. Disk sec/Read", "Avg. Disk sec/Write" ] Measurement = "win_diskio" [[inputs.win_perf_counters.object]] # more counters for the Network Interface Object can be found at # https://msdn.microsoft.com/en-us/library/ms803962.aspx ObjectName = "Network Interface" Counters = [ "Current Bandwidth", "Bytes Received/sec", "Bytes Sent/sec", "Packets Received/sec", "Packets Sent/sec", "Output Queue Length", "Packets Outbound Discarded", "Packets Outbound Errors", "Packets Received Discarded", "Packets Received Errors", "Packets Received Unknown" ] Instances = ["*"] Measurement = "win_net" [[inputs.win_perf_counters.object]] ObjectName = "System" Counters = [ "Context Switches/sec", "System Calls/sec", "Processor Queue Length", "Threads", "System Up Time", "Processes" ] Instances = ["*"] Measurement = "win_system" IncludeTotal=false [[inputs.win_perf_counters.object]] ObjectName = "Memory" Counters = [ "Available Bytes", "Cache Faults/sec", "Demand Zero Faults/sec", "Page Faults/sec", "Pages/sec", "Transition Faults/sec", "Pool Nonpaged Bytes", "Pool Paged Bytes", "Standby Cache Reserve Bytes", "Standby Cache Normal Priority Bytes", "Standby Cache Core Bytes", ] Instances = ["*"] Measurement = "win_mem" [[inputs.win_perf_counters.object]] ObjectName = "Paging File" Counters = [ "% Usage", ] Instances = ["_Total"] Measurement = "win_swap" [[inputs.win_perf_counters.object]] ObjectName = "Process" Counters = [ "% Processor Time", "Handle Count", "Private Bytes", "Thread Count", "Virtual Bytes", "Working Set" ] Instances = ["appserver","appserver#1","dbaccess64","dbaccess64#1","*"] Measurement = "win_proc" # .\telegraf.exe --service install --config "C:\Program Files\Telegraf\telegraf-1.20.4\telegraf.conf" # .\telegraf.exe" --config "C:\Program Files\Telegraf\telegraf-1.20.4\telegraf.conf" --service-name telegraf