Skip to content

Instantly share code, notes, and snippets.

@Kokan
Created March 27, 2019 07:59
Show Gist options
  • Save Kokan/6f1cec10d1053e9b67123c22342947de to your computer and use it in GitHub Desktop.
Save Kokan/6f1cec10d1053e9b67123c22342947de to your computer and use it in GitHub Desktop.
destination dd {
file("whatever");
};
log {
source(pan_splunk);
if {
filter { host("^[a-z]+\.foo.*$") or
netmask('192.168.1.100/32') or
netmask('192.168.1.101/32');
};
rewrite {
set("foo" value("location"));
};
} elif {
filter { host("^[a-z]+\.bar.*$") or
netmask('192.168.1.102/32') or
netmask('192.168.1.103/32');
};
} else {
rewrite {
set("unknown" value("location"));
};
destination(dd);
};
log {
source(pan_splunk);
log {
filter { host("^[a-z]+\.foo.*$") or
netmask('192.168.1.100/32') or
netmask('192.168.1.101/32');
};
rewrite { set("foo" value("location")); };
destination(dd);
flags(final);
};
log {
filter { host("^[a-z]+\.bar.*$") or
netmask('192.168.1.102/32') or
netmask('192.168.1.103/32');
};
destination(dd);
flags(final);
};
log {
rewrite { set("unknown" value("location")); };
destination(dd);
flags(final);
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment