Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
httpjson
is a plugin that polls servers, then passes along their JSON responses to an Accumulator. This is useful for gathering metrics from preexisting web services that return information about other services in JSON form.To use it, in the telegraf configuration file, define a list of httpjson Services, which are essentially clusters of servers to poll. Each Service has a name, an HTTP method (
GET
,POST
, etc.), a toml table of HTTP parameters to attach to the request, and a list of endpoints to hit.When the plugin runs, it sends all the HTTP requests for all the various endpoints it needs to hit. It then takes the JSON response from each request, flattens it, and then passes each float value along to the Accumulator. The measurement name
httpjson
chooses for each float value is in the form<service-name>_<grandparent-key>_<parent-key>_<child-key>
. It also tags each measurement with the name of the endpoint it hits.Let me know what your thoughts are!