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

100 Character Length Bugfix #3

Merged
merged 31 commits into from
Feb 7, 2020
Merged

100 Character Length Bugfix #3

merged 31 commits into from
Feb 7, 2020

Conversation

crankynetman
Copy link

As it turns out, PagerDuty has an undocumented 100 character limit on the "client:" JSON key. This key is not critical at all to the alerting process, as it only exists to show the name of the Integration so that it can be linked to. This has now just been hardcoded to show "PRTG" as that is the only necessary information.

I have added a new function called "truncateString()" that (believe it or not) allows you to... truncate a string. This was added as a response to the 100 Character Length issue. Now this function is called on most strings before they go into the JSON marshaling function in event.go and get sent to PagerDuty, hopefully alleviating any length-based issues with PagerDuty

I have also added a new int flag to set how long to truncate all of the fields to (except summary and custom_details, which testing does not show any character limits on.)

We still need to come up with a method for handling errors and logging/alerting on them appropriately, but that will likely need to come in a larger re-working of this integration.

@crankynetman crankynetman added the bug Something isn't working label Feb 7, 2020
@crankynetman crankynetman merged commit 5329113 into master Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant