Sha256: c1c19f7d3de3bf51d2b7facd307782dbb7b503f2cdc74ada42e30232f351c871

Contents?: true

Size: 931 Bytes

Versions: 5

Compression:

Stored size: 931 Bytes

Contents

# frozen_string_literal: true

module RailsServerMonitor
  class Configuration
    attr_writer :update_server_interval, :snapshot_server_interval, :ignore_urls,
                :cleanup_snapshots_after, :ignore_workers, :high_cpu_usage_threshold,
                :low_memory_threshold, :low_free_disk_disk_threshold

    def update_server_interval
      @update_server_interval || 1.hour
    end

    def snapshot_server_interval
      @snapshot_server_interval || 15.minutes
    end

    def cleanup_snapshots_after
      @cleanup_snapshots_after || 30.days
    end

    def ignore_urls
      @ignore_urls || []
    end

    def ignore_workers
      @ignore_workers || []
    end

    def high_cpu_usage_threshold
      @high_cpu_usage_threshold || 95
    end

    def low_memory_threshold
      @low_memory_threshold || 20
    end

    def low_free_disk_disk_threshold
      @low_free_disk_disk_threshold || 30
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails-server-monitor-0.1.8 lib/rails_server_monitor/configuration.rb
rails-server-monitor-0.1.7 lib/rails_server_monitor/configuration.rb
rails-server-monitor-0.1.6 lib/rails_server_monitor/configuration.rb
rails-server-monitor-0.1.5 lib/rails_server_monitor/configuration.rb
rails-server-monitor-0.1.4 lib/rails_server_monitor/configuration.rb