parent
91957f0848
commit
9347a70425
|
@ -6,7 +6,7 @@ For example, if you have a service called _mycollector_, which has HTTP endpoint
|
||||||
plugin like this:
|
plugin like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
[[httpjson.services]]
|
[[inputs.httpjson]]
|
||||||
name = "mycollector"
|
name = "mycollector"
|
||||||
|
|
||||||
servers = [
|
servers = [
|
||||||
|
@ -24,7 +24,7 @@ plugin like this:
|
||||||
You can also specify which keys from server response should be considered tags:
|
You can also specify which keys from server response should be considered tags:
|
||||||
|
|
||||||
```
|
```
|
||||||
[[httpjson.services]]
|
[[inputs.httpjson]]
|
||||||
...
|
...
|
||||||
|
|
||||||
tag_keys = [
|
tag_keys = [
|
||||||
|
@ -36,10 +36,10 @@ You can also specify which keys from server response should be considered tags:
|
||||||
You can also specify additional request parameters for the service:
|
You can also specify additional request parameters for the service:
|
||||||
|
|
||||||
```
|
```
|
||||||
[[httpjson.services]]
|
[[inputs.httpjson]]
|
||||||
...
|
...
|
||||||
|
|
||||||
[httpjson.services.parameters]
|
[inputs.httpjson.parameters]
|
||||||
event_type = "cpu_spike"
|
event_type = "cpu_spike"
|
||||||
threshold = "0.75"
|
threshold = "0.75"
|
||||||
|
|
||||||
|
@ -48,10 +48,10 @@ You can also specify additional request parameters for the service:
|
||||||
You can also specify additional request header parameters for the service:
|
You can also specify additional request header parameters for the service:
|
||||||
|
|
||||||
```
|
```
|
||||||
[[httpjson.services]]
|
[[inputs.httpjson]]
|
||||||
...
|
...
|
||||||
|
|
||||||
[httpjson.services.headers]
|
[inputs.httpjson.headers]
|
||||||
X-Auth-Token = "my-xauth-token"
|
X-Auth-Token = "my-xauth-token"
|
||||||
apiVersion = "v1"
|
apiVersion = "v1"
|
||||||
```
|
```
|
||||||
|
@ -61,17 +61,13 @@ You can also specify additional request header parameters for the service:
|
||||||
Let's say that we have a service named "mycollector" configured like this:
|
Let's say that we have a service named "mycollector" configured like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
[httpjson]
|
[[inputs.httpjson]]
|
||||||
[[httpjson.services]]
|
|
||||||
name = "mycollector"
|
name = "mycollector"
|
||||||
|
|
||||||
servers = [
|
servers = [
|
||||||
"http://my.service.com/_stats"
|
"http://my.service.com/_stats"
|
||||||
]
|
]
|
||||||
|
|
||||||
# HTTP method to use (case-sensitive)
|
# HTTP method to use (case-sensitive)
|
||||||
method = "GET"
|
method = "GET"
|
||||||
|
|
||||||
tag_keys = ["service"]
|
tag_keys = ["service"]
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -102,24 +98,19 @@ There is also the option to collect JSON from multiple services, here is an
|
||||||
example doing that.
|
example doing that.
|
||||||
|
|
||||||
```
|
```
|
||||||
[httpjson]
|
[[inputs.httpjson]]
|
||||||
[[httpjson.services]]
|
|
||||||
name = "mycollector1"
|
name = "mycollector1"
|
||||||
|
|
||||||
servers = [
|
servers = [
|
||||||
"http://my.service1.com/_stats"
|
"http://my.service1.com/_stats"
|
||||||
]
|
]
|
||||||
|
|
||||||
# HTTP method to use (case-sensitive)
|
# HTTP method to use (case-sensitive)
|
||||||
method = "GET"
|
method = "GET"
|
||||||
|
|
||||||
[[httpjson.services]]
|
[[inputs.httpjson]]
|
||||||
name = "mycollector2"
|
name = "mycollector2"
|
||||||
|
|
||||||
servers = [
|
servers = [
|
||||||
"http://service.net/json/stats"
|
"http://service.net/json/stats"
|
||||||
]
|
]
|
||||||
|
|
||||||
# HTTP method to use (case-sensitive)
|
# HTTP method to use (case-sensitive)
|
||||||
method = "POST"
|
method = "POST"
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue