Change macro in script

Jochen Bern Jochen.Bern at LINworks.de
Wed Nov 28 22:12:52 CET 2012


On 27.11.2012 11:41, Lucas Pinheiro de Queiroz wrote:
> I define a macro for a service and desire to change the value within
> a script / plugin for Nagios . As follows: 
> 
> define service { 
> ... 
> _test TEST 
> ... 
> } 
> 
> In the script I want to do the following assignment : 
> 
> #! / bin / bash 
> ... 
> NAGIOS__SERVICETEST = " OUTROVALOR " 
> ... 

You can pass an External Command to Nagios, which then (with some delay)
will change the service's Custom Variable as desired.

http://old.nagios.org/developerinfo/externalcommands/commandinfo.php?command_id=140

Note that a) the script will still have to make the same change to its
*own* (already set) Env Var itself, and b) the change will not survive a
Nagios restart.

Kind regards,
								J. Bern
-- 
*NEU* - NEC IT-Infrastruktur-Produkte im <http://www.linworks-shop.de/>:
Server--Storage--Virtualisierung--Management SW--Passion for Performance
Jochen Bern, Systemingenieur --- LINworks GmbH <http://www.LINworks.de/>
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Geschäftsführer Metin Dogan, Oliver Michel

------------------------------------------------------------------------------
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list