<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On 19 Oct 2006, at 00:35, Gavin Carr wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On Wed, Oct 18, 2006 at 11:56:54AM -0800, Vonnahme, Nathan wrote:</DIV> <BLOCKQUOTE type="cite"><BLOCKQUOTE type="cite"><BLOCKQUOTE type="cite"><BLOCKQUOTE type="cite"></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Wouldn't stanza@/path/to/file be more logical?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Perhaps a CGIish questionmark would work?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">     </SPAN>--extra-opts=/path/to/file?stanzaname</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Actually it would probably be clearer and more memorable to have two</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">optional options, so you can omit one easily:</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-tab-span" style="white-space:pre">  </SPAN>--cfg-file=/path/to/file --cfg-stanza=stanzaname</DIV> </BLOCKQUOTE><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">One further wrinkle - a fairly typical use case, I imagine, will be<SPAN class="Apple-converted-space"> </SPAN></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">that I want to use extra options from the default file and the default</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">section (i.e. plugin name?). It would be nice to be able to support</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">that too ...</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">  </SPAN>--extra-opts <SPAN class="Apple-converted-space">      </SPAN>?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><SPAN class="Apple-converted-space">  </SPAN>--extra-opts=1 <SPAN class="Apple-converted-space">    </SPAN>?</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><BR></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I like Nathan's suggestion of separate args too though. Hmmm.</DIV></BLOCKQUOTE></DIV><DIV><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I'd echo Sean's "don't make this too complicated right now" message.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>My conceptual idea of these extra opts is that when you hit --extra-opts=???, this option is effectively replaced in line with the options in the config file. You may have other options in front or behind. Assume:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>{default config file}</DIV><DIV>[check_mysql]</DIV><DIV>username=tonvoon</DIV><DIV>password=secret</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>[more_options]</DIV><DIV>username=altinity</DIV><DIV>warning=10</DIV><DIV>critical=15</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Then:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>./check_mysql -S --extra-opts= -H localhost</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>is effectively:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>./check_mysql -S --username=tonvoon --password=secret -H localhost</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>However, if you use Nathan's separate args form, you'd have to parse all the options before you can replace (as you may not want the default stanza name). Also where do you replace?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>./check_mysql -S --cfg-file= -H localhost --cfg-stanza=</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Do you replace --cfg-file or --cfg-stanza? I think to avoid the confusion (at the expense of a more obscure syntax), it should be a single option. This then allows Gavin's request of having multiple options. So:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>./check_mysql -S --extra-opts= --extra-opts=more_options -H localhost</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Is effectively:</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>./check_mysql -S --username=tonvoon --password=secret --username=altinity --warning=10 --critical=15 -H localhost</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I think this is fairly intuitive. Notice username is listed twice. I don't think the "replacement opts" function should care what has passed before or after - it just puts everything down since some plugins expect arguments a multiple number of times (check_disk -p / -p /var). How the plugin responds to double requests is the plugin's responsibility.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Ooh, I'm getting excited! Where can I sign up?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Ton</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><A href="http://www.altinity.com">http://www.altinity.com</A></DIV><DIV>T: +44 (0)870 787 9243</DIV><DIV>F: +44 (0)845 280 1725</DIV><DIV>Skype: tonvoon</DIV></SPAN></SPAN></SPAN></SPAN></SPAN><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></BODY></HTML>