Sha256: 4fce9822f01c0f6bd7d25b60698207e880fdc0fb0a726f13b7561b69b4c4c7ae

Contents?: true

Size: 447 Bytes

Versions: 11

Compression:

Stored size: 447 Bytes

Contents

# -*- ruby -*-
#encoding: utf-8

require 'arborist'


Arborist::Observer "Webservers" do
	subscribe to: 'node.delta',
		where: {
			type: 'service',
			port: 80,
			delta: { status: ['up', 'down'] }
		}
	subscribe to: 'node.delta',
		where: {
			type: 'service',
			port: 443,
			delta: { status: ['up', 'down'] }
		}

	action do |uuid, event|
		$stderr.puts "Webserver %s is DOWN (%p)" % [ event['data']['identifier'], event['data'] ]
	end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
arborist-0.6.0 spec/data/observers/webservices.rb
arborist-0.5.0 spec/data/observers/webservices.rb
arborist-0.4.0 spec/data/observers/webservices.rb
arborist-0.3.0 spec/data/observers/webservices.rb
arborist-0.2.0 spec/data/observers/webservices.rb
arborist-0.2.0.pre20170519125456 spec/data/observers/webservices.rb
arborist-0.1.0 spec/data/observers/webservices.rb
arborist-0.0.1.pre20161005182540 spec/data/observers/webservices.rb
arborist-0.0.1.pre20161005112841 spec/data/observers/webservices.rb
arborist-0.0.1.pre20160829140603 spec/data/observers/webservices.rb
arborist-0.0.1.pre20160606141735 spec/data/observers/webservices.rb