Sha256: 4222a17800f500bc4d36f2292ea226d11c5723e68ca70e35ecd04731c8ad46e9

Contents?: true

Size: 609 Bytes

Versions: 24

Compression:

Stored size: 609 Bytes

Contents

require 'dashing-contrib/bottles/dashing'
# Look at internal all available widgets and creates an overall state information
module DashingContrib
  module Jobs
    module DashingState
      extend DashingContrib::RunnableJob

      def self.metrics(options)
        DashingContrib::Dashing.states.merge({ ignore: true })
      end

      def self.validate_state(metrics, options = {})
        return DashingContrib::RunnableJob::CRITICAL if metrics[:critical] > 0
        return DashingContrib::RunnableJob::WARNING  if metrics[:warning] > 0
        DashingContrib::RunnableJob::OK
      end
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
dashing-contrib-0.2.9 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.2.8 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.2.7 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.2.6 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.2.5 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.2.4 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.2.3 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.2.2 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.2.1 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.2.0 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.1.14 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.1.12 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.1.11 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.1.10 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.1.9 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.1.8 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.1.7 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.1.6 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.1.5 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.1.4 lib/dashing-contrib/jobs/dashing-state.rb