0 || $alert_criticality > 0) { monitorDebug('Monitor Notification Enabled for Devices'); // Get hosts that are above threshold. Start with Alert, and then Warning. if ($alert_criticality) { getHostsByListType('alert', $alert_criticality, $global_list, $notify_list, $lists); } if ($warning_criticality) { getHostsByListType('warn', $warning_criticality, $global_list, $notify_list, $lists); } flattenLists($global_list, $notify_list); monitorDebug('Lists Flattened there are ' . sizeof($global_list) . ' Global Notifications and ' . sizeof($notify_list) . ' Notification List Notifications.'); if (strlen(read_config_option('alert_email')) == 0) { monitorDebug('WARNING: No Global List Defined. Please set under Settings -> Thresholds'); cacti_log('WARNING: No Global Notification List defined. Please set under Settings -> Thresholds', false, 'MONITOR'); } if (cacti_sizeof($global_list) || sizeof($notify_list)) { // array of email[list|'g'] = true; $notification_emails = getEmailsAndLists($lists); // Send out emails to each emails address with all notifications in one if (cacti_sizeof($notification_emails)) { foreach ($notification_emails as $email => $lists) { monitorDebug('Processing the email address: ' . $email); processEmail($email, $lists, $global_list, $notify_list); $notifications++; } } } } else { monitorDebug('Both Warning and Alert Notification are Disabled.'); } [$purge_n, $purge_r] = purgeEventRecords(); $poller_end = microtime(true); $stats = 'Time:' . round($poller_end - $poller_start, 2) . ' Reboots:' . $reboots . ' DownDevices:' . $recent_down . ' Notifications:' . $notifications . ' Purges:' . ($purge_n + $purge_r); cacti_log('MONITOR STATS: ' . $stats, false, 'SYSTEM'); set_config_option('stats_monitor', $stats); exit;