Skip to content

Commit

Permalink
opsgenie: replace . with _
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Panato <ctadeu@gmail.com>
  • Loading branch information
cpanato authored and poiana committed Dec 5, 2021
1 parent f334343 commit d00ea07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion outputs/opsgenie.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package outputs

import (
"log"
"strings"

"github.com/falcosecurity/falcosidekick/types"
)
Expand All @@ -19,7 +20,7 @@ func newOpsgeniePayload(falcopayload types.FalcoPayload, config *types.Configura
for i, j := range falcopayload.OutputFields {
switch v := j.(type) {
case string:
details[i] = v
details[strings.ReplaceAll(i, ".", "_")] = v
default:
continue
}
Expand Down
2 changes: 1 addition & 1 deletion outputs/opsgenie_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func TestNewOpsgeniePayload(t *testing.T) {
Entity: "Falcosidekick",
Description: "Test rule",
Details: map[string]string{
"proc.name": "falcosidekick",
"proc_name": "falcosidekick",
},
Priority: "P5",
}
Expand Down

0 comments on commit d00ea07

Please sign in to comment.