So while I'm on the topic, I want to ask if you think my idea of scripting this out so curl is appending to a file, running it via cron job, then using Sidecar/Nxlog to pull it in to Graylog is the best way to go. With the help you provided yesterday I successfully got all that going, now that it's back in Graylog I am faced with needing to parse/extract the output in to key/value pairs. I started putting that in place using Regex, but wanted to circle back to ask if you think there's a better way to achieve my goal. Being able to have some of those internal metrics collected and back IN Graylog so I can Dashboard and alert on them.
Thanks again. John On Thursday, October 27, 2016 at 8:20:41 AM UTC-5, John Buchanan wrote: > > Wonderful! Thank you sir! > > On Thursday, October 27, 2016 at 2:23:34 AM UTC-5, Jochen Schalanda wrote: >> >> 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/c0e8138e-cef1-4763-8aa3-87348eb66501%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
