From ea8143db72fe3a10e60317e939f6bca145de6286 Mon Sep 17 00:00:00 2001 From: Russ Savage Date: Mon, 10 Aug 2020 12:50:48 -0700 Subject: [PATCH] fix(readmes): adding code block annotations (#7963) --- plugins/common/shim/README.md | 2 +- plugins/inputs/bcache/README.md | 2 +- plugins/inputs/bind/README.md | 2 +- plugins/inputs/burrow/README.md | 2 +- plugins/inputs/ceph/README.md | 4 ++-- plugins/inputs/couchbase/README.md | 2 +- plugins/inputs/dovecot/README.md | 2 +- plugins/inputs/http_response/README.md | 2 +- plugins/inputs/icinga2/README.md | 2 +- plugins/inputs/lanz/README.md | 6 +++--- plugins/inputs/minecraft/README.md | 2 +- plugins/inputs/modbus/README.md | 2 +- plugins/inputs/mysql/README.md | 2 +- plugins/inputs/neptune_apex/README.md | 4 ++-- plugins/inputs/net/NET_README.md | 4 ++-- plugins/inputs/nginx/README.md | 6 +++--- plugins/inputs/nginx_plus/README.md | 6 +++--- plugins/inputs/nginx_plus_api/README.md | 6 +++--- plugins/inputs/nginx_upstream_check/README.md | 4 ++-- plugins/inputs/nginx_vts/README.md | 6 +++--- plugins/inputs/nvidia_smi/README.md | 4 ++-- plugins/inputs/openldap/README.md | 4 +++- plugins/inputs/postgresql/README.md | 2 +- plugins/inputs/postgresql_extensible/README.md | 4 ++-- plugins/inputs/powerdns/README.md | 2 +- plugins/inputs/prometheus/README.md | 2 +- plugins/inputs/redis/README.md | 4 ++-- plugins/inputs/sensors/README.md | 2 +- plugins/inputs/solr/README.md | 2 +- plugins/inputs/synproxy/README.md | 4 ++-- plugins/inputs/teamspeak/README.md | 2 +- plugins/inputs/vsphere/README.md | 4 ++-- plugins/inputs/webhooks/particle/README.md | 2 +- plugins/inputs/win_perf_counters/README.md | 16 ++++++++-------- plugins/outputs/opentsdb/README.md | 2 +- plugins/parsers/csv/README.md | 2 +- 36 files changed, 64 insertions(+), 62 deletions(-) diff --git a/plugins/common/shim/README.md b/plugins/common/shim/README.md index 80235fb034056..5453c90a4d548 100644 --- a/plugins/common/shim/README.md +++ b/plugins/common/shim/README.md @@ -48,7 +48,7 @@ execd plugins: 1. Configure Telegraf to call your new plugin binary. For an input, this would look something like: -``` +```toml [[inputs.execd]] command = ["/path/to/rand", "-config", "/path/to/plugin.conf"] signal = "none" diff --git a/plugins/inputs/bcache/README.md b/plugins/inputs/bcache/README.md index bda8b02574438..9b7040d6798ce 100644 --- a/plugins/inputs/bcache/README.md +++ b/plugins/inputs/bcache/README.md @@ -55,7 +55,7 @@ cache_readaheads Using this configuration: -``` +```toml [bcache] # Bcache sets path # If not specified, then default is: diff --git a/plugins/inputs/bind/README.md b/plugins/inputs/bind/README.md index 34d419d3a1809..e3bcf6a75b252 100644 --- a/plugins/inputs/bind/README.md +++ b/plugins/inputs/bind/README.md @@ -77,7 +77,7 @@ for more information. These are some useful queries (to generate dashboards or other) to run against data from this plugin: -``` +```sql SELECT non_negative_derivative(mean(/^A$|^PTR$/), 5m) FROM bind_counter \ WHERE "url" = 'localhost:8053' AND "type" = 'qtype' AND time > now() - 1h \ GROUP BY time(5m), "type" diff --git a/plugins/inputs/burrow/README.md b/plugins/inputs/burrow/README.md index d30a054d6a379..bdc821ca55784 100644 --- a/plugins/inputs/burrow/README.md +++ b/plugins/inputs/burrow/README.md @@ -7,7 +7,7 @@ Supported Burrow version: `1.x` ### Configuration -``` +```toml [[inputs.burrow]] ## Burrow API endpoints in format "schema://host:port". ## Default is "http://localhost:8000". diff --git a/plugins/inputs/ceph/README.md b/plugins/inputs/ceph/README.md index f20fd18bec0b2..171b64760654f 100644 --- a/plugins/inputs/ceph/README.md +++ b/plugins/inputs/ceph/README.md @@ -12,7 +12,7 @@ a MON socket, it runs **ceph --admin-daemon $file perfcounters_dump**. For OSDs The resulting JSON is parsed and grouped into collections, based on top-level key. Top-level keys are used as collection tags, and all sub-keys are flattened. For example: -``` +```json { "paxos": { "refresh": 9363435, @@ -44,7 +44,7 @@ the cluster. The currently supported commands are: ### Configuration: -``` +```toml # Collects performance metrics from the MON and OSD nodes in a Ceph storage cluster. [[inputs.ceph]] ## This is the recommended interval to poll. Too frequent and you will lose diff --git a/plugins/inputs/couchbase/README.md b/plugins/inputs/couchbase/README.md index 6db7d3db94315..954879da4f4a4 100644 --- a/plugins/inputs/couchbase/README.md +++ b/plugins/inputs/couchbase/README.md @@ -2,7 +2,7 @@ ## Configuration: -``` +```toml # Read per-node and per-bucket metrics from Couchbase [[inputs.couchbase]] ## specify servers via a url matching: diff --git a/plugins/inputs/dovecot/README.md b/plugins/inputs/dovecot/README.md index d28ae3dd9b9a3..3b6129488dae3 100644 --- a/plugins/inputs/dovecot/README.md +++ b/plugins/inputs/dovecot/README.md @@ -8,7 +8,7 @@ the [upgrading steps][upgrading]. ### Configuration: -``` +```toml # Read metrics about dovecot servers [[inputs.dovecot]] ## specify dovecot servers via an address:port list diff --git a/plugins/inputs/http_response/README.md b/plugins/inputs/http_response/README.md index 894619bffa29a..d445f5e7773ab 100644 --- a/plugins/inputs/http_response/README.md +++ b/plugins/inputs/http_response/README.md @@ -4,7 +4,7 @@ This input plugin checks HTTP/HTTPS connections. ### Configuration: -``` +```toml # HTTP/HTTPS request given an address a method and a timeout [[inputs.http_response]] ## Deprecated in 1.12, use 'urls' diff --git a/plugins/inputs/icinga2/README.md b/plugins/inputs/icinga2/README.md index fd441019bd24a..fb36d36f3730f 100644 --- a/plugins/inputs/icinga2/README.md +++ b/plugins/inputs/icinga2/README.md @@ -51,7 +51,7 @@ services and hosts. You can read Icinga2's documentation for their remote API ### Sample Queries: -``` +```sql SELECT * FROM "icinga2_services" WHERE state_code = 0 AND time > now() - 24h // Service with OK status SELECT * FROM "icinga2_services" WHERE state_code = 1 AND time > now() - 24h // Service with WARNING status SELECT * FROM "icinga2_services" WHERE state_code = 2 AND time > now() - 24h // Service with CRITICAL status diff --git a/plugins/inputs/lanz/README.md b/plugins/inputs/lanz/README.md index 32033d6ab9216..c47b22fee1dd1 100644 --- a/plugins/inputs/lanz/README.md +++ b/plugins/inputs/lanz/README.md @@ -62,17 +62,17 @@ For more details on the metrics see https://github.com/aristanetworks/goarista/b ### Sample Queries Get the max tx_latency for the last hour for all interfaces on all switches. -``` +```sql SELECT max("tx_latency") AS "max_tx_latency" FROM "congestion_record" WHERE time > now() - 1h GROUP BY time(10s), "hostname", "intf_name" ``` Get the max tx_latency for the last hour for all interfaces on all switches. -``` +```sql SELECT max("queue_size") AS "max_queue_size" FROM "congestion_record" WHERE time > now() - 1h GROUP BY time(10s), "hostname", "intf_name" ``` Get the max buffer_size for over the last hour for all switches. -``` +```sql SELECT max("buffer_size") AS "max_buffer_size" FROM "global_buffer_usage_record" WHERE time > now() - 1h GROUP BY time(10s), "hostname" ``` diff --git a/plugins/inputs/minecraft/README.md b/plugins/inputs/minecraft/README.md index e27fca9ba497b..026c9e3b3fb99 100644 --- a/plugins/inputs/minecraft/README.md +++ b/plugins/inputs/minecraft/README.md @@ -67,7 +67,7 @@ View the current scores with a command, substituting your player name: ### Sample Queries: Get the number of jumps per player in the last hour: -``` +```sql SELECT SPREAD("jumps") FROM "minecraft" WHERE time > now() - 1h GROUP BY "player" ``` diff --git a/plugins/inputs/modbus/README.md b/plugins/inputs/modbus/README.md index 2476f3d368eb5..3c568b5e6e5e7 100644 --- a/plugins/inputs/modbus/README.md +++ b/plugins/inputs/modbus/README.md @@ -129,7 +129,7 @@ from unsigned values). ### Example Output -``` +```sh $ ./telegraf -config telegraf.conf -input-filter modbus -test modbus.InputRegisters,host=orangepizero Current=0,Energy=0,Frecuency=60,Power=0,PowerFactor=0,Voltage=123.9000015258789 1554079521000000000 ``` diff --git a/plugins/inputs/mysql/README.md b/plugins/inputs/mysql/README.md index 8b4717168d7aa..644d4cf8d7887 100644 --- a/plugins/inputs/mysql/README.md +++ b/plugins/inputs/mysql/README.md @@ -117,7 +117,7 @@ InfluxDB due to the change of types. For this reason, you should keep the If preserving your old data is not required you may wish to drop conflicting measurements: -``` +```sql DROP SERIES from mysql DROP SERIES from mysql_variables DROP SERIES from mysql_innodb diff --git a/plugins/inputs/neptune_apex/README.md b/plugins/inputs/neptune_apex/README.md index 61919a5c6b4a7..6fd28a16a6d21 100644 --- a/plugins/inputs/neptune_apex/README.md +++ b/plugins/inputs/neptune_apex/README.md @@ -71,7 +71,7 @@ programming. These tags are clearly marked in the list below and should be consi Get the max, mean, and min for the temperature in the last hour: -``` +```sql SELECT mean("value") FROM "neptune_apex" WHERE ("probe_type" = 'Temp') AND time >= now() - 6h GROUP BY time(20s) ``` @@ -79,7 +79,7 @@ SELECT mean("value") FROM "neptune_apex" WHERE ("probe_type" = 'Temp') AND time #### sendRequest failure This indicates a problem communicating with the local Apex controller. If on Mac/Linux, try curl: -``` +```sh $ curl apex.local/cgi-bin/status.xml ``` to isolate the problem. diff --git a/plugins/inputs/net/NET_README.md b/plugins/inputs/net/NET_README.md index 3b1583211bd31..d2571d29e9ede 100644 --- a/plugins/inputs/net/NET_README.md +++ b/plugins/inputs/net/NET_README.md @@ -53,7 +53,7 @@ Under Linux the system wide protocol metrics have the interface=all tag. You can use the following query to get the upload/download traffic rate per second for all interfaces in the last hour. The query uses the [derivative function](https://docs.influxdata.com/influxdb/v1.2/query_language/functions#derivative) which calculates the rate of change between subsequent field values. -``` +```sql SELECT derivative(first(bytes_recv), 1s) as "download bytes/sec", derivative(first(bytes_sent), 1s) as "upload bytes/sec" FROM net WHERE time > now() - 1h AND interface != 'all' GROUP BY time(10s), interface fill(0); ``` @@ -70,4 +70,4 @@ net,interface=eth0,host=HOST bytes_sent=451838509i,bytes_recv=3284081640i,packet $ ./telegraf --config telegraf.conf --input-filter net --test net,interface=eth0,host=HOST bytes_sent=451838509i,bytes_recv=3284081640i,packets_sent=2663590i,packets_recv=3585442i,err_in=0i,err_out=0i,drop_in=4i,drop_out=0i 1492834180000000000 net,interface=all,host=HOST ip_reasmfails=0i,icmp_insrcquenchs=0i,icmp_outtimestamps=0i,ip_inhdrerrors=0i,ip_inunknownprotos=0i,icmp_intimeexcds=10i,icmp_outaddrmasks=0i,icmp_indestunreachs=11005i,icmpmsg_outtype0=6i,tcp_retranssegs=14669i,udplite_outdatagrams=0i,ip_reasmtimeout=0i,ip_outnoroutes=2577i,ip_inaddrerrors=186i,icmp_outaddrmaskreps=0i,tcp_incsumerrors=0i,tcp_activeopens=55965i,ip_reasmoks=0i,icmp_inechos=6i,icmp_outdestunreachs=9417i,ip_reasmreqds=0i,icmp_outtimestampreps=0i,tcp_rtoalgorithm=1i,icmpmsg_intype3=11005i,icmpmsg_outtype69=129i,tcp_outsegs=2777459i,udplite_rcvbuferrors=0i,ip_fragoks=0i,icmp_inmsgs=13398i,icmp_outerrors=0i,tcp_outrsts=14951i,udplite_noports=0i,icmp_outmsgs=11517i,icmp_outechoreps=6i,icmpmsg_intype11=10i,icmp_inparmprobs=0i,ip_forwdatagrams=0i,icmp_inechoreps=1909i,icmp_outredirects=0i,icmp_intimestampreps=0i,icmpmsg_intype5=468i,tcp_rtomax=120000i,tcp_maxconn=-1i,ip_fragcreates=0i,ip_fragfails=0i,icmp_inredirects=468i,icmp_outtimeexcds=0i,icmp_outechos=1965i,icmp_inaddrmasks=0i,tcp_inerrs=389i,tcp_rtomin=200i,ip_defaultttl=64i,ip_outrequests=3366408i,ip_forwarding=2i,udp_incsumerrors=0i,udp_indatagrams=522136i,udplite_incsumerrors=0i,ip_outdiscards=871i,icmp_inerrors=958i,icmp_outsrcquenchs=0i,icmpmsg_intype0=1909i,tcp_insegs=3580226i,udp_outdatagrams=577265i,udp_rcvbuferrors=0i,udplite_sndbuferrors=0i,icmp_incsumerrors=0i,icmp_outparmprobs=0i,icmpmsg_outtype3=9417i,tcp_attemptfails=2652i,udplite_inerrors=0i,udplite_indatagrams=0i,ip_inreceives=4172969i,icmpmsg_outtype8=1965i,tcp_currestab=59i,udp_noports=5961i,ip_indelivers=4099279i,ip_indiscards=0i,tcp_estabresets=5818i,udp_sndbuferrors=3i,icmp_intimestamps=0i,icmpmsg_intype8=6i,udp_inerrors=0i,icmp_inaddrmaskreps=0i,tcp_passiveopens=452i 1492831540000000000 -`` +``` diff --git a/plugins/inputs/nginx/README.md b/plugins/inputs/nginx/README.md index 7b5215dc3fdb0..de112e4d7c1e1 100644 --- a/plugins/inputs/nginx/README.md +++ b/plugins/inputs/nginx/README.md @@ -2,7 +2,7 @@ ### Configuration: -``` +```toml # Read Nginx's basic status information (ngx_http_stub_status_module) [[inputs.nginx]] ## An array of Nginx stub_status URI to gather stats. @@ -39,14 +39,14 @@ ### Example Output: Using this configuration: -``` +```toml [[inputs.nginx]] ## An array of Nginx stub_status URI to gather stats. urls = ["http://localhost/status"] ``` When run with: -``` +```sh ./telegraf --config telegraf.conf --input-filter nginx --test ``` diff --git a/plugins/inputs/nginx_plus/README.md b/plugins/inputs/nginx_plus/README.md index bfa9593c4ae39..03c651f91ff4f 100644 --- a/plugins/inputs/nginx_plus/README.md +++ b/plugins/inputs/nginx_plus/README.md @@ -7,7 +7,7 @@ Structures for Nginx Plus have been built based on history of ### Configuration: -``` +```toml # Read Nginx Plus' advanced status information [[inputs.nginx_plus]] ## An array of Nginx status URIs to gather stats. @@ -81,14 +81,14 @@ Structures for Nginx Plus have been built based on history of ### Example Output: Using this configuration: -``` +```toml [[inputs.nginx_plus]] ## An array of Nginx Plus status URIs to gather stats. urls = ["http://localhost/status"] ``` When run with: -``` +```sh ./telegraf -config telegraf.conf -input-filter nginx_plus -test ``` diff --git a/plugins/inputs/nginx_plus_api/README.md b/plugins/inputs/nginx_plus_api/README.md index 4ec63b2e80b53..96972496f413f 100644 --- a/plugins/inputs/nginx_plus_api/README.md +++ b/plugins/inputs/nginx_plus_api/README.md @@ -4,7 +4,7 @@ Nginx Plus is a commercial version of the open source web server Nginx. The use ### Configuration: -``` +```toml # Read Nginx Plus API advanced status information [[inputs.nginx_plus_api]] ## An array of Nginx API URIs to gather stats. @@ -201,14 +201,14 @@ Nginx Plus is a commercial version of the open source web server Nginx. The use ### Example Output: Using this configuration: -``` +```toml [[inputs.nginx_plus_api]] ## An array of Nginx Plus API URIs to gather stats. urls = ["http://localhost/api"] ``` When run with: -``` +```sh ./telegraf -config telegraf.conf -input-filter nginx_plus_api -test ``` diff --git a/plugins/inputs/nginx_upstream_check/README.md b/plugins/inputs/nginx_upstream_check/README.md index 4ff76889dc9d4..4a76a33392517 100644 --- a/plugins/inputs/nginx_upstream_check/README.md +++ b/plugins/inputs/nginx_upstream_check/README.md @@ -10,7 +10,7 @@ checks. This information can be exported in JSON format and parsed by this input ### Configuration: -``` +```toml ## An URL where Nginx Upstream check module is enabled ## It should be set to return a JSON formatted response url = "http://127.0.0.1/status?format=json" @@ -63,7 +63,7 @@ state of every server and, possible, add some monitoring to watch over it. Influ ### Example Output: When run with: -``` +```sh ./telegraf --config telegraf.conf --input-filter nginx_upstream_check --test ``` diff --git a/plugins/inputs/nginx_vts/README.md b/plugins/inputs/nginx_vts/README.md index ac22b7c2dbdc0..8ddf72d1c39ad 100644 --- a/plugins/inputs/nginx_vts/README.md +++ b/plugins/inputs/nginx_vts/README.md @@ -5,7 +5,7 @@ For module configuration details please see its [documentation](https://github.c ### Configuration: -``` +```toml # Read nginx status information using nginx-module-vts module [[inputs.nginx_vts]] ## An array of Nginx status URIs to gather stats. @@ -99,14 +99,14 @@ For module configuration details please see its [documentation](https://github.c ### Example Output: Using this configuration: -``` +```toml [[inputs.nginx_vts]] ## An array of Nginx status URIs to gather stats. urls = ["http://localhost/status"] ``` When run with: -``` +```sh ./telegraf -config telegraf.conf -input-filter nginx_vts -test ``` diff --git a/plugins/inputs/nvidia_smi/README.md b/plugins/inputs/nvidia_smi/README.md index 50077542d276a..e7685d652af83 100644 --- a/plugins/inputs/nvidia_smi/README.md +++ b/plugins/inputs/nvidia_smi/README.md @@ -57,7 +57,7 @@ You'll need to escape the `\` within the `telegraf.conf` like this: `C:\\Program The below query could be used to alert on the average temperature of the your GPUs over the last minute -``` +```sql SELECT mean("temperature_gpu") FROM "nvidia_smi" WHERE time > now() - 5m GROUP BY time(1m), "index", "name", "host" ``` @@ -66,7 +66,7 @@ SELECT mean("temperature_gpu") FROM "nvidia_smi" WHERE time > now() - 5m GROUP B Check the full output by running `nvidia-smi` binary manually. Linux: -``` +```sh sudo -u telegraf -- /usr/bin/nvidia-smi -q -x ``` diff --git a/plugins/inputs/openldap/README.md b/plugins/inputs/openldap/README.md index 48f29cb60d77f..cfd35b2cd7de3 100644 --- a/plugins/inputs/openldap/README.md +++ b/plugins/inputs/openldap/README.md @@ -35,7 +35,9 @@ To use this plugin you must enable the [slapd monitoring](https://www.openldap.o All **monitorCounter**, **monitoredInfo**, **monitorOpInitiated**, and **monitorOpCompleted** attributes are gathered based on this LDAP query: -```(|(objectClass=monitorCounterObject)(objectClass=monitorOperation)(objectClass=monitoredObject))``` +``` +(|(objectClass=monitorCounterObject)(objectClass=monitorOperation)(objectClass=monitoredObject)) +``` Metric names are based on their entry DN with the cn=Monitor base removed. If `reverse_metric_names` is not set, metrics are based on their DN. If `reverse_metric_names` is set to `true`, the names are reversed. This is recommended as it allows the names to sort more naturally. diff --git a/plugins/inputs/postgresql/README.md b/plugins/inputs/postgresql/README.md index 2ebc33ad6de58..fbc9f7680967a 100644 --- a/plugins/inputs/postgresql/README.md +++ b/plugins/inputs/postgresql/README.md @@ -57,7 +57,7 @@ host=localhost user=pgotest dbname=app_production sslmode=require sslkey=/etc/te ``` ### Configuration example -``` +```toml [[inputs.postgresql]] address = "postgres://telegraf@localhost/someDB" ignored_databases = ["template0", "template1"] diff --git a/plugins/inputs/postgresql_extensible/README.md b/plugins/inputs/postgresql_extensible/README.md index 5b121b66bdf81..1911aca537a3c 100644 --- a/plugins/inputs/postgresql_extensible/README.md +++ b/plugins/inputs/postgresql_extensible/README.md @@ -11,7 +11,7 @@ The example below has two queries are specified, with the following parameters: * The name of the measurement * A list of the columns to be defined as tags -``` +```toml [[inputs.postgresql_extensible]] # specify address via a url matching: # postgres://[pqgotest[:password]]@host:port[/dbname]?sslmode=... @@ -76,7 +76,7 @@ using postgresql extensions ([pg_stat_statements](http://www.postgresql.org/docs # Sample Queries : - telegraf.conf postgresql_extensible queries (assuming that you have configured correctly your connection) -``` +```toml [[inputs.postgresql_extensible.query]] sqlquery="SELECT * FROM pg_stat_database" version=901 diff --git a/plugins/inputs/powerdns/README.md b/plugins/inputs/powerdns/README.md index 2e245eeffba91..a6bad660fc37b 100644 --- a/plugins/inputs/powerdns/README.md +++ b/plugins/inputs/powerdns/README.md @@ -4,7 +4,7 @@ The powerdns plugin gathers metrics about PowerDNS using unix socket. ### Configuration: -``` +```toml # Description [[inputs.powerdns]] # An array of sockets to gather stats about. diff --git a/plugins/inputs/prometheus/README.md b/plugins/inputs/prometheus/README.md index b4e5874527c11..e9dd119cc12d4 100644 --- a/plugins/inputs/prometheus/README.md +++ b/plugins/inputs/prometheus/README.md @@ -103,7 +103,7 @@ If you want to monitor Caddy, you need to use Caddy with its Prometheus plugin: * Restart Caddy * Configure Telegraf to fetch metrics on it: -``` +```toml [[inputs.prometheus]] # ## An array of urls to scrape metrics from. urls = ["http://localhost:9180/metrics"] diff --git a/plugins/inputs/redis/README.md b/plugins/inputs/redis/README.md index aa10c2887e8e3..75223520ffd81 100644 --- a/plugins/inputs/redis/README.md +++ b/plugins/inputs/redis/README.md @@ -2,7 +2,7 @@ ### Configuration: -``` +```toml # Read Redis's basic status information [[inputs.redis]] ## specify servers via a url matching: @@ -153,7 +153,7 @@ Additionally the plugin also calculates the hit/miss ratio (keyspace\_hitrate) a ### Example Output: Using this configuration: -``` +```toml [[inputs.redis]] ## specify servers via a url matching: ## [protocol://][:password]@address[:port] diff --git a/plugins/inputs/sensors/README.md b/plugins/inputs/sensors/README.md index 19952fd82447e..1d900047cd3e4 100644 --- a/plugins/inputs/sensors/README.md +++ b/plugins/inputs/sensors/README.md @@ -6,7 +6,7 @@ package installed. This plugin collects sensor metrics with the `sensors` executable from the lm-sensor package. ### Configuration: -``` +```toml # Monitor sensors, requires lm-sensors package [[inputs.sensors]] ## Remove numbers from field names. diff --git a/plugins/inputs/solr/README.md b/plugins/inputs/solr/README.md index 458572825c0e1..e1d22cac6315b 100644 --- a/plugins/inputs/solr/README.md +++ b/plugins/inputs/solr/README.md @@ -9,7 +9,7 @@ Tested from 3.5 to 7.* ### Configuration: -``` +```toml [[inputs.solr]] ## specify a list of one or more Solr servers servers = ["http://localhost:8983"] diff --git a/plugins/inputs/synproxy/README.md b/plugins/inputs/synproxy/README.md index 4e275886fbfa9..efb8203515c69 100644 --- a/plugins/inputs/synproxy/README.md +++ b/plugins/inputs/synproxy/README.md @@ -29,14 +29,14 @@ The following synproxy counters are gathered ### Sample Queries Get the number of packets per 5 minutes for the measurement in the last hour from InfluxDB: -``` +```sql SELECT difference(last("cookie_invalid")) AS "cookie_invalid", difference(last("cookie_retrans")) AS "cookie_retrans", difference(last("cookie_valid")) AS "cookie_valid", difference(last("entries")) AS "entries", difference(last("syn_received")) AS "syn_received", difference(last("conn_reopened")) AS "conn_reopened" FROM synproxy WHERE time > NOW() - 1h GROUP BY time(5m) FILL(null); ``` ### Troubleshooting Execute the following CLI command in Linux to test the synproxy counters: -``` +```sh cat /proc/net/stat/synproxy ``` diff --git a/plugins/inputs/teamspeak/README.md b/plugins/inputs/teamspeak/README.md index 84c4297e882ba..4767bb7e35171 100644 --- a/plugins/inputs/teamspeak/README.md +++ b/plugins/inputs/teamspeak/README.md @@ -7,7 +7,7 @@ the [Teamspeak 3 ServerQuery Manual](http://media.teamspeak.com/ts3_literature/T ### Configuration: -``` +```toml # Reads metrics from a Teamspeak 3 Server via ServerQuery [[inputs.teamspeak]] ## Server address for Teamspeak 3 ServerQuery diff --git a/plugins/inputs/vsphere/README.md b/plugins/inputs/vsphere/README.md index ef9e610fdf7e7..108637bab05d7 100644 --- a/plugins/inputs/vsphere/README.md +++ b/plugins/inputs/vsphere/README.md @@ -19,7 +19,7 @@ For example, to disable collection of VMs, add this: vm_metric_exclude = [ "*" ] ``` -``` +```toml # Read metrics from one or many vCenters [[inputs.vsphere]] ## List of vCenter URLs to be monitored. These three lines must be uncommented @@ -286,7 +286,7 @@ This distinction has an impact on how Telegraf collects metrics. A single instan This will disrupt the metric collection and can result in missed samples. The best practice workaround is to specify two instances of the vSphere plugin, one for the realtime metrics with a short collection interval and one for the historical metrics with a longer interval. You can use the ```*_metric_exclude``` to turn off the resources you don't want to collect metrics for in each instance. For example: -``` +```toml ## Realtime instance [[inputs.vsphere]] interval = "60s" diff --git a/plugins/inputs/webhooks/particle/README.md b/plugins/inputs/webhooks/particle/README.md index 4dc83b3479261..8244fee8add1b 100644 --- a/plugins/inputs/webhooks/particle/README.md +++ b/plugins/inputs/webhooks/particle/README.md @@ -3,7 +3,7 @@ You should configure your Particle.io's Webhooks to point at the `webhooks` service. To do this go to [https://console.particle.io](https://console.particle.io/) and click `Integrations > New Integration > Webhook`. In the resulting page set `URL` to `http://:1619/particle`, and under `Advanced Settings` click on `JSON` and add: -``` +```json { "measurement": "your_measurement_name" } diff --git a/plugins/inputs/win_perf_counters/README.md b/plugins/inputs/win_perf_counters/README.md index 11496baff1c7a..50e7b2c335427 100644 --- a/plugins/inputs/win_perf_counters/README.md +++ b/plugins/inputs/win_perf_counters/README.md @@ -173,7 +173,7 @@ if any of the combinations of ObjectName/Instances/Counters are invalid. ## Examples ### Generic Queries -``` +```toml [[inputs.win_perf_counters]] [[inputs.win_perf_counters.object]] # Processor usage, alternative to native, reports on a per core. @@ -217,7 +217,7 @@ if any of the combinations of ObjectName/Instances/Counters are invalid. ``` ### Active Directory Domain Controller -``` +```toml [[inputs.win_perf_counters]] [inputs.win_perf_counters.tags] monitorgroup = "ActiveDirectory" @@ -245,7 +245,7 @@ if any of the combinations of ObjectName/Instances/Counters are invalid. ``` ### DFS Namespace + Domain Controllers -``` +```toml [[inputs.win_perf_counters]] [[inputs.win_perf_counters.object]] # AD, DFS N, Useful if the server hosts a DFS Namespace or is a Domain Controller @@ -258,7 +258,7 @@ if any of the combinations of ObjectName/Instances/Counters are invalid. ``` ### DFS Replication + Domain Controllers -``` +```toml [[inputs.win_perf_counters]] [[inputs.win_perf_counters.object]] # AD, DFS R, Useful if the server hosts a DFS Replication folder or is a Domain Controller @@ -271,7 +271,7 @@ if any of the combinations of ObjectName/Instances/Counters are invalid. ``` ### DNS Server + Domain Controllers -``` +```toml [[inputs.win_perf_counters]] [[inputs.win_perf_counters.object]] ObjectName = "DNS" @@ -282,7 +282,7 @@ if any of the combinations of ObjectName/Instances/Counters are invalid. ``` ### IIS / ASP.NET -``` +```toml [[inputs.win_perf_counters]] [[inputs.win_perf_counters.object]] # HTTP Service request queues in the Kernel before being handed over to User Mode. @@ -326,7 +326,7 @@ if any of the combinations of ObjectName/Instances/Counters are invalid. ``` ### Process -``` +```toml [[inputs.win_perf_counters]] [[inputs.win_perf_counters.object]] # Process metrics, in this case for IIS only @@ -338,7 +338,7 @@ if any of the combinations of ObjectName/Instances/Counters are invalid. ``` ### .NET Monitoring -``` +```toml [[inputs.win_perf_counters]] [[inputs.win_perf_counters.object]] # .NET CLR Exceptions, in this case for IIS only diff --git a/plugins/outputs/opentsdb/README.md b/plugins/outputs/opentsdb/README.md index 2fd0bd2d86d48..f737d48ae7e94 100644 --- a/plugins/outputs/opentsdb/README.md +++ b/plugins/outputs/opentsdb/README.md @@ -48,7 +48,7 @@ put nine.telegraf.ping_average_response_ms 1441910366 24.006000 dc=homeoffice ho The OpenTSDB telnet interface can be simulated with this reader: -``` +```go // opentsdb_telnet_mode_mock.go package main diff --git a/plugins/parsers/csv/README.md b/plugins/parsers/csv/README.md index 6a81c46ed44f6..b44d2fc2d2576 100644 --- a/plugins/parsers/csv/README.md +++ b/plugins/parsers/csv/README.md @@ -100,7 +100,7 @@ columns and rows. ### Examples Config: -``` +```toml [[inputs.file]] files = ["example"] data_format = "csv"