Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pagerduty output support #164

Merged
merged 2 commits into from
Dec 24, 2020

Conversation

KeisukeYamashita
Copy link
Contributor

@KeisukeYamashita KeisukeYamashita commented Dec 23, 2020

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area config

/area outputs

/area tests

What this PR does / why we need it:

Many company uses PagerDuty and we want to create a incident on Falco reports.

Which issue(s) this PR fixes:

Fixes #163

Special notes for your reviewer:

These are documents that might help you review:

Signed-off-by: KeisukeYamashita <19yamashita15@gmail.com>
For falcosecurity#163
@poiana poiana requested review from cpanato and nibalizer December 23, 2020 15:52
@poiana poiana added the size/L label Dec 23, 2020
@KeisukeYamashita KeisukeYamashita changed the title WIP: Add pagerduty output support Add pagerduty output support Dec 23, 2020
@KeisukeYamashita KeisukeYamashita marked this pull request as ready for review December 23, 2020 16:05
@Issif Issif added this to the 2.20.0 milestone Dec 23, 2020
handlers.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
main.go Show resolved Hide resolved
outputs/pagerduty.go Outdated Show resolved Hide resolved
config.go Outdated Show resolved Hide resolved
outputs/pagerduty.go Outdated Show resolved Hide resolved
outputs/pagerduty.go Outdated Show resolved Hide resolved
outputs/pagerduty.go Outdated Show resolved Hide resolved
outputs/pagerduty.go Outdated Show resolved Hide resolved
handlers.go Outdated
@@ -219,4 +219,8 @@ func forwardEvent(falcopayload types.FalcoPayload) {
if config.Kafka.HostPort != "" && (priorityMap[strings.ToLower(falcopayload.Priority)] >= priorityMap[strings.ToLower(config.Kafka.MinimumPriority)] || falcopayload.Rule == TestRule) {
go kafkaClient.KafkaProduce(falcopayload)
}

if config.Pagerduty.APIKey != "" && (priorityMap[strings.ToLower(falcopayload.Priority)] >= priorityMap[strings.ToLower(config.Pagerduty.MinimumPriority)] || falcopayload.Rule == TestRule) {
go kafkaClient.PagerdutyPost(falcopayload)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
go kafkaClient.PagerdutyPost(falcopayload)
go kafkaClient.PagerdutyCreateIncident(falcopayload)

outputs/pagerduty.go Outdated Show resolved Hide resolved
Issif
Issif previously approved these changes Dec 24, 2020
Copy link
Member

@Issif Issif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@poiana poiana added the lgtm label Dec 24, 2020
@poiana
Copy link

poiana commented Dec 24, 2020

LGTM label has been added.

Git tree hash: bad24233f9d2f4a001f7a8bc5b764b14292e8c6f

@KeisukeYamashita
Copy link
Contributor Author

Thank you! I will prepare chart update tomorrow.

@Issif
Copy link
Member

Issif commented Dec 24, 2020

@KeisukeYamashita I just noticed, all your commits need DCO to be approved.

Signed-off-by: KeisukeYamashita <19yamashita15@gmail.com>
@poiana poiana removed the approved label Dec 24, 2020
@KeisukeYamashita
Copy link
Contributor Author

KeisukeYamashita commented Dec 24, 2020

@Issif Thank you, I just signed my commits and CI are passing 🎸

Copy link
Member

@Issif Issif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome !!

@poiana
Copy link

poiana commented Dec 24, 2020

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Issif

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana poiana merged commit d03c612 into falcosecurity:master Dec 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Suppor PagerDuty as output
3 participants