Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Logstash output for Functionbeat #11757

Closed
bczifra opened this issue Apr 11, 2019 · 8 comments · Fixed by #13345
Closed

Add Logstash output for Functionbeat #11757

bczifra opened this issue Apr 11, 2019 · 8 comments · Fixed by #13345

Comments

@bczifra
Copy link
Member

bczifra commented Apr 11, 2019

Describe the enhancement:
Add a Logstash output for Functionbeat

Describe a specific use case for the enhancement or feature:
Elasticsearch clusters may be inaccessible from the cloud where Functionbeat runs. In such situations, it would be helpful to output to Logstash which could then forward the events as necessary.

An example flow: Functionbeat -> Logstash in internet -> Kafka queues in internet -> Logstash in intranet -> ... -> Elasticsearch.

related: #9866

@kylegoch
Copy link

This would also be useful for cases were you are using beats elsewhere and they all go to Logstash.

Having a beat that doesn't ship to Logstash seems silly, but I digress.

@cph1c06
Copy link

cph1c06 commented May 14, 2019

Shipment to Logstash is necessary function for Functionbeat as users can manipulate data using methods/parameters they had been familiar with for years.

@L-F-Escobar
Copy link

can functionbeat installed on aws cloudwatch/lambda send logs from a specific log group to logstash?

Within the functionbeat.yml file I see a logstash output section. Currently I am sending logs directly to my elastic cloud with my id/password. How can I send logs to logstash for data enrichment and then to kibana for visualization?

This is my functionbeat.yml file

functionbeat.provider.aws.deploy_bucket: "functionbeat-lambdas"

functionbeat.provider.aws.functions:
  - name: cloudwatch
    enabled: true
    type: cloudwatch_logs

# Description of the method to help identify them when you run multiples functions.
description: "lambda function for cloudwatch log ingestion"

# List of cloudwatch log group registered to that function.
triggers:
  - log_group_name: /log-grp-1
  - log_group_name: /log-grp-2




#==================== Elasticsearch template setting ==========================

setup.template.settings:
  index.number_of_shards: 1


#============================= Elastic Cloud==================================

cloud.id: "testing:dXMtd2VzdC0xLmF3cy5mb3VuZC5pbyQxNGNkODY0ZTlkOGU0NmY1OGZlZWRiOGU5MWRhMjJiNSQ0MWU4Zjk4ODVlMDE0OThhYWEwMzkwOTkyNjI4NmZjOQ=="
cloud.auth: "elastic:{ES_PWD}"



#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["localhost:9200"]

  # Optional protocol and basic auth credentials.
  #protocol: "https"
  #username: "elastic"
  #password: "changeme"

#----------------------------- Logstash output --------------------------------
#output.logstash:
  # The Logstash hosts
  #hosts: ["localhost:5044"]

  # Optional SSL. By default is off.
  # List of root certificates for HTTPS server verifications
  #ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]

  # Certificate for SSL client authentication
  #ssl.certificate: "/etc/pki/client/cert.pem"

  # Client Certificate Key
  #ssl.key: "/etc/pki/client/cert.key"

#================================ Processors =====================================

# Configure processors to enhance or manipulate events generated by the beat.
processors:
  - add_host_metadata: ~
  - add_cloud_metadata: ~

@kvch
Copy link
Contributor

kvch commented Jul 1, 2019

Just to clear the confusion, Logstash and other outputs are part of the reference configuration is incorrect. They are going to be removed in a future release because none of them is supported apart from ES at the moment.

@L-F-Escobar
Copy link

@kvch So I cannot use functionbeat to ship cloudwatch logs to logstash?

@kvch
Copy link
Contributor

kvch commented Jul 4, 2019

Yes, exactly. Only ES output is supported ATM.

@Randy-312
Copy link

I need this to be an official part of my supported platform, so that I can use functionbeat.

@CloudViking86
Copy link

CloudViking86 commented Aug 19, 2019

Agree, Logstash support would be nice

Edit:
Weird that a user that haven't participated in the conversation just gave me a thumbs down, anyway grateful for the implementation :)

@kvch kvch self-assigned this Aug 23, 2019
kvch added a commit that referenced this issue Aug 27, 2019
This PR enables Logstash output for Functionbeat. The option `pipelining` is set to 0 to send events synchronously.

From now on configuration overrides also depend on the selected output. So I introduced a new setting `cfgfile.ConditionalOverride` for Beats. This lets developers define a function which is if evaluated to true, the corresponding config overrides are applied.

Closes #11757
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants