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

Alert Transport for TOPdesk #15896

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

rudybroersma
Copy link
Contributor

@rudybroersma rudybroersma commented Mar 15, 2024

This is a WIP initial version of my TOPdesk Alert Transport. It works, but there are a few minor things I want to clean up/inprove.
I'd love to get some initial feedback on what should be changed/improved before this would be accepted.

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.

@rudybroersma
Copy link
Contributor Author

Im a bit lost on how to properly set the column collation/charset. Nothing seems to make the unittest happy.

Also, my newly generated db_scheme.yaml has made changes to device_graphs schema which I didn't (intend to) make. Not sure where that is coming from?

@librenms-bot
Copy link

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

https://community.librenms.org/t/missing-recoveries/23858/1

@murrant
Copy link
Member

murrant commented Mar 19, 2024

What is the goal of transport_note. It seems like there are plenty of other places you could put this data (such as transport_config)

@rudybroersma
Copy link
Contributor Author

What is the goal of transport_note. It seems like there are plenty of other places you could put this data (such as transport_config)

The goal is to store the TOPdesk incident/ticket number per alert. I use this to reopen a previous closed ticket/incident if a device is alerting again within the 'reopen window'.

In other words, I need to add a reference (TOPdesk UUID) to each incident for this to work.

@murrant
Copy link
Member

murrant commented Mar 19, 2024

Why does storing it in the transport make sense? that makes no sense to me.

@rudybroersma
Copy link
Contributor Author

rudybroersma commented Mar 19, 2024

Why does storing it in the transport make sense? that makes no sense to me.

It's stored in the alert_log table. It made the most sense to me (besides creating a new table). It's an incident/ticket reference to a specific alert (rule_id and device_id). I named it 'transport_note' to keep it agnostic for multiple transports. This way the column could also be used by any other (future) transport. The transport_note contains a JSON string something like { "topdesk_uuid" => "" }.

But if you feel this should be stored somewhere else, please enlighten me and I'll make modifications.

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

Successfully merging this pull request may close these issues.

None yet

3 participants