<div dir="ltr"><div>This was very valuable feedback on current proposal spec  I really appreciate Jochen going through it. My reply in regards to the feedback is below and I modified proposal text based on the feedback. Latest version can be found at:<br>

<br> <a href="https://github.com/willixix/nagios-plugins/wiki/Draft-Proposal:-Nagios-Plugins-Development-Guidelines-and-Threshold-Syntax-Specification-2.0">https://github.com/willixix/nagios-plugins/wiki/Draft-Proposal:-Nagios-Plugins-Development-Guidelines-and-Threshold-Syntax-Specification-2.0</a></div>

<div><a href="https://github.com/willixix/nagios-plugins/wiki/Draft-Proposal:-Nagios-Plugins-Development-Guidelines-and-Threshold-Syntax-Specification-2.0"><br></a>On Wed, Aug 21, 2013 at 11:31 AM, Jochen Bern <span dir="ltr"><<a href="mailto:Jochen.Bern@linworks.de" target="_blank">Jochen.Bern@linworks.de</a>></span> wrote:</div>

<div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>On <a href="tel:21.08.2013%2017" value="+12108201317" target="_blank">21.08.2013 17</a>:23, William Leibzon wrote:<br>



> I have requested time at upcoming Nagios conference for 30 minute BoF<br>
> session on this topic and to get feedback on any general features people<br>
> may like to see in all the plugins. They have't got back to me yet (only<br>
> sent email on Friday) but this is not a formal session and so I'd not<br>
> expect an issue with holding it after normal sessions are over.<br>
><br>
> My own plugins library and several plugins will support the syntax at<br>
> <a href="https://github.com/willixix/nagios-plugins/wiki/New-Threshold-Syntax" target="_blank">https://github.com/willixix/nagios-plugins/wiki/New-Threshold-Syntax</a> by<br>
> conference time (just committed most of the necessary code yesterday).<br>
<br>
</div>I'm afraid I haven't had much time to read up on the discussion ever<br>
since my first reply on the topic (which I made from a cell phone with<br>
an almost-depleted battery, so I'm sorry if I sounded a bit gruff), so<br>
let me take this opportunity to comment on the version currently on that<br>
page:<br>
<br>
-------<br>
<br>
I'm missing the possibility to supply *different* labels for the same<br>
(numerical) data as presented in the output vs. in the performance data.<br>
Cases where such a differentiation would be useful, off the top of my head:<br>
-- Output (-> notifications) in local staff's primary language, but<br>
   perfdata names shall be in English so as to permit *global*<br>
   referencing (say, in a performance data backend system's graph<br>
   templates)<br>
   [Same goes for things like "Houston Interlink" vs. "Interface 4711",<br>
   "upstream"/"downstream" vs. "ingress"/"egress", etc. ad nauseam]<br></blockquote><div><br></div><div>I already before added "label" for re-naming data which is meant to be both for status output and perf data. Per you suggestion I now also add "perf_label" that would allow to re-name only perf data label. I think these uses would be quite irregular, but we can allow for it.</div>



<div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
-- Continuity of saved performance data, e.g., what the first version<br>
   of the plugin reported as "rx pkts" should now be properly called<br>
   "received unicast packets to a local MAC" in the output but still<br>
   just "rx_pkts" in the performance data<br>
<br>
Note 1: It would be a possibility to use non-{yes_or_no} values for the<br>
        "display" and/or "perf" keywords to achieve this.<br></blockquote><div><br></div><div>What is wrong with "yes" and "no"?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">



Note 2: There are performance data backends which rely on the *order*<br>
        of performance data items, rather than their naming, to have<br>
        performance data items produced by the current plugin run<br>
        correlated to (hopefully) equivalent items of the previous<br>
        runs. Do we want to provide a means, however contrived, to<br>
        control that order?<br></blockquote><div><br></div><div>I added "order" keyword. But I think plugins should basically process threshold in the same order they are at the options line. That is at least what my own library does and it allows to specify order too but in different way.</div>


<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Note 3: Restricting the labels to [A-Za-z0-9_-]* means that we're<br>
        actually dropping behind the current perfdata spec (which allows<br>
        special chars inside quotes).<br></blockquote><div><br></div><div>That is an oversight in draft text. Full range of ascii symbols should be supported for metric name with quotes used just like in current spec. However when creating custom perfdata label I think restricting set of symbols is better.</div>


<div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
-------<br>
<br>
rrdtool, as the most common basis for performance data backends, allows<br>
you to provide a non-numerical value 'c so that you can provide<br>
complete data*sets* even in cases where single *values* are unknown /<br>
cannot be determined. PNP4Nagios followed suit and now allows plugins to<br>
return 'U' in the performance data (replacing the number, still allowing<br>
the UOM etc.). I think this should make it into an updated perfdata spec<br>
(which is likely to result from *this* activity sooner rather than later).<br></blockquote><div><br></div><div>I added this into spec proposal now too. In case "absent" keyword is present, the plugin should return U in performance data.</div>


<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
-------<br>
<br>
Speaking of the UOM, your spec for the "uom" keyword mirrors the current<br>
perfdata specs in only allowing UOMs from a given whitelist. [Yes, I'm<br>
aware that the allowed values for your "uom" keyword do not necessarily<br>
imply restrictions on the UOM spec for plugin output, but bear with me.]<br>
<br>
This approach has, in my opinion, proven to be a failure because it is<br>
virtually impossible to provide an all-encompassing list of UOMs that<br>
may occur in the wild. (Off the top of my head, I have "ppm" from ntpd<br>
drift files, several UOMs for bandwidth, "dBm" for GSM reception level,<br>
"degC" for Temperatures, "RPM" for fans, "V" for Voltages, ...) One<br>
consequence of that is that I do not know a *single* perfdata backend<br>
that would try to split the perfdata UOM back into unit and prefix, and<br>
*that* results in output (graphs) where UOMs like "kB" (as output by<br>
"df", for example) get scaled into "MkB" and similar chimeras. Thus, my<br>
first suggestion: Drop the ever-outdated base unit registry!</blockquote><div><br></div><div>As far as I know PnP and other backends do clearly differentiate 'c' from anything else which they just treat as custom label or not support at all. It is true that multipliers "k", "m", etc are not currently differentiated and perhaps if we make it clear these are si units they will start to be used. I modified proposal text to specify how custom labels can be supported and how to differentiate SI ranges as part of that. Please everyone go through this.</div>

<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Second, if we want a chance to *ever* get proper automatic UOM scaling<br>


back in working order, we need some sort of hint within the perfdata UOM<br>
string that allows the backends to tell prefix from base unit, candela<br>
from centidays, Ampere- from attohours, etc.. I'm thinking of a<br>
separator character, preferably one that results in a small, unobtrusive<br>
representation if *not* caught before Web-UI etc.. (U+00B7 looks like a<br>
good candidate to me, but I'm not very experienced with charset<br>
conversion and compatibility problems ...)<br></blockquote><div><br></div><div>I added two way to do it. One is with a single one-letter UOM followed by custom unit name and 2nd is by specifying full NIST prefix name followed by '-' and then unit name.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
-------<br>
<br>
The "prefix" keyword *badly* needs a clarification where it shall have<br>
an effect and where not:<br></blockquote><div><br></div><div>My understanding of original proposal is that PREFIX keyword would only effect how data is scaled when plugin does status line output. UOM keyword is used both for both labeling and scaling of data when output goes into performance data. Perhaps these two should be combined or separated differently. Please let me know. </div>

<div> </div><div>The actual list of valid prefixes and how to create custom UOMs and differentiate them should all be more clear from updated text.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


-- prefixed to string specified with "uom" keyword<br>
-- causing the relevant number output to be rescaled<br>
   -- *from* prefixed *to* prefixless UOM<br>
      (i.e., "prefix:k" changes original result "3.14" to "3140",<br>
      equivalent to the statement "the number obtained by the plugin<br>
      up to output formatting *is in* thousands")<br>
   -- *from* prefixless *to* prefixed UOM<br>
      (i.e., when the plugin's original output is "4711 foo",<br>
      "prefix:k" shall change it to "4.7 kfoo"<br>
-- causing the *thresholds* to be rescaled accordingly<br>
   -- again, *from* or *to* the given prefix<br>
and most of this could potentially apply to a number's representation in<br>
the output, the perfdata, or both ...<br>
<div><div><br>
Kind regards,<br>
                                                                J. Bern<br>
--<br>
*NEU* - NEC IT-Infrastruktur-Produkte im <<a href="http://www.linworks-shop.de/" target="_blank">http://www.linworks-shop.de/</a>>:<br>
Server--Storage--Virtualisierung--Management SW--Passion for Performance<br>
Jochen Bern, Systemingenieur --- LINworks GmbH <<a href="http://www.LINworks.de/" target="_blank">http://www.LINworks.de/</a>><br>
Postfach 100121, 64201 Darmstadt | Robert-Koch-Str. 9, 64331 Weiterstadt<br>
PGP (1024D/4096g) FP = D18B 41B1 16C0 11BA 7F8C DCF7 E1D5 FAF4 444E 1C27<br>
Tel. <a href="tel:%2B49%206151%209067-231" value="+4961519067231" target="_blank">+49 6151 9067-231</a>, Zentr. -0, Fax -299 - Amtsg. Darmstadt HRB 85202<br>
Unternehmenssitz Weiterstadt, Geschäftsführer Metin Dogan, Oliver Michel<br>
</div></div></blockquote></div><br></div><div class="gmail_extra">Thanks again for the feedback,</div><div class="gmail_extra"><br></div><div class="gmail_extra">William</div></div>