Here is only one example from my JSON file >>
{"host":"ABCDEFASD","groups":["ABVD","TEST"],"applications": ["NETWORK"],"itemid":143172,"name":"Operational status of interface Se0/1/0:17","clock":1604283792,"ns":926563322,"value":2}
AND I want to change this json file to metrics format:
metrics{host="ABCDEFASD", groups="ABVD",groups="TEST",applications="NETWORK",name="Operational status of interface Se0/1/0:17", "itemid":143172}
Can you help me with this? What should I follow with my config file?
1-Problem : Remove > value, ns, clock
2-Problem : Separate > "groups":[ABVD","TEST"] groups="ABVD",groups="TEST"
3-Problem : metrics { }
4-Problem : Influxdb, saving it on Victoria Metrics
I am connecting to SSH server with putty >> CentOS8 Linux Machine
`
filter {
mutate {
remove_field => ["value", "ns", "clock"]
}
mutate {
split => { "groups" => "," }
}
ruby {
code =>"
event.set("[metrics][host]",event.get("host"));
event.remove("host")"
}
}
output {
stdout {
codec => rubydebug
}
influxdb {
host => "10.92.161.1"
port => 4288
db => "metrics"
codec => "json"
}
}
`