Skip to content

Commit

Permalink
events: use tag evebox.auto_archive instead of evebox.auto-archive
Browse files Browse the repository at this point in the history
Names with - in the get analyzed by Elastic as 2 terms, not a single
term. This makes it easier to add a filter like
'-tags:evebox.auto_archived`.
  • Loading branch information
jasonish committed Jun 30, 2024
1 parent b7a254f commit 96da2af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/eve/filters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,12 @@ impl AutoArchiveFilter {
match &mut event["tags"] {
serde_json::Value::Array(tags) => {
tags.push("evebox.archived".into());
tags.push("evebox.auto-archived".into());
tags.push("evebox.auto_archived".into());
}
serde_json::Value::Null => {
event["tags"] = serde_json::Value::Array(vec![
"evebox.archived".into(),
"evebox.auto-archived".into(),
"evebox.auto_archived".into(),
]);
}
_ => {
Expand Down
3 changes: 2 additions & 1 deletion webapp/src/Alerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,8 @@ export function AlertDescription(props: { event: EventWrapper }) {
<Show
when={
props.event._source.tags &&
props.event._source.tags.indexOf("evebox.auto-archived") > -1
(props.event._source.tags.indexOf("evebox.auto-archived") > -1 ||
props.event._source.tags.indexOf("evebox.auto_archived") > -1)
}
>
<span class="badge text-bg-secondary me-2">auto-archived</span>
Expand Down

0 comments on commit 96da2af

Please sign in to comment.