mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 22:57:16 -04:00
- call it 'identity'
This commit is contained in:
parent
11a44303a8
commit
37a46265e6
2 changed files with 5 additions and 5 deletions
|
@ -6,7 +6,7 @@ class LogStash::Inputs::Xmpp < LogStash::Inputs::Base
|
||||||
config_name "xmpp"
|
config_name "xmpp"
|
||||||
|
|
||||||
# The user or resource ID, like foo@example.com.
|
# The user or resource ID, like foo@example.com.
|
||||||
config :jid, :validate => :string, :required => :true
|
config :identity, :validate => :string, :required => :true
|
||||||
|
|
||||||
# The xmpp password for the JID.
|
# The xmpp password for the JID.
|
||||||
config :password, :validate => :password, :required => :true
|
config :password, :validate => :password, :required => :true
|
||||||
|
@ -28,7 +28,7 @@ class LogStash::Inputs::Xmpp < LogStash::Inputs::Base
|
||||||
require 'xmpp4r' # xmpp4r gem
|
require 'xmpp4r' # xmpp4r gem
|
||||||
Jabber::debug = true if @debug
|
Jabber::debug = true if @debug
|
||||||
|
|
||||||
@client = Jabber::Client.new(Jabber::JID.new(@jid))
|
@client = Jabber::Client.new(Jabber::JID.new(@identity))
|
||||||
@client.connect(@host) # it is ok if host is nil
|
@client.connect(@host) # it is ok if host is nil
|
||||||
@client.auth(@password.value)
|
@client.auth(@password.value)
|
||||||
@client.send(Jabber::Presence.new.set_type(:available))
|
@client.send(Jabber::Presence.new.set_type(:available))
|
||||||
|
|
|
@ -6,8 +6,8 @@ require "logstash/namespace"
|
||||||
class LogStash::Outputs::Xmpp < LogStash::Outputs::Base
|
class LogStash::Outputs::Xmpp < LogStash::Outputs::Base
|
||||||
config_name "xmpp"
|
config_name "xmpp"
|
||||||
|
|
||||||
# Connection information for server
|
# The user or resource ID, like foo@example.com.
|
||||||
config :resource, :validate => :string, :required => true
|
config :identity, :validate => :string, :required => :true
|
||||||
|
|
||||||
# The xmpp password for the JID.
|
# The xmpp password for the JID.
|
||||||
config :password, :validate => :password, :required => :true
|
config :password, :validate => :password, :required => :true
|
||||||
|
@ -31,7 +31,7 @@ class LogStash::Outputs::Xmpp < LogStash::Outputs::Base
|
||||||
public
|
public
|
||||||
def connect
|
def connect
|
||||||
Jabber::debug = true
|
Jabber::debug = true
|
||||||
client = Jabber::Client.new(Jabber::JID.new(@resource))
|
client = Jabber::Client.new(Jabber::JID.new(@identity))
|
||||||
client.connect(@host)
|
client.connect(@host)
|
||||||
client.auth(@password.value)
|
client.auth(@password.value)
|
||||||
return client
|
return client
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue