Hi !
I'm working with json below to configure trigger when "free" will be near to 0,
{
"@timestamp" => 2021-10-13T08:51:00.395Z,
"type" => "metric",
"@version" => "1",
"user" => "performance",
"timeStamp" => "2021-10-13T10:51:00.390781+02:00",
"version" => 2,
"id" => "e203a02f-2acf-4deb-8230-bdd9057afe20",
"tags" => [
[0] "applogs"
],
"warning" => "false",
"payload" => {
"version" => 1,
"collectorName" => "peek-filesystem",
"collectorVersion" => "1.5.23+803659e",
"measurements" => [
[ 0] {
"resourceType" => "system_filesystem",
"properties" => {
"options" => "rw,seclabel,nosuid,size=32883064k,nr_inodes=8220766,mode=755",
"path" => "/opt/was",
"resourceName" => "win12345.ec.domain|ext2|/opt/was",
"filesystemType" => "ext2",
"mount" => "ext2"
},
"metrics" => [
[0] {
"detailLevel" => 1,
"value" => 32112,
"type" => "gauge",
"unit" => "MB",
"name" => "free"
},
[1] {
"detailLevel" => 1,
"value" => 32112,
"type" => "gauge",
"unit" => "MB",
"name" => "available"
},
[2] { [...]
There's array of measurements and another array of properties for each filesystem.
Could You help me with ruby filter to get that value of free and compare it to let's say 10MB for each of the filesystems.
Thanks in advance,