Skip to content

Instantly share code, notes, and snippets.

@lukebigum
Created December 10, 2015 15:51
Show Gist options
  • Save lukebigum/dac54fc8101b8f5725d5 to your computer and use it in GitHub Desktop.
Save lukebigum/dac54fc8101b8f5725d5 to your computer and use it in GitHub Desktop.
Collectd tail linuxptp log file
define profile::statistics::tail_linuxptp_log($filename) {
collectd::plugin::tail::file { $name:
filename => $filename,
instance => $name,
matches => [
{
regex => 'offset[[:space:]]+(-?[[:digit:]]+)',
dstype => 'GaugeLast',
type => 'precise_time_offset',
instance => 'offset',
},
{
regex => 'freq[[:space:]]+([-+]?[[:digit:]]+)',
dstype => 'GaugeLast',
type => 'precise_frequency_offset',
instance => 'frequency',
},
{
regex => 'delay[[:space:]]+([[:digit:]]+)',
dstype => 'GaugeLast',
type => 'precise_latency',
instance => 'path-delay',
},
],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment