I'm not sure I quite understand then. Where I've gotten bit by this is
where a value doesn't get passed from another script, maybe in that case
the value isn't available. So it's not a matter of RTFM, it's a matter
of a defined variable coming back with a null value. Or am I missing
the point of this?
Dan
-----Original Message-----
From: Andreas Ericsson [mailto:[email protected]]=20
Sent: Thursday, March 03, 2011 10:54 AM
To: Nagios Developers List
Subject: Re: [Nagios-devel] Non existent macros are not replaced
On 03/03/2011 05:39 PM, Matthieu Kermagoret wrote:
> Hi list,
>=20
> When using a non-existent macros in a command (like for example
> $SERVICEDESC$ in a host notification command), such macro is not
> replaced. It is instead left as-is on the command line.
>=20
> Such construct is interpreted by the shell as a variable (usually
> empty) followed by a dollar sign which (usually) expands to a single
> dollar and lead users to believe that Nagios replace non-existent
> macros with a single dollar (see ticket #34
> http://tracker.nagios.org/view.php?id=3D34).
>=20
> I believe this behavior is not intuitive and should therefore be
> modified to simply remove non-existent macros, as the attached patch
> does.
>=20
> What do you think about it ?
>=20
I think that would be quite stupid, as it would prevent users from
using shell variables in their commands, or multiple dollar-signs
for that matter. A completely unnecessary complication which would
only serve to limit Nagios' capabilities as a protection from a
completely harmless error caused by not RTFM'ing before typing.
While protecting users from making too many or too grave mistakes
is a fine thing indeed, it can be taken too far.
--=20
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
------------------------------------------------------------------------
------
Free Software Download: Index, Search & Analyze Logs and other IT data
in=20
Real-Time with Splunk. Collect, index and harness all the fast moving IT
data=20
generated by your applications, servers and devices whether physical,
virtual
or in the cloud. Deliver compliance at lower cost and gain new business=20
insights. http://p.sf.net/sfu/splunk-dev2dev=20
_______________________________________________
Nagios-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/lis ... gios-devel
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: ndreas Ericsson [mailto:[email protected]]=2