Created
January 11, 2013 22:12
-
-
Save grantr/4514401 to your computer and use it in GitHub Desktop.
zensu dynamic configuration and remote broadcast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> require 'zensu' | |
=> true | |
>> Zensu::Client::App.run!; nil | |
=> nil | |
>> Zensu.config.servers = ["tcp://127.0.0.1:58000"] | |
=> ["tcp://127.0.0.1:58000"] | |
>> D, [2013-01-11T14:08:30.692941 #7480] DEBUG -- default: got connect_delayed socket event: event [2], addr [tcp://127.0.0.1:58000], fd [115], field2 [115] | |
D, [2013-01-11T14:08:30.694223 #7480] DEBUG -- default: got connected socket event: event [1], addr [tcp://127.0.0.1:58000], fd [19], field2 [19] | |
I, [2013-01-11T14:08:32.152452 #7480] INFO -- default: 76711953-fa99-4586-8520-000000050000 up | |
D, [2013-01-11T14:09:37.599686 #7480] DEBUG -- default: handled broadcast: zensu.broadcast.topic hello clients |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> require 'zensu' | |
=> true | |
>> Zensu::Server::App.run!; nil | |
=> nil | |
>> Zensu.config.broadcast_endpoint = "tcp://127.0.0.1:58000" | |
=> "tcp://127.0.0.1:58000" | |
>> D, [2013-01-11T14:08:12.867035 #7626] DEBUG -- default: got listening socket event: event [8], addr [tcp://127.0.0.1:58000], fd [19], field2 [19] | |
D, [2013-01-11T14:08:30.692714 #7626] DEBUG -- default: got accepted socket event: event [32], addr [tcp://127.0.0.1:58000], fd [20], field2 [20] | |
>> broadcaster = Celluloid::Actor.all.detect { |a| a.class == Zensu::Server::Broadcaster } | |
=> #<Celluloid::Actor(Zensu::Server::Broadcaster:0x7315f4)> | |
>> broadcaster.broadcast("topic", "hello clients") | |
D, [2013-01-11T14:09:37.596860 #7626] DEBUG -- default: publishing to topic: hello clients | |
=> ["zensu.broadcast.topic", "hello clients"] | |
>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment