[% USE CPScalar -%] [% WRAPPER 'master_templates/master.tmpl' theme = "bootstrap" app_key = 'service_status' -%]

[% locale.maketext("Service Information") %]

[% locale.maketext("The Service Information table only reports monitored services. You can enable service monitoring in [output,url,_1,Service Manager].", "../scripts/srvmng") %]
[%- FOREACH data.service_data.sort('service') -%] [%- END -%]
[% locale.maketext("Service") %] [% locale.maketext("Version") %] [% locale.maketext("Status") %]
[% service %] [% version %] [%- IF is_pending -%] [%- locale.maketext("[comment,lowercase]pending[comment,indicates that status of a service has not been determined]") -%] [%- ELSIF is_up -%] [%- locale.maketext("up[comment,indicates that a service is running or operational]") -%] [%- ELSE -%] [%- locale.maketext("down[comment,indicates that a service is not running or is non-operational]") -%] [%- END -%] [%- IF ! is_pending -%] [%- IF is_up -%] [%- ELSE -%] [%- END -%] [%- END -%]

[% locale.maketext("System Information") %]

data.cpumax %] class="danger"[% ELSIF data.load >= ( data.cpumax * 0.8 ) %] class="warning"[% END %]> 90 %] class="danger"[% ELSIF data.mempct > 80 %] class="warning"[% END %]> 90 %] class="danger"[% ELSIF data.swappct > 80 %] class="warning"[% END %]>
[% locale.maketext("System Item") %] [% locale.maketext("Details") %] [% locale.maketext("Status") %]
[% locale.maketext("Server Load") %] [% locale.maketext('[numf,_1] ([quant,_2,CPU,CPUs])',data.load,data.cpunum) %] [% IF data.load > data.cpumax -%] [% ELSIF data.load >= ( data.cpumax * 0.8 ) %] [%- ELSE -%] [%- END -%]
[% locale.maketext("Memory Used") %] [% locale.maketext('[numf,_1]% ([numf,_2] of [numf,_3])',data.mempct,data.memused,data.memtotal) %] [%- IF data.mempct > 90 %] [% ELSIF data.mempct > 80 %] [%- ELSE -%] [%- END -%]
[% locale.maketext("Swap Used") %] [% locale.maketext('[numf,_1]% ([numf,_2] of [numf,_3])',data.swappct, data.swapused, data.swaptotal) %] [%- IF data.swappct > 90 %] [% ELSIF data.swappct > 80 %] [%- ELSE -%] [%- END -%]

[% locale.maketext("Disk Information") %]

[% FOREACH disk = data.disk_data -%] 90 %] class="danger"[% ELSIF disk.percentage > 80 %] class="warning"[% END %]> [% END -%]
[% locale.maketext("Device") %] [% locale.maketext("Mount Point") %] [% locale.maketext("Usage") %] [% locale.maketext("Status") %]
[% disk.filesystem FILTER html %] [% disk.mount FILTER html %] [% locale.maketext('[numf,_1]% ([numf,_2] of [numf,_3])',disk.percentage,disk.used,disk.total) %] [%- IF disk.percentage > 90 %] [% ELSIF disk.percentage > 80 %] [%- ELSE -%] [%- END -%]
[% END #wrapper -%]