First full commit of plugin system #189

Merged
merged 2 commits into from Mar 28, 2014

Projects

None yet

3 participants

@laf
Member
laf commented Mar 12, 2014

Should work fine this.

I've put a test plugin which you can use to verify the system is working on my GitHub, https://github.com/laf/Test

If you want to clone the that into a librenms repo so it looks more official then no probs.

At the moment this will only integrate into the Plugin system menu and has no other hooks available but these are easy to add in. However full php can be used within the plugin page itself.

This commit has the removal of the widescreen link as this is not active and doesn't work so it's been replaced with the Plugins link instead.

See #155 for previous comments.

@f0o
Member
f0o commented Mar 13, 2014

Looks great :) 👍

Can you add an alert( (string|int) $device, (string) $what ) hook?
Maybe notify() in includes/functions.php can be calling the hook.
With that addition I can expand the IRC-Bot to support alerting via IRC using the old alerting system as caller.

Other hooks that are useful:
pre-poller( (string|int) $device )
post-poller( (string|int) $device )

Maybe also:
pre-discovery( (string|int) $device )
post-discovery( (string|int) $device )

@laf
Member
laf commented Mar 14, 2014

As per the conversation on irc. This plugin can deal with the alerts bit from f0o's comment, it just needs modules writing and core code updating to call the hooks we need.

@paulgear paulgear merged commit d1c082d into librenms:master Mar 28, 2014

1 check passed

default Scrutinizer: 16 new/changed issues, 6 added/modified code elements
Details
@laf laf deleted the unknown repository branch Mar 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment