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

Syslog hooks for Oxidized integration (and more) #6785

Merged
merged 2 commits into from Jun 17, 2017

Conversation

Projects
None yet
5 participants
@deepseth
Contributor

deepseth commented Jun 6, 2017

DO NOT DELETE THIS TEXT

Please note

Please read this information carefully. You can run ./scripts/pre-commit.php to check your code before submitting.

Testers

If you would like to test this pull request then please run: ./scripts/github-apply <pr_id>, i.e ./scripts/github-apply 5926

@CLAassistant

This comment has been minimized.

Show comment
Hide comment
@CLAassistant

CLAassistant Jun 6, 2017

CLA assistant check
All committers have signed the CLA.

CLAassistant commented Jun 6, 2017

CLA assistant check
All committers have signed the CLA.

@deepseth

This comment has been minimized.

Show comment
Hide comment
@deepseth

deepseth Jun 6, 2017

Contributor

This is super rough, and before I spend more time tidying it up, want to make sure I'm doing it inline with how it would be liked to be done, or if something needs refactoring (e.g. the oxidized function needs moving to a different file?)

Absolutely do not expect this current version to be accepted as is, as it's terribad, but it does work :-)

Contributor

deepseth commented Jun 6, 2017

This is super rough, and before I spend more time tidying it up, want to make sure I'm doing it inline with how it would be liked to be done, or if something needs refactoring (e.g. the oxidized function needs moving to a different file?)

Absolutely do not expect this current version to be accepted as is, as it's terribad, but it does work :-)

@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Jun 6, 2017

Member

I think it makes more sense to try and abstract this away from being directly in the code and instead allow users to create their own hooks / search strings that are compared.

Member

laf commented Jun 6, 2017

I think it makes more sense to try and abstract this away from being directly in the code and instead allow users to create their own hooks / search strings that are compared.

@deepseth

This comment has been minimized.

Show comment
Hide comment
@deepseth

deepseth Jun 7, 2017

Contributor

Example entry in config.php:
$config['os']['ios']['syslog_hook'][] = Array('regex' => '/%SYS-(SW[0-9]+-)?5-CONFIG_I/', 'script' => '/opt/librenms/scripts/syslog-notify-oxidized.php');

Contributor

deepseth commented Jun 7, 2017

Example entry in config.php:
$config['os']['ios']['syslog_hook'][] = Array('regex' => '/%SYS-(SW[0-9]+-)?5-CONFIG_I/', 'script' => '/opt/librenms/scripts/syslog-notify-oxidized.php');

@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@deepseth

This comment has been minimized.

Show comment
Hide comment
@deepseth

deepseth Jun 8, 2017

Contributor

Added matches for NXOS and IOSXR as well, running this in prod myself at the moment and it appears to be working well.

Contributor

deepseth commented Jun 8, 2017

Added matches for NXOS and IOSXR as well, running this in prod myself at the moment and it appears to be working well.

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Jun 9, 2017

Member

That looks a lot better to me. You need to add docs to cover the use and I'd also have a global $config[] option to enable the hooks as well as per OS.

Member

laf commented Jun 9, 2017

That looks a lot better to me. You need to add docs to cover the use and I'd also have a global $config[] option to enable the hooks as well as per OS.

@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@deepseth

This comment has been minimized.

Show comment
Hide comment
@deepseth

deepseth Jun 12, 2017

Contributor

I've updated the docs to cover the use, and added a global $config[] option to enable the hooks.

Contributor

deepseth commented Jun 12, 2017

I've updated the docs to cover the use, and added a global $config[] option to enable the hooks.

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Jun 12, 2017

Member

@deepseth LGTM.

@murrant - thoughts?

Member

laf commented Jun 12, 2017

@deepseth LGTM.

@murrant - thoughts?

@laf

This comment has been minimized.

Show comment
Hide comment
@laf

laf Jun 12, 2017

Member

Oh and @deepseth - You need to sign the CLA.

Member

laf commented Jun 12, 2017

Oh and @deepseth - You need to sign the CLA.

@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment
@laf

laf approved these changes Jun 12, 2017

@scrutinizer-notifier

This comment has been minimized.

Show comment
Hide comment
@LibreNMS-CI

This comment has been minimized.

Show comment
Hide comment

@deepseth deepseth changed the title from Preliminary work, proving it works with IOS to Syslog hooks for Oxidized integration (and more) Jun 15, 2017

@laf laf merged commit bcc618a into librenms:master Jun 17, 2017

3 checks passed

Auto-Deploy Build finished.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details

@deepseth deepseth deleted the deepseth:feature/syslog-oxidized branch Jun 19, 2017

dnapper added a commit to dnapper/librenms that referenced this pull request Jun 19, 2017

feature: Added Syslog hooks for Oxidized integration (and more) (#6785)
* Creating syslog hooks with example script for Oxidized integration

* Corrected IOS-XR matching and stopped spurious calls to Oxidized
@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

lock bot commented May 17, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed.

@lock lock bot locked as resolved and limited conversation to collaborators May 17, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.