Skip to content

Commit

Permalink
trap not traps
Browse files Browse the repository at this point in the history
  • Loading branch information
rfaircloth-splunk committed Mar 25, 2020
1 parent 6bb753a commit 1c2b636
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package/etc/conf.d/conflib/_common/templates.conf
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ template t_JSON_5424 {
};


template t_snmp_traps {
template t_snmp_trap {
template('$(format-json .snmp.* --rekey .snmp.* --shift-levels 2)');
};
6 changes: 3 additions & 3 deletions package/etc/conf.d/log_paths/lp-snmp_traps.conf.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ log {
);
};

rewrite { r_set_splunk_dest_default(sourcetype("snmp:traps"), index("main"))};
parser {p_add_context_splunk(key("snmp_traps")); };
rewrite { r_set_splunk_dest_default(sourcetype("snmp:trap"), index("main"))};
parser {p_add_context_splunk(key("snmp_trap")); };

rewrite { set("$(template ${.splunk.sc4s_template} $(template t_snmp_traps))" value("MSG")); };
rewrite { set("$(template ${.splunk.sc4s_template} $(template t_snmp_trap))" value("MSG")); };

{{- if or (conv.ToBool (getenv "SC4S_DEST_SPLUNK_HEC_GLOBAL" "yes")) (conv.ToBool (getenv "SC4S_DEST_SNMP_TRAPS_HEC" "no")) }}
destination(d_hec);
Expand Down

0 comments on commit 1c2b636

Please sign in to comment.