Sha256: 090d31bf86f5166d8a9d76675387c0a4796ec0888f17cbd09adfa1f9c291417c
Contents?: true
Size: 1.88 KB
Versions: 11
Compression:
Stored size: 1.88 KB
Contents
# frozen_string_literal: true module Neetob class CLI module MonthlyAudit module InstancesAndAddons module Cronitor class SetupCorrectlyForHelpCenter < CLI::Base def initialize super() end def run ui.success "### 3.3.2. Checking whether Cronitor monitors are set up correctly for Help Centers" all_monitors = Neetob::CLI::Cronitor::GetAllMonitors.new.run apps_data = [["App", "Monitor for Application help center present", "Monitor for Application help center enabled", "Comments", "Audit Passed"]] ui.info("\n", print_to_audit_log: false) Neetob::CLI::Sre::Base::RESOURCES.keys.each do |app| comments = nil audit_passed = "No" monitor_for_app_help_center_present = "No" monitor_for_app_help_center_enabled = "No" ui.info("Checking Application help center monitor for #{app}", print_to_audit_log: false) application_help_center_monitor = all_monitors.select { |monitor| monitor[:name].downcase == "#{app} Help Center".downcase }.first if application_help_center_monitor.nil? comments = "Monitor not present" else monitor_for_app_help_center_present = "Yes" if application_help_center_monitor[:paused] comments = "Monitor is paused" else monitor_for_app_help_center_enabled = "Yes" audit_passed = "Yes" end end apps_data << [app, monitor_for_app_help_center_present, monitor_for_app_help_center_enabled, comments, audit_passed] end ui.print_table(apps_data) end end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems