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.1.3 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.1.2 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.1.1 lib/dashing-contrib/jobs/dashing-state.rb
dashing-contrib-0.1.0 lib/dashing-contrib/jobs/dashing-state.rb