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 support for Webex max message length. #15789

Merged
merged 3 commits into from Feb 4, 2024

Conversation

xorrkaz
Copy link
Contributor

@xorrkaz xorrkaz commented Feb 1, 2024

Webex limits messages to just over 7 KB. Some alerts might be longer than this. So truncate the message with ellipses.

While here switch to using the new API URL.

Please give a short description what your pull request is for

DO NOT DELETE THE UNDERLYING TEXT

Please note

Please read this information carefully. You can run ./lnms dev:check to check your code before submitting.

  • Have you followed our code guidelines?
  • If my Pull Request does some changes/fixes/enhancements in the WebUI, I have inserted a screenshot of it.
  • If my Pull Request makes discovery/polling/yaml changes, I have added/updated test data.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926
After you are done testing, you can remove the changes with ./scripts/github-remove. If there are schema changes, you can ask on discord how to revert.

Webex limits messages to just over 7 KB.  Some alerts might be longer
than this.  So truncate the message with ellipses.

While here switch to using the new API URL.
@CLAassistant
Copy link

CLAassistant commented Feb 1, 2024

CLA assistant check
All committers have signed the CLA.

Formatting got messed up on the transfer from test to dev.
$data = [
'roomId' => $room_id,
];

if (strlen($alert_data['msg']) > Ciscospark::$MAX_MSG_SIZE) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @xorrkaz
You should probably move the truncate code after the block that removes blank lines, and tags.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

[Face palm]. Yup. Good call!

This may yield a few more allowed characters.
Copy link
Contributor

@PipoCanaja PipoCanaja left a comment

Choose a reason for hiding this comment

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

LGTM

@PipoCanaja PipoCanaja merged commit 31e8557 into librenms:master Feb 4, 2024
8 checks passed
@PipoCanaja
Copy link
Contributor

PipoCanaja commented Feb 9, 2024

Hi @xorrkaz
Did LibreNMS do the job during this CiscoLiveEMEA as you expected ? :) I did link this PR and PNLNMS-1035 a little bit too late to say hello in Room A10 this morning ...

@xorrkaz
Copy link
Contributor Author

xorrkaz commented Feb 9, 2024

Hi @xorrkaz

Did LibreNMS do the job during this CiscoLiveEMEA as you expected ? :) I did link this PR and PNLNMS-1035 a little bit too late to say hello in Room A10 this morning ...

Saw that, did you? Yep. Worked out very well for us. As always.

@librenms-bot
Copy link

This pull request has been mentioned on LibreNMS Community. There might be relevant details there:

https://community.librenms.org/t/24-2-0-changelog/23721/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants