-
Notifications
You must be signed in to change notification settings - Fork 30
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
Event2 api agent #119
Open
JasonRaynar-sb
wants to merge
9
commits into
PagerDuty:master
Choose a base branch
from
JasonRaynar-sb:event2ApiAgent
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Event2 api agent #119
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…eakages of old scripts)
service_key for V1 and routing_key for V2 (checks for presence to delegate to right endpoint)
agent info append for V1 api. Also modified README.md to describe changes for this verison
…g V1 option) Fixed agent structure pass to V1 Updated README.md to describe changes with this version
Final commit for this branch (merged to master on my fork) - modified to allow backward compatibility (by default uses V1 API , but can use -api V2 to switch to v2 message + endpoint) |
atomicules
added a commit
to atomicules/pdagent-integrations
that referenced
this pull request
May 31, 2019
Per PR 119 on pdagent, this extends the Pagerduty V2 API support to pdagent-integrations by: - Sending through the required PD-CEF fields (these need to be sent to pdagent even if using V1 api per the current status of PR 119, even if not actually used for V1 api call) - Adding a command line flag to select the API version (defaults to V1) - Adds default mappings for certain PD-CEF fields from Sensu check results - Allows an optional argument to customise the mappings for PD-CEF fields from Sensu check results. That works as follows: --event-map "event_source,check.name" Comma separated and then the field we want from the check result in dot notation. It's fairly simplistic, not going to support fields that actually use dots in their name (but probably pretty rare in Sensu). That argument can be supplied multiple times for the different fields. It's _fairly_ well error handled (not perfectly) so that if a mapping fails (e.g. because that field doesn't exist in the Sensu check result) then it will just set that PD-CEF to an empty string Have tried to copy command structure of PR 119 as much as is applicable. Have not looked at tests yet. References: PagerDuty/pdagent#119
Is there any problem? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
V2 api change - Added two parameters --source(-src) and --severity(-s) as they are mandatory for V2 api.
Changed JSON structure to have p structure (for payload :D ) and positioned under d structure( for details) to follow original naming convention. Some JSON elements have a item name change (ie. incident_key/dedup_key)
Appears to succeed on test cases - and successfully triggers and resolves incidents.