The head input plugin, allows to read events from the head of file. It's behavior is similar to the head command.
Configuration Parameters
The plugin supports the following configuration parameters:
Split Line Mode
This mode is useful to get a specific line. This is an example to get CPU frequency from /proc/cpuinfo.
/proc/cpuinfo is a special file to get cpu information.
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 42
model name : Intel(R) Core(TM) i7-2640M CPU @ 2.80GHz
stepping : 7
microcode : 41
cpu MHz : 2791.009
cache size : 4096 KB
physical id : 0
siblings : 1
Cpu frequency is "cpu MHz : 2791.009". We can get the line with this configuration file.
[INPUT] Name head Tag head.cpu File /proc/cpuinfo Lines 8 Split_line true# {"line0":"processor : 0", "line1":"vendor_id : GenuineIntel" ...}[FILTER] Name record_modifier Match * Whitelist_key line7[OUTPUT] Name stdout Match *