Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ionutrazvanionita/3466a3c501685c3914e15c06feb3086f to your computer and use it in GitHub Desktop.
Save ionutrazvanionita/3466a3c501685c3914e15c06feb3086f to your computer and use it in GitHub Desktop.
/* very important; this will dictate that the table is in HOMER 6 format*/
modparam("proto_hep", "homer5_on", 0)
/*in the hep route*/
route[hep_route] {
hep_get("11", "$var(vid)", "$var(data)");
$var(proto) = $(var(data){s.int});
...
/**
* if homer5_on is 0(HOMER6 mode) then report_capture will also search if there is any Event key in the
* JSON payload and will set the event column in ops_*_capture_%Y%m%d
*/
if ( $var(proto) == 86 ) {
hep_get("utf8-string", "0x11", "$var(vid)", "$var(corr)");
report_capture("ops_xlog_capture_%Y%m%d", "$var(corr)");
exit;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment