diff --git a/roles/fluentbit/fluent-bit.conf.j2 b/roles/fluentbit/fluent-bit.conf.j2 index 83bfa71..af6b479 100644 --- a/roles/fluentbit/fluent-bit.conf.j2 +++ b/roles/fluentbit/fluent-bit.conf.j2 @@ -95,6 +95,12 @@ Command free -m | tail -2 | tr '\n' ' ' Interval_Sec 1 +[INPUT] + Name exec + Tag diskfree + Command df -lt ext4 | tail -n +2 + Interval_Sec 600 + [OUTPUT] Name forward Match * @@ -107,6 +113,12 @@ Key_Name exec Parser free +[FILTER] + Name parser + Match diskfree + Key_Name exec + Parser diskfree + [FILTER] Name record_modifier Match * diff --git a/roles/fluentbit/parsers.conf.j2 b/roles/fluentbit/parsers.conf.j2 index 86c51ae..649f85f 100644 --- a/roles/fluentbit/parsers.conf.j2 +++ b/roles/fluentbit/parsers.conf.j2 @@ -4,3 +4,9 @@ Format regex Regex ^Mem:\s+(?\d+)\s+(?\d+)\s+(?\d+)\s+(?\d+)\s+(?\d+)\s+(?\d+) Swap:\s+(?\d+)\s+(?\d+)\s+(?\d+) Types mem_total:integer mem_used:integer mem_free:integer mem_shared:integer mem_buff_cache:integer mem_available:integer swap_total:integer swap_used:integer + +[PARSER] + Name diskfree + Format regex + Regex ^\S+\s+\d+\s+(?\d+)\s+(?\d+)\s+(?\d+)%\s+(?\S+) + Types disk_used:integer disk_available:integer disk_percentage:integer disk_mount:string