[%
IF NOTICE.service_status == 'recovered';
SET recovered = 1;
SET message = CPANEL.locale.maketext('The service “[_1]” is now operational.', NOTICE.service_name);
ELSIF NOTICE.service_status == 'failed';
SET message = CPANEL.locale.maketext('The service “[_1]” appears to be down.', NOTICE.service_name);
ELSE;
SET message = CPANEL.locale.maketext('The system failed to determine the status of the service “[_1]”.', NOTICE.service_name);
END;
IF NOTICE.what_failed == 'command';
NOTICE.what_failed = CPANEL.locale.maketext('The system’s command to check or to restart this service failed.');
ELSIF NOTICE.what_failed == 'socket';
NOTICE.what_failed = CPANEL.locale.maketext('The system failed to connect to this service’s [asis,TCP/IP] port.');
ELSE;
NOTICE.what_failed = NOTICE.what_failed.html();
END;
VIEW error_highlighted_html;
BLOCK text;
SET lines_to_print = [];
SET msg_lines = item.split("\n");
FOR msg = msg_lines;
IF msg.match('(?i)(?:err(?:or)?[\]\s:]|:\s*bad \S+ name)');
line = '';
ELSIF msg.match('(?i)warn(?:ing)?[\]\s:]');
line = '';
ELSE;
lines_to_print.push(msg);
NEXT;
END;
line = line _ msg _ '';
lines_to_print.push(line);
END;
lines_to_print.join('
');
END;
END;
-%]
[%
PROCESS "include/colors.tmpl";
PROCESS "include/icons.tmpl";
PROCESS "include/styles.tmpl";
PROCESS "include/code_inline.tmpl";
PROCESS 'include/system_info_rows.tmpl';
WRAPPER 'wrapper/main.html.tmpl';
NOTICE.email_reason = message;
SET zebra_stripe = 0;
%]
[% zebra_stripe = !zebra_stripe %]
[% CPANEL.locale.maketext('Server') %]
[% NOTICE.hostname FILTER html %]
[% zebra_stripe = !zebra_stripe %]
[% CPANEL.locale.maketext('Primary [output,abbr,IP,Internet Protocol] Address') %]
[% NOTICE.mainip FILTER html %]
[% zebra_stripe = !zebra_stripe %]
[% CPANEL.locale.maketext('Service Name') %]
[% NOTICE.service_name FILTER html %]
[% zebra_stripe = !zebra_stripe %]
[% CPANEL.locale.maketext('Service Status') %]
[% NOTICE.service_status FILTER html %] [% get_icon(icon=NOTICE.service_status) %]
[% zebra_stripe = !zebra_stripe %]
[% IF NOTICE.what_failed %]
[% CPANEL.locale.maketext('Notification') %]
[% message FILTER html %]
[% zebra_stripe = !zebra_stripe %]
[% END %]
[% IF NOTICE.socket_error %]
[% CPANEL.locale.maketext('Service Check Method') %]
[% NOTICE.what_failed %]
[% zebra_stripe = !zebra_stripe %]
[% END %]
[% IF NOTICE.restart_count %]
[% CPANEL.locale.maketext('Reason') %]
[% code_inline_formatted(term=error_highlighted_html.print(NOTICE.socket_error)) %]
[% zebra_stripe = !zebra_stripe %]
[% END %]
[% IF NOTICE.command_error %]
[% CPANEL.locale.maketext('Number of Restart Attempts') %]
[% CPANEL.locale.numf(NOTICE.restart_count) FILTER html %]
[% zebra_stripe = !zebra_stripe %]
[% END %]
[% IF NOTICE.restart_info %]
[% CPANEL.locale.maketext('Service Check Raw Output') %]
[% code_inline_formatted(term=error_highlighted_html.print(NOTICE.command_error)) %]
[% zebra_stripe = !zebra_stripe %]
[% END %]
[% IF NOTICE.startup_log %]
[% CPANEL.locale.maketext('Restart Message') %]
[% code_inline_formatted(term=error_highlighted_html.print(NOTICE.restart_info)) %]
[% zebra_stripe = !zebra_stripe %]
[% END %]
[% IF NOTICE.syslog_messages %]
[% CPANEL.locale.maketext('Startup Log') %]
[% code_inline_formatted(term=error_highlighted_html.print(NOTICE.startup_log)) %]
[% zebra_stripe = !zebra_stripe %]
[% END %]
[% SET system_info_table_zebra = zebra_strip; %]
[% system_info_rows() %]
[% CPANEL.locale.maketext('Log Messages') %]
[% code_inline_formatted(term=error_highlighted_html.print(NOTICE.syslog_messages)) %]
[% CPANEL.locale.maketext('The [asis,chkservd] process attempts to connect to “127.0.0.1:[_1]” in order to validate that this service is functioning. If you blocked connections with [asis,iptables] or the “[_2]” interface in [asis,WHM], this failure may be a false positive.', NOTICE.port, CPANEL.locale.maketext('Host Access Control')); %]
[% CPANEL.locale.maketext('To resolve this issue, either open the firewall to allow connections as the [asis,root] user to “127.0.0.1:[_1]” or disable checks for this service in [asis,WHM]’s “[_2]” interface with the “[_3]” link below.', NOTICE.port, CPANEL.locale.maketext('Service Manager'), CPANEL.locale.maketext('Configure Monitor[comment,program that observes] Settings') ); %]
[% END %]
[% CPANEL.locale.maketext('Configure Monitor[comment,program that observes] Settings'); %]:
[% NOTICE.service_manager_url %]
[% CPANEL.locale.maketext('Configure [asis,chkservd]'); %]:
[% NOTICE.tweaksettings_chkservd_url %]
[% CPANEL.locale.maketext('Disable [output,abbr,HTML,Hypertext Markup Language] notifications'); %]:
[% NOTICE.tweaksettings_chkservd_plaintext_notify_url %]
[% CPANEL.locale.maketext('Disable recovery notifications'); %]:
[% NOTICE.tweaksettings_chkservd_recovery_notify_url %]