Sha256: 983498fddf6fb5100f859c4ed6da9a733caff311c5e808d3aa0d5da35eb7f98c

Contents?: true

Size: 352 Bytes

Versions: 3

Compression:

Stored size: 352 Bytes

Contents

class Nagios::<%= class_name %> < Nagios::CheckEM
  # You can define script parameters this way:
  params :x # and can use further just x

  def execute
    EM.next_tick do
      safe do
        warn "hmmm" if x == 'w'
        crit "ouch" if x == 'c'
        ok "good"

        send_result # should be!, for sending results
      end
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nagios_helper-0.2.2 lib/generators/nagios/templates/script_class_em.rb
nagios_helper-0.2.1 lib/generators/nagios/templates/script_class_em.rb
nagios_helper-0.2 lib/generators/nagios/templates/script_class_em.rb