<p>Isn't this WAI, but maybe not as expected to those unfamiliar with unix getopt conventions?<br>
I bet if you just specify just one of the options, you will get a usage error:</p>

<p>[root@localhost nagios-plugins]# ./plugins/check_procs -w<br>
./plugins/check_procs: option requires an argument -- 'w'</p>

<p>If you specify both, if will take the next parameter as the optarg value:</p>

<p>[root@localhost nagios-plugins]# ./plugins/check_procs -w -c<br>
PROCS WARNING: 81 processes | procs=81;-c;;0;</p>

<p>Notice the perfdata setting "-c" as the warning threshold.  I guess some extra validation could be added to all of the relevant case statements for the optargs (using some yet to be created functions in utils), but given the amount of special cases, it will still add a number of lines to every plugin.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br><a href='https://github.com/monitoring-plugins/monitoring-plugins/issues/1251#issuecomment-39120691'>Reply to this email on GitHub</a>.<img src='https://github.com/notifications/beacon/5514713__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcxMTkwODIxOCwiZGF0YSI6eyJpZCI6Mjg4OTYzNjV9fQ==--d3cb33005fec0331c17f0fe7d7b5d29e32a51327.gif' height='1' width='1'></p>