Distributing plugins

Andreas Ericsson ae at op5.se
Wed Aug 29 16:30:53 CEST 2007


francois basquin wrote:
> 
> I often write new plugins, and I face a distribution problem: how to 
> distribute them without having to scp and editing nrpe.cfg on each server?
> 

With keys and a script, this becomes a very trivial problem.
for srv in $(cat server-list); do
	scp plugin root@$srv/path/to/plugins
	scp nrpe.cfg root@$srv/etc/nrpe.cfg
	ssh root@$srv /etc/init.d/nrpe restart
done

> Few headscratchings later, I came with a couple of solutions:
> - using automatic copies from a repository to the clients (rsync or 
> equivalent)
> Pros: simple. Cons: implies an extra protocol, which may not be desirable
> 

Again, with ssh-keys, this can be automated without using an extra protocol.

> - using NFS: clients mount the plugins directory from the repository
> Pros: simpler. Cons: implies NFS, which may not be desirable
> 
> - modifying nrpe to distribute the plugins on demand. The Nagios server 
> could hold the plugins repository, and send the ones missing to the client. 
> A timestamp checking should also be needed to distribute new versions.
> Pros: no extra protocol. Cons: needs some development, may introduce a lag 
> on the first service call.
> 

Code speaks louder than words. Unfortunately, a very, very small percentage
of the people reading emails on this list are competent programmers enough
to hack up the ideas being sent to this list. Usually those of us who are
aren't interested in making the changes necessary, so it dies down without
ever being even prototyped.

> Going further, nrpe could also maintain the nrpe.cfg file. Why keeping the 
> "command[..]" statements locally? They could be sent via nrpe itself.
> 

No. For obvious reasons.

> And a couple of beers ahead, the repository might even be a database.
> 

To what benefit?

I'm seriously beginning to loathe people that suggests using databases
for absolutely everything, as if it was the be-all, end-all solution to
everything.

In the case of storing plugins in a database is so obviously wrong I
probably don't even have to point out why.


> I know this changes the philosophy behind nrpe quite a bit, but it may worth 
> to think about.
> Comments needed please.
> 

Given above. Now show us the code.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/




More information about the Developers mailing list