Hello,
I want to write logstash script that use snmpwalk to get cpu values form network devices average them and send one field to elasticsearch. I guess I can do this in ruby plugin but I have so fare only expiernce in Java nad Python. How can I do this using ruby filter or other logstash capabilities?
This is how my document looks like before any manipulation.
{
                       "tags" => [
        [0] "snmp",
        [1] "metrics"
    ],
                    "host.ip" => "ip",
                 "@timestamp" => 2020-11-05T14:43:20.707Z,
                   "@version" => "1",
    "cisco.device.system.cpu" => [
        [0] {
                                                                 "index" => "1",
            "iso.org.dod.internet.private.enterprises.9.9.109.1.1.1.1.7" => 15
        },
        [1] {
                                                                 "index" => "2",
            "iso.org.dod.internet.private.enterprises.9.9.109.1.1.1.1.7" => 15
        },
        [2] {
                                                                 "index" => "3",
            "iso.org.dod.internet.private.enterprises.9.9.109.1.1.1.1.7" => 15
        }
    ],
              "host.hostname" => "name"
}