I'm working on sending ganglia metrics to logstash. That is I have my logstash who is recieving ganglia metrics from various clusters. With all these metrics coming from different clusters, I want to differentiate which cluster contains which metrics. So my idea is to add a custom field in the ganglia metrics which I will use to append on logstash on a cluster base.
When I look at the json_line metric collect by logstash I have something like this,
{
"program" => "ganglia",
"log_host" => "private-address",
"dmax" => 0,
"tmax" => 300,
"slope" => "both",
"type" => "float",
"units" => "packets/sec",
"@version" => "1",
"@timestamp" => "2016-02-27T15:54:43.279Z",
"host" => "public_address"
}
So what I want is to have is something like this
{
"program" => "ganglia",
"log_host" => "private-address",
"dmax" => 0,
"tmax" => 300,
"slope" => "both",
"type" => "float",
"units" => "packets/sec",
"@version" => "1",
"@timestamp" => "2016-02-27T15:54:43.279Z",
"host" => "public_address"
"myclusterfield" => "acustomfield"
}
I think that is possible by configuring the gmond daemon but I doesn't know how. :(
Please can somebody help me in this task.
Are you trying to have gmond send data directly to logstash with the additional fields, adjust the XML output, or something else? gmond does not natively speak JSON.
Hi All,
I'm working on sending ganglia metrics to logstash. That is I have my logstash who is recieving ganglia metrics from various clusters. With all these metrics coming from different clusters, I want to differentiate which cluster contains which metrics. So my idea is to add a custom field in the ganglia metrics which I will use to append on logstash on a cluster base. When I look at the json_line metric collect by logstash I have something like this, { "program" => "ganglia", "log_host" => "private-address", "dmax" => 0, "tmax" => 300, "slope" => "both", "type" => "float", "units" => "packets/sec", "@version" => "1", "@timestamp" => "2016-02-27T15:54:43.279Z", "host" => "public_address" } So what I want is to have is something like this { "program" => "ganglia", "log_host" => "private-address", "dmax" => 0, "tmax" => 300, "slope" => "both", "type" => "float", "units" => "packets/sec", "@version" => "1", "@timestamp" => "2016-02-27T15:54:43.279Z", "host" => "public_address" "myclusterfield" => "acustomfield" } I think that is possible by configuring the gmond daemon but I doesn't know how. :( Please can somebody help me in this task.
Thanks very much for the concern.