[Nagiosplug-devel] Release 1.4.4
Ton Voon
ton.voon at altinity.com
Thu Oct 12 16:15:20 CEST 2006
Andreas,
Thanks for the report and the patch. I've added a test in plugins/t/
check_disk.t so we should catch this in future.
The behaviour is, with -e, if everything is OK, only show "DISK OK".
Otherwise to only show output on failure. Perf data will always be
returned for all disks.
Ton
On 12 Oct 2006, at 14:14, Andreas Behal wrote:
> Hi,
>
> well - if you mention check_disk:
>
> As the 'stable' version from check_disk didn't work for me on AIX I
> decided to compile the HEAD-CVS which was much better, but still
> had one
> Bug concerning the -e (only show errors) flag, which never showed any
> errors.
>
> I think this is due to some confusion with disk_result, result and
> tmp_result:
>
> bash#> grep disk_result
> nagios-plugins-HEAD-200610121152/plugins/check_disk.c
>>
>> int disk_result = STATE_UNKNOWN;
>> if (disk_result==STATE_OK && erronly && !verbose)
>> if (disk_result!=STATE_OK || verbose>=0) {
>
> So, disk_result is set only once and never touched after. I have
> made a
> patch that works for me (do not hit me If i get something totally
> wrong
> - I'm on this list since yesterday ..)
>
> best regards,
>
> Andreas
>
>
> --- nagios-plugins-HEAD-200610102352/plugins/check_disk.c
> 2006-08-14 11:04:16.000000000 +0200
> +++ nagios-plugins-HEAD-200610102352/plugins/check_disk.c.new
> 2006-10-11 11:33:14.000000000 +0200
> @@ -206,6 +206,10 @@
>
> /* Process for every path in list */
> for (path = path_select_list; path; path=path->name_next) {
> +
> + /* reset the disk result */
> + disk_result = STATE_UNKNOWN;
> +
> me = path->best_match;
>
> /* Filters */
> @@ -258,23 +262,25 @@
>
> temp_result = get_status(dfree_units, path->freespace_units);
> if (verbose >=3) printf("Freespace_units result=%d\n",
> temp_result);
> - result = max_state( result, temp_result );
> + disk_result = max_state( disk_result, temp_result );
>
> temp_result = get_status(dfree_pct, path->freespace_percent);
> if (verbose >=3) printf("Freespace%% result=%d\n",
> temp_result);
> - result = max_state( result, temp_result );
> + disk_result = max_state( disk_result, temp_result );
>
> temp_result = get_status(dused_units, path->usedspace_units);
> if (verbose >=3) printf("Usedspace_units result=%d\n",
> temp_result);
> - result = max_state( result, temp_result );
> + disk_result = max_state( disk_result, temp_result );
>
> temp_result = get_status(dused_pct, path->usedspace_percent);
> if (verbose >=3) printf("Usedspace_percent result=%d\n",
> temp_result);
> - result = max_state( result, temp_result );
> + disk_result = max_state( disk_result, temp_result );
>
> temp_result = get_status(dused_inodes_percent,
> path->usedinodes_percent);
> if (verbose >=3) printf("Usedinodes_percent result=%d\n",
> temp_result);
> - result = max_state( result, temp_result );
> + disk_result = max_state( disk_result, temp_result );
> +
> + result = max_state(result, disk_result);
>
> asprintf (&perf, "%s %s", perf,
> perfdata ((!strcmp(me->me_mountdir, "none") ||
> display_mntp) ? me->me_devname : me->me_mountdir,
>
>
>
>
>
> Ton Voon wrote:
>> Hi!
>>
>> I want to get a release a 1.4.4 out because there's lots of good
>> stuff
>> currently in CVS HEAD and I keep referring people to use that, so we
>> might as well release it.
>>
>> I've got to add in perf data back into check_disk, but that is
>> probably the only item that is outstanding on my list. Is there
>> anything else that needs to be done for the next release?
>
> ----------------------------------------------------------------------
> ---
> Using Tomcat but need to do more? Need to support web services,
> security?
> Get stuff done quickly with pre-integrated technology to make your
> job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
> Geronimo
> http://sel.as-us.falkag.net/sel?
> cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________________
> Nagios Plugin Development Mailing List Nagiosplug-
> devel at lists.sourceforge.net
> Unsubscribe at https://lists.sourceforge.net/lists/listinfo/
> nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any
> issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
>
> This message has been scanned for viruses by MailController -
> www.MailController.altohiway.com
http://www.altinity.com
T: +44 (0)870 787 9243
F: +44 (0)845 280 1725
Skype: tonvoon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/devel/attachments/20061012/6e746205/attachment.html>
More information about the Devel
mailing list