Comments (11)
We probably should support several configurable hooks. And configuration changes is definitely one of them.
from oxidized.
So we would need a plugin system, something like this
class Oxidized::Hook
@hooks = []
def register(type, block)
end
def execute(type)
end
end
Oxidized::Hook.register :post_commit do
`git-commit-notifier`
end
Oxidized::Hook.execute :post_commit
register would record a new user defined hook, and execute would run all available hooks from the hookable code points. Can you create a list of code points you think would be worth hooking in?
Also I think we should alos expose this via the configuration file somehow.
from oxidized.
Absolutely. We need people to be able to set arbitrary URL or ruby class to be called on hook triggered, someone asked about this in IRC recently.
13:20 <+kll> ytti: does oxidized have callbacks on configuration changes? (quick peak at github tells me no)
This is definitely something many will find useful.
from oxidized.
This would be very nice to have. The ability to execute an external binary/script would be nice, with the ability to pass it arguments, such as the device name, ip, etc.
from oxidized.
👍 for a hook system. I could really use a pre-commit hook to do some cleanup in configuration before committing any changes. Also a post-commit hook to push to a remote repository would also be of interest to me.
from oxidized.
Hello! Any advance in configuration changes notification?
Now I use http://git-scm.com/docs/git-send-email for this purpose, but it isn`t really convenient.
from oxidized.
@sts can you test this?
https://github.com/ytti/oxidized/tree/feature-hook
from oxidized.
@sts and @ytti
here is the example configuration for using the Exec hook:
hooks:
do_smth:
type: exec
events: [post_store, node_fail]
cmd: 'env >> /tmp/oxiexec.txt'
timeout: 120
async: true
from oxidized.
You can also implement hooks in Ruby by subclassing Oxidized::Hook
and implementing run_hook(ctx)
method.
from oxidized.
Since I haven't replaced my production rancid with Oxidized yet (still waiting on the custom ports), I installed the feature-hook branch on my test box. It is working well with a shell script I created to run git-commit-notifier against the git repo on post_store.
from oxidized.
Released in 0.8.0
from oxidized.
Related Issues (20)
- Can't run syslog.rb - cannot load such file -- asetus (LoadError)
- problem when you specify the ssh port
- Sonicos Model: '-' in name of device is not supported
- fireeye ex sh run backup issue
- Rugged githubrepo unsupported URL Protocol HOT 1
- Contribution: Synology Nas model HOT 1
- Syndrome HOT 1
- Contribution: Sonicwall SonicOS 4.x model HOT 3
- Unable to write a backup of a ruckus ICX 7250 switch
- Contribution: Vmware Esxi model
- Duplicated nodes using http pagination
- HTTPS: unsupported protocol [OpenSSL::SSL::SSLError] HOT 2
- HP ArubaOS-CX: power-consumption starting with version FL.10.13.xxxx - permanent power changes logged HOT 2
- rake test fails on Oxidized::SSH::#connect#test_0001 HOT 1
- ERROR -- : Hook push_to_remote SshError: remote rejected authentication: Failed getting response
- Load nodes didn't recognized ArubaOS Mobility Controller 8.10.0.9 (use aosw or Aaosw) and F5 Big-IP (use tmos) HOT 1
- passwords with special characters (dollar sign and space) HOT 3
- ArubaOS8 need update propmt
- about not login use password (maybe is ruby net-ssh problem or oxidized??) HOT 4
- vyatta snmp community secret leakage HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oxidized.