I am using the package for Ubuntu (by formorer) which is 1.8.1-2

I have an issue where avail.cgi is outputting invalid data if you use the
CSV/JSON/XML format.

Examples:

CSV:

'HOSTGROUP SOC2 HOST_STATE_BREAKDOWNS';
'host_name';'time_up_scheduled';'percent_time_up_scheduled';'percent_known_time_up_scheduled';'time_up_unscheduled';'percent_time_up_unscheduled';'percent_known_time_up_unscheduled';'total_time_up';'percent_total_time_up';'percent_known_time_up';'time_down_scheduled';'percent_time_down_scheduled';'percent_known_time_down_scheduled';'time_down_unscheduled';'percent_time_down_unscheduled';'percent_known_time_down_unscheduled';'total_time_down';'percent_total_time_down';'percent_known_time_down';'time_unreachable_scheduled';'percent_time_unreachable_scheduled';'percent_known_time_unreachable_scheduled';'time_unreachable_unscheduled';'percent_time_unreachable_unscheduled';'percent_known_time_unreachable_unscheduled';'total_time_unreachable';'percent_total_time_unreachable';'percent_known_time_unreachable';'time_undetermined_not_running';'percent_time_undetermined_not_running';'time_undetermined_no_data';'percent_time_undetermined_no_data';'total_time_undetermined';'percent_total_time_undetermined';
'host.example.site';'59111';'0.000%';'0.000%';'2390399';'0.000%';'0.000%';'2449510';'94.372%';'94.372%';'146089';'0.000%';'0.000%';'0';'0.000%';'0.000%';'146089';'5.628%';'5.628%';'0';'0.000%';'0.000%';'0';'0.000%';'0.000%';'0';'0.000%';'0.000%';'0';'0.000%';'0';'0.000%';'0';'0.000%';

XML for the same host:


<host name="host.example.site">
<time_up_scheduled>
59111
</time_up_scheduled>
<percent_time_up_scheduled>
0.000
</percent_time_up_scheduled>
<percent_known_time_up_scheduled>
0.000
</percent_known_time_up_scheduled>
<time_up_unscheduled>
2390399
</time_up_unscheduled>
<percent_time_up_unscheduled>
0.000
</percent_time_up_unscheduled>
<percent_known_time_up_unscheduled>
0.000
</percent_known_time_up_unscheduled>
<total_time_up>
2449510
</total_time_up>
<percent_total_time_up>
94.372
</percent_total_time_up>
<percent_known_time_up>
94.372
</percent_known_time_up>
<time_down_scheduled>
146089
</time_down_scheduled>
<percent_time_down_scheduled>
0.000
</percent_time_down_scheduled>
<percent_known_time_down_scheduled>
0.000
</percent_known_time_down_scheduled>
<time_down_unscheduled>
0
</time_down_unscheduled>
<percent_time_down_unscheduled>
0.000
</percent_time_down_unscheduled>
<percent_known_time_down_unscheduled>
0.000
</percent_known_time_down_unscheduled>
<total_time_down>
146089
</total_time_down>
<percent_total_time_down>
5.628
</percent_total_time_down>
<percent_known_time_down>
5.628
</percent_known_time_down>
<time_unreachable_scheduled>
0
</time_unreachable_scheduled>
<percent_time_unreachable_scheduled>
0.000
</percent_time_unreachable_scheduled>
<percent_known_time_unreachable_scheduled>
0.000
</percent_known_time_unreachable_scheduled>
<time_unreachable_unscheduled>
0
</time_unreachable_unscheduled>
<percent_time_unreachable_unscheduled>
0.000
</percent_time_unreachable_unscheduled>
<percent_known_time_unreachable_unscheduled>
0.000
</percent_known_time_unreachable_unscheduled>
<total_time_unreachable>
0
</total_time_unreachable>
<percent_total_time_unreachable>
0.000
</percent_total_time_unreachable>
<percent_known_time_unreachable>
0.000
</percent_known_time_unreachable>
<time_undetermined_not_running>
0
</time_undetermined_not_running>
<percent_time_undetermined_not_running>
0.000
</percent_time_undetermined_not_running>
<time_undetermined_no_data>
0
</time_undetermined_no_data>
<percent_time_undetermined_no_data>
0.000
</percent_time_undetermined_no_data>
<total_time_undetermined>
0
</total_time_undetermined>
<percent_total_time_undetermined>
0.000
</percent_total_time_undetermined>
</host>


If you look at the "time_down_scheduled" field, you'll see the actual time
that the host was down, however, the "percent_time_down_scheduled" is 0.

Is this a known bug, and is there a workaround (short of parsing through
perl and doing the math).

-- 
Patrick Forristal
------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
icinga-users mailing list
icinga-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/icinga-users

Reply via email to