Sha256: cd2dd44aa31526b87e7580fa4e219dd7fd373b9e219f54596d0c0edf4069ceb6
Contents?: true
Size: 1.89 KB
Versions: 11
Compression:
Stored size: 1.89 KB
Contents
# frozen_string_literal: true module Neetob class CLI module MonthlyAudit module InstancesAndAddons module Cronitor class SetupCorrectlyForLandingPages < CLI::Base def initialize super() end def run ui.success "### 3.3.3. Checking whether Cronitor monitors are set up correctly for landing pages" all_monitors = Neetob::CLI::Cronitor::GetAllMonitors.new.run apps_data = [["App", "Monitor for Application landing page present", "Monitor for Application landing page 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_landing_page_present = "No" monitor_for_app_landing_page_enabled = "No" ui.info("Checking Application landing page monitor for #{app}", print_to_audit_log: false) application_landing_page_monitor = all_monitors.select { |monitor| monitor[:name].downcase == "#{app} Homepage".downcase }.first if application_landing_page_monitor.nil? comments = "Monitor not present" else monitor_for_app_landing_page_present = "Yes" if application_landing_page_monitor[:paused] comments = "Monitor is paused" else monitor_for_app_landing_page_enabled = "Yes" audit_passed = "Yes" end end apps_data << [app, monitor_for_app_landing_page_present, monitor_for_app_landing_page_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