Hi John, you can fetch multiple metrics from Graylog in the following way (remove the pretty=true query parameter for a compact JSON response):
$ curl -u admin -H 'Content-Type: application/json' -H 'Accept: application/json' -X POST 'http://127.0.0.1:12900/system/metrics/multiple?pretty=true' -d '{"metrics":["org.graylog2.buffers.input.usage","org.graylog2.buffers.process.usage","org.graylog2.buffers.output.usage"]}' { "total" : 3, "metrics" : [ { "full_name" : "org.graylog2.buffers.input.usage", "metric" : { "value" : 0 }, "name" : "usage", "type" : "gauge" }, { "full_name" : "org.graylog2.buffers.process.usage", "metric" : { "value" : 0 }, "name" : "usage", "type" : "gauge" }, { "full_name" : "org.graylog2.buffers.output.usage", "metric" : { "value" : 0 }, "name" : "usage", "type" : "gauge" } ] } Cheers, Jochen On Wednesday, 26 October 2016 20:47:25 UTC+2, John Buchanan wrote: > > I may be missing something elementary here, but could someone explain the > formatting/syntax for defining the multiple metrics? Pulling individual > seems easy enough, but I'd like to pull multiple. Perhaps I'm missing > something simple. > > I'd like to pull org.graylog2.buffers.input.usage, > org.graylog2.buffers.process.usage, and org.graylog2.buffers.output.usage > from each of my nodes so I can ultimately get it IN to Graylog and > dashboard or even alert on them. > -- You received this message because you are subscribed to the Google Groups "Graylog Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/graylog2/3b571694-e35b-446c-a331-bce85cd9b428%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
