fix: markdown: resolve all markdown issues with g-h (#10172)
This commit is contained in:
parent
0c02f245d6
commit
79e479c691
|
|
@ -5,14 +5,14 @@ Gather repository information from [GitHub][] hosted repositories.
|
||||||
**Note:** Telegraf also contains the [webhook][] input which can be used as an
|
**Note:** Telegraf also contains the [webhook][] input which can be used as an
|
||||||
alternative method for collecting repository information.
|
alternative method for collecting repository information.
|
||||||
|
|
||||||
### Configuration
|
## Configuration
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[[inputs.github]]
|
[[inputs.github]]
|
||||||
## List of repositories to monitor
|
## List of repositories to monitor
|
||||||
repositories = [
|
repositories = [
|
||||||
"influxdata/telegraf",
|
"influxdata/telegraf",
|
||||||
"influxdata/influxdb"
|
"influxdata/influxdb"
|
||||||
]
|
]
|
||||||
|
|
||||||
## Github API access token. Unauthenticated requests are limited to 60 per hour.
|
## Github API access token. Unauthenticated requests are limited to 60 per hour.
|
||||||
|
|
@ -25,11 +25,11 @@ alternative method for collecting repository information.
|
||||||
# http_timeout = "5s"
|
# http_timeout = "5s"
|
||||||
|
|
||||||
## List of additional fields to query.
|
## List of additional fields to query.
|
||||||
## NOTE: Getting those fields might involve issuing additional API-calls, so please
|
## NOTE: Getting those fields might involve issuing additional API-calls, so please
|
||||||
## make sure you do not exceed the rate-limit of GitHub.
|
## make sure you do not exceed the rate-limit of GitHub.
|
||||||
##
|
##
|
||||||
## Available fields are:
|
## Available fields are:
|
||||||
## - pull-requests -- number of open and closed pull requests (2 API-calls per repository)
|
## - pull-requests -- number of open and closed pull requests (2 API-calls per repository)
|
||||||
# additional_fields = []
|
# additional_fields = []
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -52,7 +52,7 @@ alternative method for collecting repository information.
|
||||||
|
|
||||||
When the [internal][] input is enabled:
|
When the [internal][] input is enabled:
|
||||||
|
|
||||||
+ internal_github
|
- internal_github
|
||||||
- tags:
|
- tags:
|
||||||
- access_token - An obfuscated reference to the configured access token or "Unauthenticated"
|
- access_token - An obfuscated reference to the configured access token or "Unauthenticated"
|
||||||
- fields:
|
- fields:
|
||||||
|
|
@ -72,7 +72,7 @@ In the following we list the available options with the required API-calls and t
|
||||||
|
|
||||||
### Example Output
|
### Example Output
|
||||||
|
|
||||||
```
|
```shell
|
||||||
github_repository,language=Go,license=MIT\ License,name=telegraf,owner=influxdata forks=2679i,networks=2679i,open_issues=794i,size=23263i,stars=7091i,subscribers=316i,watchers=7091i 1563901372000000000
|
github_repository,language=Go,license=MIT\ License,name=telegraf,owner=influxdata forks=2679i,networks=2679i,open_issues=794i,size=23263i,stars=7091i,subscribers=316i,watchers=7091i 1563901372000000000
|
||||||
internal_github,access_token=Unauthenticated closed_pull_requests=3522i,rate_limit_remaining=59i,rate_limit_limit=60i,rate_limit_blocks=0i,open_pull_requests=260i 1552653551000000000
|
internal_github,access_token=Unauthenticated closed_pull_requests=3522i,rate_limit_remaining=59i,rate_limit_limit=60i,rate_limit_blocks=0i,open_pull_requests=260i 1552653551000000000
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,10 @@
|
||||||
This plugin consumes telemetry data based on the [gNMI](https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md) Subscribe method. TLS is supported for authentication and encryption. This input plugin is vendor-agnostic and is supported on any platform that supports the gNMI spec.
|
This plugin consumes telemetry data based on the [gNMI](https://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-specification.md) Subscribe method. TLS is supported for authentication and encryption. This input plugin is vendor-agnostic and is supported on any platform that supports the gNMI spec.
|
||||||
|
|
||||||
For Cisco devices:
|
For Cisco devices:
|
||||||
|
|
||||||
It has been optimized to support gNMI telemetry as produced by Cisco IOS XR (64-bit) version 6.5.1, Cisco NX-OS 9.3 and Cisco IOS XE 16.12 and later.
|
It has been optimized to support gNMI telemetry as produced by Cisco IOS XR (64-bit) version 6.5.1, Cisco NX-OS 9.3 and Cisco IOS XE 16.12 and later.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
### Configuration
|
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[[inputs.gnmi]]
|
[[inputs.gnmi]]
|
||||||
|
|
@ -66,8 +66,9 @@ It has been optimized to support gNMI telemetry as produced by Cisco IOS XR (64-
|
||||||
# heartbeat_interval = "60s"
|
# heartbeat_interval = "60s"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Example Output
|
## Example Output
|
||||||
```
|
|
||||||
|
```shell
|
||||||
ifcounters,path=openconfig-interfaces:/interfaces/interface/state/counters,host=linux,name=MgmtEth0/RP0/CPU0/0,source=10.49.234.115 in-multicast-pkts=0i,out-multicast-pkts=0i,out-errors=0i,out-discards=0i,in-broadcast-pkts=0i,out-broadcast-pkts=0i,in-discards=0i,in-unknown-protos=0i,in-errors=0i,out-unicast-pkts=0i,in-octets=0i,out-octets=0i,last-clear="2019-05-22T16:53:21Z",in-unicast-pkts=0i 1559145777425000000
|
ifcounters,path=openconfig-interfaces:/interfaces/interface/state/counters,host=linux,name=MgmtEth0/RP0/CPU0/0,source=10.49.234.115 in-multicast-pkts=0i,out-multicast-pkts=0i,out-errors=0i,out-discards=0i,in-broadcast-pkts=0i,out-broadcast-pkts=0i,in-discards=0i,in-unknown-protos=0i,in-errors=0i,out-unicast-pkts=0i,in-octets=0i,out-octets=0i,last-clear="2019-05-22T16:53:21Z",in-unicast-pkts=0i 1559145777425000000
|
||||||
ifcounters,path=openconfig-interfaces:/interfaces/interface/state/counters,host=linux,name=GigabitEthernet0/0/0/0,source=10.49.234.115 out-multicast-pkts=0i,out-broadcast-pkts=0i,in-errors=0i,out-errors=0i,in-discards=0i,out-octets=0i,in-unknown-protos=0i,in-unicast-pkts=0i,in-octets=0i,in-multicast-pkts=0i,in-broadcast-pkts=0i,last-clear="2019-05-22T16:54:50Z",out-unicast-pkts=0i,out-discards=0i 1559145777425000000
|
ifcounters,path=openconfig-interfaces:/interfaces/interface/state/counters,host=linux,name=GigabitEthernet0/0/0/0,source=10.49.234.115 out-multicast-pkts=0i,out-broadcast-pkts=0i,in-errors=0i,out-errors=0i,in-discards=0i,out-octets=0i,in-unknown-protos=0i,in-unicast-pkts=0i,in-octets=0i,in-multicast-pkts=0i,in-broadcast-pkts=0i,last-clear="2019-05-22T16:54:50Z",out-unicast-pkts=0i,out-discards=0i 1559145777425000000
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -4,15 +4,14 @@ The Graylog plugin can collect data from remote Graylog service URLs.
|
||||||
|
|
||||||
Plugin currently support two type of end points:-
|
Plugin currently support two type of end points:-
|
||||||
|
|
||||||
- multiple (Ex http://[graylog-server-ip]:12900/system/metrics/multiple)
|
- multiple (e.g. `http://[graylog-server-ip]:12900/system/metrics/multiple`)
|
||||||
- namespace (Ex http://[graylog-server-ip]:12900/system/metrics/namespace/{namespace})
|
- namespace (e.g. `http://[graylog-server-ip]:12900/system/metrics/namespace/{namespace}`)
|
||||||
|
|
||||||
End Point can be a mix of one multiple end point and several namespaces end points
|
End Point can be a mix of one multiple end point and several namespaces end points
|
||||||
|
|
||||||
|
|
||||||
Note: if namespace end point specified metrics array will be ignored for that call.
|
Note: if namespace end point specified metrics array will be ignored for that call.
|
||||||
|
|
||||||
### Configuration:
|
## Configuration
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
# Read flattened metrics from one or more GrayLog HTTP endpoints
|
# Read flattened metrics from one or more GrayLog HTTP endpoints
|
||||||
|
|
@ -52,4 +51,4 @@ Note: if namespace end point specified metrics array will be ignored for that ca
|
||||||
# insecure_skip_verify = false
|
# insecure_skip_verify = false
|
||||||
```
|
```
|
||||||
|
|
||||||
Please refer to GrayLog metrics api browser for full metric end points http://host:12900/api-browser
|
Please refer to GrayLog metrics api browser for full metric end points `http://host:12900/api-browser`
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ The [HAProxy](http://www.haproxy.org/) input plugin gathers
|
||||||
using the [stats socket](https://cbonte.github.io/haproxy-dconv/1.9/management.html#9.3)
|
using the [stats socket](https://cbonte.github.io/haproxy-dconv/1.9/management.html#9.3)
|
||||||
or [HTTP statistics page](https://cbonte.github.io/haproxy-dconv/1.9/management.html#9) of a HAProxy server.
|
or [HTTP statistics page](https://cbonte.github.io/haproxy-dconv/1.9/management.html#9) of a HAProxy server.
|
||||||
|
|
||||||
### Configuration:
|
## Configuration
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
# Read metrics of HAProxy, via socket or HTTP stats page
|
# Read metrics of HAProxy, via socket or HTTP stats page
|
||||||
|
|
@ -40,7 +40,7 @@ or [HTTP statistics page](https://cbonte.github.io/haproxy-dconv/1.9/management.
|
||||||
# insecure_skip_verify = false
|
# insecure_skip_verify = false
|
||||||
```
|
```
|
||||||
|
|
||||||
#### HAProxy Configuration
|
### HAProxy Configuration
|
||||||
|
|
||||||
The following information may be useful when getting started, but please
|
The following information may be useful when getting started, but please
|
||||||
consult the HAProxy documentation for complete and up to date instructions.
|
consult the HAProxy documentation for complete and up to date instructions.
|
||||||
|
|
@ -51,8 +51,7 @@ settings. To enable the unix socket begin by reading about the
|
||||||
[`stats socket`](https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#3.1-stats%20socket)
|
[`stats socket`](https://cbonte.github.io/haproxy-dconv/1.8/configuration.html#3.1-stats%20socket)
|
||||||
option.
|
option.
|
||||||
|
|
||||||
|
### servers
|
||||||
#### servers
|
|
||||||
|
|
||||||
Server addresses must explicitly start with 'http' if you wish to use HAProxy
|
Server addresses must explicitly start with 'http' if you wish to use HAProxy
|
||||||
status page. Otherwise, addresses will be assumed to be an UNIX socket and
|
status page. Otherwise, addresses will be assumed to be an UNIX socket and
|
||||||
|
|
@ -65,14 +64,14 @@ To use HTTP Basic Auth add the username and password in the userinfo section
|
||||||
of the URL: `http://user:password@1.2.3.4/haproxy?stats`. The credentials are
|
of the URL: `http://user:password@1.2.3.4/haproxy?stats`. The credentials are
|
||||||
sent via the `Authorization` header and not using the request URL.
|
sent via the `Authorization` header and not using the request URL.
|
||||||
|
|
||||||
|
### keep_field_names
|
||||||
#### keep_field_names
|
|
||||||
|
|
||||||
By default, some of the fields are renamed from what haproxy calls them.
|
By default, some of the fields are renamed from what haproxy calls them.
|
||||||
Setting the `keep_field_names` parameter to `true` will result in the plugin
|
Setting the `keep_field_names` parameter to `true` will result in the plugin
|
||||||
keeping the original field names.
|
keeping the original field names.
|
||||||
|
|
||||||
The following renames are made:
|
The following renames are made:
|
||||||
|
|
||||||
- `pxname` -> `proxy`
|
- `pxname` -> `proxy`
|
||||||
- `svname` -> `sv`
|
- `svname` -> `sv`
|
||||||
- `act` -> `active_servers`
|
- `act` -> `active_servers`
|
||||||
|
|
@ -86,7 +85,7 @@ The following renames are made:
|
||||||
- `hrsp_5xx` -> `http_response.5xx`
|
- `hrsp_5xx` -> `http_response.5xx`
|
||||||
- `hrsp_other` -> `http_response.other`
|
- `hrsp_other` -> `http_response.other`
|
||||||
|
|
||||||
### Metrics:
|
## Metrics
|
||||||
|
|
||||||
For more details about collected metrics reference the [HAProxy CSV format
|
For more details about collected metrics reference the [HAProxy CSV format
|
||||||
documentation](https://cbonte.github.io/haproxy-dconv/1.8/management.html#9.1).
|
documentation](https://cbonte.github.io/haproxy-dconv/1.8/management.html#9.1).
|
||||||
|
|
@ -110,7 +109,8 @@ documentation](https://cbonte.github.io/haproxy-dconv/1.8/management.html#9.1).
|
||||||
- `lastsess` (int)
|
- `lastsess` (int)
|
||||||
- **all other stats** (int)
|
- **all other stats** (int)
|
||||||
|
|
||||||
### Example Output:
|
## Example Output
|
||||||
```
|
|
||||||
|
```shell
|
||||||
haproxy,server=/run/haproxy/admin.sock,proxy=public,sv=FRONTEND,type=frontend http_response.other=0i,req_rate_max=1i,comp_byp=0i,status="OPEN",rate_lim=0i,dses=0i,req_rate=0i,comp_rsp=0i,bout=9287i,comp_in=0i,mode="http",smax=1i,slim=2000i,http_response.1xx=0i,conn_rate=0i,dreq=0i,ereq=0i,iid=2i,rate_max=1i,http_response.2xx=1i,comp_out=0i,intercepted=1i,stot=2i,pid=1i,http_response.5xx=1i,http_response.3xx=0i,http_response.4xx=0i,conn_rate_max=1i,conn_tot=2i,dcon=0i,bin=294i,rate=0i,sid=0i,req_tot=2i,scur=0i,dresp=0i 1513293519000000000
|
haproxy,server=/run/haproxy/admin.sock,proxy=public,sv=FRONTEND,type=frontend http_response.other=0i,req_rate_max=1i,comp_byp=0i,status="OPEN",rate_lim=0i,dses=0i,req_rate=0i,comp_rsp=0i,bout=9287i,comp_in=0i,mode="http",smax=1i,slim=2000i,http_response.1xx=0i,conn_rate=0i,dreq=0i,ereq=0i,iid=2i,rate_max=1i,http_response.2xx=1i,comp_out=0i,intercepted=1i,stot=2i,pid=1i,http_response.5xx=1i,http_response.3xx=0i,http_response.4xx=0i,conn_rate_max=1i,conn_tot=2i,dcon=0i,bin=294i,rate=0i,sid=0i,req_tot=2i,scur=0i,dresp=0i 1513293519000000000
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ This plugin reads data from hddtemp daemon.
|
||||||
|
|
||||||
Hddtemp should be installed and its daemon running.
|
Hddtemp should be installed and its daemon running.
|
||||||
|
|
||||||
### Configuration
|
## Configuration
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[[inputs.hddtemp]]
|
[[inputs.hddtemp]]
|
||||||
|
|
@ -19,7 +19,7 @@ Hddtemp should be installed and its daemon running.
|
||||||
# devices = ["sda", "*"]
|
# devices = ["sda", "*"]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Metrics
|
## Metrics
|
||||||
|
|
||||||
- hddtemp
|
- hddtemp
|
||||||
- tags:
|
- tags:
|
||||||
|
|
@ -31,10 +31,9 @@ Hddtemp should be installed and its daemon running.
|
||||||
- fields:
|
- fields:
|
||||||
- temperature
|
- temperature
|
||||||
|
|
||||||
|
## Example output
|
||||||
|
|
||||||
### Example output
|
```shell
|
||||||
|
|
||||||
```
|
|
||||||
hddtemp,source=server1,unit=C,status=,device=sdb,model=WDC\ WD740GD-00FLA1 temperature=43i 1481655647000000000
|
hddtemp,source=server1,unit=C,status=,device=sdb,model=WDC\ WD740GD-00FLA1 temperature=43i 1481655647000000000
|
||||||
hddtemp,device=sdc,model=SAMSUNG\ HD103UI,unit=C,source=server1,status= temperature=38i 148165564700000000
|
hddtemp,device=sdc,model=SAMSUNG\ HD103UI,unit=C,source=server1,status= temperature=38i 148165564700000000
|
||||||
hddtemp,device=sdd,model=SAMSUNG\ HD103UI,unit=C,source=server1,status= temperature=36i 1481655647000000000
|
hddtemp,device=sdd,model=SAMSUNG\ HD103UI,unit=C,source=server1,status= temperature=36i 1481655647000000000
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,7 @@
|
||||||
|
|
||||||
The HTTP input plugin collects metrics from one or more HTTP(S) endpoints. The endpoint should have metrics formatted in one of the supported [input data formats](../../../docs/DATA_FORMATS_INPUT.md). Each data format has its own unique set of configuration options which can be added to the input configuration.
|
The HTTP input plugin collects metrics from one or more HTTP(S) endpoints. The endpoint should have metrics formatted in one of the supported [input data formats](../../../docs/DATA_FORMATS_INPUT.md). Each data format has its own unique set of configuration options which can be added to the input configuration.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
### Configuration:
|
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
# Read formatted metrics from one or more HTTP endpoints
|
# Read formatted metrics from one or more HTTP endpoints
|
||||||
|
|
@ -73,7 +72,7 @@ The HTTP input plugin collects metrics from one or more HTTP(S) endpoints. The
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Metrics:
|
## Metrics
|
||||||
|
|
||||||
The metrics collected by this input plugin will depend on the configured `data_format` and the payload returned by the HTTP endpoint(s).
|
The metrics collected by this input plugin will depend on the configured `data_format` and the payload returned by the HTTP endpoint(s).
|
||||||
|
|
||||||
|
|
@ -83,6 +82,6 @@ The default values below are added if the input format does not specify a value:
|
||||||
- tags:
|
- tags:
|
||||||
- url
|
- url
|
||||||
|
|
||||||
### Optional Cookie Authentication Settings:
|
## Optional Cookie Authentication Settings
|
||||||
|
|
||||||
The optional Cookie Authentication Settings will retrieve a cookie from the given authorization endpoint, and use it in subsequent API requests. This is useful for services that do not provide OAuth or Basic Auth authentication, e.g. the [Tesla Powerwall API](https://www.tesla.com/support/energy/powerwall/own/monitoring-from-home-network), which uses a Cookie Auth Body to retrieve an authorization cookie. The Cookie Auth Renewal interval will renew the authorization by retrieving a new cookie at the given interval.
|
The optional Cookie Authentication Settings will retrieve a cookie from the given authorization endpoint, and use it in subsequent API requests. This is useful for services that do not provide OAuth or Basic Auth authentication, e.g. the [Tesla Powerwall API](https://www.tesla.com/support/energy/powerwall/own/monitoring-from-home-network), which uses a Cookie Auth Body to retrieve an authorization cookie. The Cookie Auth Renewal interval will renew the authorization by retrieving a new cookie at the given interval.
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ or [`influxdb_v2_listener`][influxdb_v2_listener] instead.
|
||||||
`influxdb_listener`. If you would like Telegraf to act as a proxy/relay for
|
`influxdb_listener`. If you would like Telegraf to act as a proxy/relay for
|
||||||
InfluxDB it is recommended to use [`influxdb_listener`][influxdb_listener] or [`influxdb_v2_listener`][influxdb_v2_listener].
|
InfluxDB it is recommended to use [`influxdb_listener`][influxdb_listener] or [`influxdb_v2_listener`][influxdb_v2_listener].
|
||||||
|
|
||||||
### Configuration:
|
## Configuration
|
||||||
|
|
||||||
This is a sample configuration for the plugin.
|
This is a sample configuration for the plugin.
|
||||||
|
|
||||||
|
|
@ -69,24 +69,27 @@ This is a sample configuration for the plugin.
|
||||||
data_format = "influx"
|
data_format = "influx"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Metrics:
|
## Metrics
|
||||||
|
|
||||||
Metrics are collected from the part of the request specified by the `data_source` param and are parsed depending on the value of `data_format`.
|
Metrics are collected from the part of the request specified by the `data_source` param and are parsed depending on the value of `data_format`.
|
||||||
|
|
||||||
### Troubleshooting:
|
## Troubleshooting
|
||||||
|
|
||||||
**Send Line Protocol**
|
Send Line Protocol:
|
||||||
```
|
|
||||||
|
```shell
|
||||||
curl -i -XPOST 'http://localhost:8080/telegraf' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'
|
curl -i -XPOST 'http://localhost:8080/telegraf' --data-binary 'cpu_load_short,host=server01,region=us-west value=0.64 1434055562000000000'
|
||||||
```
|
```
|
||||||
|
|
||||||
**Send JSON**
|
Send JSON:
|
||||||
```
|
|
||||||
|
```shell
|
||||||
curl -i -XPOST 'http://localhost:8080/telegraf' --data-binary '{"value1": 42, "value2": 42}'
|
curl -i -XPOST 'http://localhost:8080/telegraf' --data-binary '{"value1": 42, "value2": 42}'
|
||||||
```
|
```
|
||||||
|
|
||||||
**Send query params**
|
Send query params:
|
||||||
```
|
|
||||||
|
```shell
|
||||||
curl -i -XGET 'http://localhost:8080/telegraf?host=server01&value=0.42'
|
curl -i -XGET 'http://localhost:8080/telegraf?host=server01&value=0.42'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
This input plugin checks HTTP/HTTPS connections.
|
This input plugin checks HTTP/HTTPS connections.
|
||||||
|
|
||||||
### Configuration:
|
## Configuration
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
# HTTP/HTTPS request given an address a method and a timeout
|
# HTTP/HTTPS request given an address a method and a timeout
|
||||||
|
|
@ -79,7 +79,7 @@ This input plugin checks HTTP/HTTPS connections.
|
||||||
# interface = "eth0"
|
# interface = "eth0"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Metrics:
|
## Metrics
|
||||||
|
|
||||||
- http_response
|
- http_response
|
||||||
- tags:
|
- tags:
|
||||||
|
|
@ -96,7 +96,7 @@ This input plugin checks HTTP/HTTPS connections.
|
||||||
- result_type (string, deprecated in 1.6: use `result` tag and `result_code` field)
|
- result_type (string, deprecated in 1.6: use `result` tag and `result_code` field)
|
||||||
- result_code (int, [see below](#result--result_code))
|
- result_code (int, [see below](#result--result_code))
|
||||||
|
|
||||||
#### `result` / `result_code`
|
### `result` / `result_code`
|
||||||
|
|
||||||
Upon finishing polling the target server, the plugin registers the result of the operation in the `result` tag, and adds a numeric field called `result_code` corresponding with that tag value.
|
Upon finishing polling the target server, the plugin registers the result of the operation in the `result` tag, and adds a numeric field called `result_code` corresponding with that tag value.
|
||||||
|
|
||||||
|
|
@ -112,9 +112,8 @@ This tag is used to expose network and plugin errors. HTTP errors are considered
|
||||||
|dns_error | 5 |There was a DNS error while attempting to connect to the host|
|
|dns_error | 5 |There was a DNS error while attempting to connect to the host|
|
||||||
|response_status_code_mismatch | 6 |The option `response_status_code_match` was used, and the status code of the response didn't match the value.|
|
|response_status_code_mismatch | 6 |The option `response_status_code_match` was used, and the status code of the response didn't match the value.|
|
||||||
|
|
||||||
|
## Example Output
|
||||||
|
|
||||||
### Example Output:
|
```shell
|
||||||
|
|
||||||
```
|
|
||||||
http_response,method=GET,result=success,server=http://github.com,status_code=200 content_length=87878i,http_response_code=200i,response_time=0.937655534,result_code=0i,result_type="success" 1565839598000000000
|
http_response,method=GET,result=success,server=http://github.com,status_code=200 content_length=87878i,http_response_code=200i,response_time=0.937655534,result_code=0i,result_type="success" 1565839598000000000
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
# HTTP JSON Input Plugin
|
# HTTP JSON Input Plugin
|
||||||
|
|
||||||
### DEPRECATED in Telegraf v1.6: Use [HTTP input plugin](../http) as replacement.
|
**DEPRECATED in Telegraf v1.6: Use [HTTP input plugin](../http) as replacement**
|
||||||
|
|
||||||
The httpjson plugin collects data from HTTP URLs which respond with JSON. It flattens the JSON and finds all numeric values, treating them as floats.
|
The httpjson plugin collects data from HTTP URLs which respond with JSON. It flattens the JSON and finds all numeric values, treating them as floats.
|
||||||
|
|
||||||
### Configuration:
|
## Configuration
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
[[inputs.httpjson]]
|
[[inputs.httpjson]]
|
||||||
|
|
@ -54,28 +54,28 @@ The httpjson plugin collects data from HTTP URLs which respond with JSON. It fl
|
||||||
# apiVersion = "v1"
|
# apiVersion = "v1"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Measurements & Fields:
|
## Measurements & Fields
|
||||||
|
|
||||||
- httpjson
|
- httpjson
|
||||||
- response_time (float): Response time in seconds
|
- response_time (float): Response time in seconds
|
||||||
|
|
||||||
Additional fields are dependant on the response of the remote service being polled.
|
Additional fields are dependant on the response of the remote service being polled.
|
||||||
|
|
||||||
### Tags:
|
## Tags
|
||||||
|
|
||||||
- All measurements have the following tags:
|
- All measurements have the following tags:
|
||||||
- server: HTTP origin as defined in configuration as `servers`.
|
- server: HTTP origin as defined in configuration as `servers`.
|
||||||
|
|
||||||
Any top level keys listed under `tag_keys` in the configuration are added as tags. Top level keys are defined as keys in the root level of the object in a single object response, or in the root level of each object within an array of objects.
|
Any top level keys listed under `tag_keys` in the configuration are added as tags. Top level keys are defined as keys in the root level of the object in a single object response, or in the root level of each object within an array of objects.
|
||||||
|
|
||||||
|
## Examples Output
|
||||||
### Examples Output:
|
|
||||||
|
|
||||||
This plugin understands responses containing a single JSON object, or a JSON Array of Objects.
|
This plugin understands responses containing a single JSON object, or a JSON Array of Objects.
|
||||||
|
|
||||||
**Object Output:**
|
**Object Output:**
|
||||||
|
|
||||||
Given the following response body:
|
Given the following response body:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"a": 0.5,
|
"a": 0.5,
|
||||||
|
|
@ -87,6 +87,7 @@ Given the following response body:
|
||||||
"service": "service01"
|
"service": "service01"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
The following metric is produced:
|
The following metric is produced:
|
||||||
|
|
||||||
`httpjson,server=http://localhost:9999/stats/ b_d=0.1,a=0.5,b_e=5,response_time=0.001`
|
`httpjson,server=http://localhost:9999/stats/ b_d=0.1,a=0.5,b_e=5,response_time=0.001`
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue