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

Apply service templates on a per-device basis #15024

Merged
merged 2 commits into from Aug 5, 2023

Conversation

eskyuu
Copy link
Contributor

@eskyuu eskyuu commented May 5, 2023

We recently started using service templates, and I noticed that during discovery there are a lot of log messages saying services are being deleted from devices. I traced the issue to the use of the applyAll() function, which was causing the service template to evaluate the template apply rules for every device every time each device is discovered. This adds about 5s to the discovery time per device.

The proposed pull request replaces the applyAll() function call with an applyDeviceAll() function call, which only evaluates the service template rules for the device being discovered.

@electrocret electrocret merged commit 6fb784a into librenms:master Aug 5, 2023
9 checks passed
TheMysteriousX pushed a commit to TheMysteriousX/librenms that referenced this pull request Aug 9, 2023
* Created and use a function to apply service templates on a per-device basis

* formatting fix
@librenms-bot
Copy link

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

https://community.librenms.org/t/23-8-0-changelog/22078/1

peejaychilds pushed a commit to peejaychilds/librenms that referenced this pull request Oct 26, 2023
* Created and use a function to apply service templates on a per-device basis

* formatting fix
@eskyuu eskyuu deleted the service-template-apply branch November 16, 2023 10:06
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

3 participants