[Nagiosplug-devel] RFC: New threshold syntax

Max perldork at webwizarddesign.com
Wed Mar 19 13:50:42 CET 2008

On Wed, Mar 19, 2008 at 7:17 AM, Andreas Ericsson <ae at op5.se> wrote:
>  Yes, because many people will forget the quotes lots and lots of
>  times. Syntaxes that so obviously will lead to irritation is stupid.
>  definition. I know from personal experience that people will almost
>  always omit quoting the first time a program is run if they're not
>  a) 100% alert
>  b) very used to Unix
>  c) the developer who wrote the app
>  d) previously bitten numerous times by the same issue

>  The problem with overloading a shell operator is that the plugin
>  author gets zero chance of giving decent feedback to the user what
>  he did wrong, because he can't see the entire commandline the user
>  gave, and someone not savvy enough with unix but still wishing to
>  run Nagios won't have any idea what so ever that <> are input/output
>  redirection commands for the shell to interpret.
>  So yes, the idea of using shell operators in command arguments is
>  clearly bogus.

>  user to "be more careful when creating his command definitions" and
>  you'll just have made one HP openview sales rep very happy.

Ok, so you are a pessimist about the ability of normal users to be
competent with shell syntax and I am an optimist.

I don't agree that most users will forget to quote arguments, that
hasn't been my experience with people new to Linux or Unix, but I
certainly can't talk to your experience.

>  Except that '<' is *also* bogus, and will break horribly for any program
>  running a script that can accept input on stdin.

Again works fine if quotes are used and the person is not on some
ancient shell as you clearly pointed out that will break things even
with quoting.

>  >>> just rip an SQL-parsing implementation directly, with subquery
>  >>> support
>  >>> tucked right in.
>  Ugly, since SQL has different quoting / escape rules than shell, so
>  you have to mix the two in order to be able to utilize it fully. Iow,
>  same can of worms that Max wants to open, but opened from underneath
>  and only powerusers will get bitten, as opposed to everyone.

Then why did you bring the idea to the table?  That was your idea in
your earlier email.

I don't want to 'open a can of worms', I want syntax that is easy to
maintain and understand for new users and syntax that is rich enough
to model complex conditionals for advanced users that still maintains
some form of readability, to me it seems like this will all be going
down the road of not having the holy grail of argument standards but
instead continuing the lines of having best practices, maybe just
having best practices for those less experienced with plugin writing
and Linux/Unix and another set for those who are more experienced with
the two.

Appreciate the lengthy explanation of why you thought my idea was
stupid, bogus, idiotic, whatever other insults you wish to add.  Would
have been nice if you explained that up front and substituted your
obviously knowledgeable understanding of the problems that might cause
for some users on some systems instead of just insulting me without
any explanation.

Sorry to the others on this conversation for the sidetrack, I will
contribute to the thread again only if I have something productive to
add, and I am very glad this topic is being discussed :), good stuff.

- Max

More information about the Devel mailing list