mirror of
https://github.com/elastic/logstash.git
synced 2025-04-24 14:47:19 -04:00
parent
c749d16bd4
commit
b314800abc
1 changed files with 9 additions and 1 deletions
|
@ -87,9 +87,17 @@ module LogStash
|
|||
@server = ::Puma::Server.new(app, events)
|
||||
@server.add_tcp_listener(http_host, port)
|
||||
|
||||
logger.info("Successfully started Logstash API endpoint", :port => @port)
|
||||
logger.info("Successfully started Logstash API endpoint", :port => port)
|
||||
|
||||
set_http_address_metric("#{http_host}:#{port}")
|
||||
|
||||
@server.run.join
|
||||
end
|
||||
|
||||
private
|
||||
def set_http_address_metric(value)
|
||||
return unless @agent.metric
|
||||
@agent.metric.gauge([], :http_address, value)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue