Re: [Nagios-devel] Change macro in script

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

Re: [Nagios-devel] Change macro in script

Post by Guest »

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:=20
>=20
> define service {=20
> ...=20
> _test TEST=20
> ...=20
> }=20
>=20
> In the script I want to do the following assignment :=20
>=20
> #! / bin / bash=20
> ...=20
> NAGIOS__SERVICETEST =3D " OUTROVALOR "=20
> ...=20

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/ext ... .php?comm=
and_id=3D140

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
--=20
*NEU* - NEC IT-Infrastruktur-Produkte im :
Server--Storage--Virtualisierung--Management SW--Passion for Performance
Jochen Bern, Systemingenieur --- LINworks GmbH
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt
PGP (1024D/4096g) FP =3D D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C2=
7
Tel. +49 6151 9067-231, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202
Unternehmenssitz Weiterstadt, Gesch=C3=A4ftsf=C3=BChrer Metin Dogan, Oliv=
er Michel





This post was automatically imported from historical nagios-devel mailing list archives
Original poster: Jochen.Bern@LINworks.de
Locked