The memory input plugin periodically collects host memory measurements and emits them as Fluent Bit log events. This log-oriented path supports flexible data manipulation; the records can later be transformed into metrics when required. section 3.2.1
Configure the plugin through an input block:
- Set name to mem to select the memory input plugin. section 3.2.1
- Set interval_sec or interval_nsec to control polling frequency. section 3.2.1
- Assign an explicit tag, such as book_vm_memory, so filters can match the records predictably. section 3.2.1
- Route records to stdout with match * for an initial local monitoring check. section 3.2.1
Listing 3.1 Performing basic OS monitoring
[INPUT] name disk #1 interval_sec 5 tag book_vm_disk [INPUT] name cpu #2 interval_sec 5 tag book_vm_cpu [INPUT] name mem #3 interval_sec 5 tag book_vm_memory [INPUT] name netif #4 interval_sec 5 #interface eth0 #5 tag book_vm_network [OUTPUT] name stdout match * #6
Use the complete configuration to run memory collection alongside disk, CPU, and network-interface inputs, polling each source every five seconds. section 3.2.1
