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

[DOCS] Add output.console to Functionbeat doc and Functionbeat reference file #18965

Merged
merged 5 commits into from
Jun 11, 2020

Conversation

EamonnTP
Copy link

@EamonnTP EamonnTP commented Jun 4, 2020

What does this PR do?

This PR adds the output.console content to the Functionbeat doc and to the functionbeat.reference.yml file.

Why is it important?

output.console was added in 7.6.0 to help users debug, but it was not documented. While this new output mode is intended for troubleshooting/debugging only, it can still benefit developers/admins. The functionbeat.reference.yml file is also updated so developers know that the console output configuration exists.

Related issues

Closes #16855

HTML output

Coming soon. Doc build is currently failing and requires further investigation.

@EamonnTP EamonnTP requested review from bmorelli25 and ppf2 June 4, 2020 09:28
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Jun 4, 2020
@EamonnTP EamonnTP self-assigned this Jun 4, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 4, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #18965 updated]

  • Start Time: 2020-06-11T20:24:43.126+0000

  • Duration: 78 min 44 sec

Test stats 🧪

Test Results
Failed 0
Passed 9437
Skipped 1574
Total 11011

Steps errors

Expand to view the steps failures

  • Name: Report to Codecov

    • Description: curl -sSLo codecov https://codecov.io/bash for i in auditbeat filebeat heartbeat libbeat metricbeat packetbeat winlogbeat journalbeat do FILE="${i}/build/coverage/full.cov" if [ -f "${FILE}" ]; then bash codecov -f "${FILE}" fi done

    • Duration: 1 min 17 sec

    • Start Time: 2020-06-11T21:18:31.477+0000

    • log

  • Name: Report to Codecov

    • Description: curl -sSLo codecov https://codecov.io/bash for i in auditbeat filebeat heartbeat libbeat metricbeat packetbeat winlogbeat journalbeat do FILE="${i}/build/coverage/full.cov" if [ -f "${FILE}" ]; then bash codecov -f "${FILE}" fi done

    • Duration: 2 min 22 sec

    • Start Time: 2020-06-11T21:05:25.433+0000

    • log

@andresrc andresrc added the Team:Services (Deprecated) Label for the former Integrations-Services team label Jun 5, 2020
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Jun 5, 2020
@EamonnTP EamonnTP marked this pull request as ready for review June 9, 2020 13:32
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-services (Team:Services)

@bmorelli25
Copy link
Member

@EamonnTP Merge this branch with master and push to retry the unsuccessful checks

Copy link
Member

@bmorelli25 bmorelli25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the failing tests, this LGTM. I see both the console output and codec documentation in the HTML preview.

https://beats_18965.docs-preview.app.elstc.co/guide/en/beats/functionbeat/master/configuration-output-codec.html

@bmorelli25
Copy link
Member

bmorelli25 commented Jun 9, 2020

Here's the error from beats-ci/pr-merge

[2020-06-09T20:25:50.292Z] diff --git a/x-pack/functionbeat/functionbeat.reference.yml b/x-pack/functionbeat/functionbeat.reference.yml
[2020-06-09T20:25:50.292Z] index 0a3d6c5..61cf8a2 100644
[2020-06-09T20:25:50.292Z] --- a/x-pack/functionbeat/functionbeat.reference.yml
[2020-06-09T20:25:50.292Z] +++ b/x-pack/functionbeat/functionbeat.reference.yml
[2020-06-09T20:25:50.292Z] @@ -927,19 +927,9 @@ output.elasticsearch:
[2020-06-09T20:25:50.292Z]    # timing out. The default is 30s.
[2020-06-09T20:25:50.292Z]    #timeout: 30s
[2020-06-09T20:25:50.292Z]  
[2020-06-09T20:25:50.292Z] -# =============================== Console Output ===============================
[2020-06-09T20:25:50.292Z]  
[2020-06-09T20:25:50.292Z] -#output.console:
[2020-06-09T20:25:50.292Z] -  # Boolean flag to enable or disable the output module.
[2020-06-09T20:25:50.292Z] -  #enabled: true
[2020-06-09T20:25:50.292Z]  
[2020-06-09T20:25:50.292Z] -  # Configure JSON encoding
[2020-06-09T20:25:50.292Z] -  #codec.json:
[2020-06-09T20:25:50.292Z] -    # Pretty-print JSON event
[2020-06-09T20:25:50.292Z] -    #pretty: false
[2020-06-09T20:25:50.292Z]  
[2020-06-09T20:25:50.292Z] -    # Configure escaping HTML symbols in strings.
[2020-06-09T20:25:50.292Z] -    #escape_html: false
[2020-06-09T20:25:50.292Z]  
[2020-06-09T20:25:50.292Z]  # =================================== Paths ====================================
[2020-06-09T20:25:50.292Z]  
[2020-06-09T20:25:50.292Z] x-pack/functionbeat/functionbeat.reference.yml: needs update

@dedemorton do you know what's wrong?

@dedemorton
Copy link
Contributor

dedemorton commented Jun 9, 2020

Aha. So I should have caught this during the review, but it's been awhile since I've updated the config reference, and I'd forgotten that they're now using templating to create the reference files.

So instead of manually updating the functionbeat.reference.yml, you need to make a code change. Remove this line:

https://github.com/elastic/beats/blob/master/x-pack/functionbeat/scripts/mage/config.go#L16

Then run make update from the beats directory. Note that you need to have your dev
environment set up correctly to run this command.

@dedemorton
Copy link
Contributor

(or I guess you could set it to false but I don't see it set anywhere else, so removing probably makes more sense).

@ppf2
Copy link
Member

ppf2 commented Jun 10, 2020

One thing we might want to add (open for discussion) is a warning about output.console to be used for debugging only for it can produce a large amounts of logging (this can translate to $$ if the output of the logging ends up in Cloudwatch logs). Not sure if we need to explicitly call this out though or if it's implied :)

@urso
Copy link

urso commented Jun 10, 2020

One thing we might want to add (open for discussion) is a warning about output.console to be used for debugging only for it can produce a large amounts of logging (this can translate to $$ if the output of the logging ends up in Cloudwatch logs). Not sure if we need to explicitly call this out though or if it's implied :)

I'd be in favor of adding a warning.

@@ -7,6 +7,8 @@

The Console output writes events in JSON format to stdout.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One can configure a custom formatter to print messages with a custom layout. JSON is just the default formatter (see codec setting).

@EamonnTP EamonnTP merged commit 5cd55f9 into elastic:master Jun 11, 2020
@EamonnTP EamonnTP deleted the add-output-console-functionbeat branch June 11, 2020 21:43
EamonnTP pushed a commit to EamonnTP/beats that referenced this pull request Jun 11, 2020
…nce file (elastic#18965)

* Add outputconsole to Functionbeat doc

* Remove no_codec attirbute

* Updates following review
# Conflicts:
#	libbeat/outputs/console/docs/console.asciidoc
EamonnTP pushed a commit to EamonnTP/beats that referenced this pull request Jun 11, 2020
…nce file (elastic#18965)

* Add outputconsole to Functionbeat doc

* Remove no_codec attirbute

* Updates following review
# Conflicts:
#	libbeat/outputs/console/docs/console.asciidoc
#	x-pack/functionbeat/functionbeat.reference.yml
#	x-pack/functionbeat/scripts/mage/config.go
EamonnTP pushed a commit to EamonnTP/beats that referenced this pull request Jun 11, 2020
…nce file (elastic#18965)

* Add outputconsole to Functionbeat doc

* Remove no_codec attirbute

* Updates following review
# Conflicts:
#	libbeat/outputs/console/docs/console.asciidoc
EamonnTP pushed a commit to EamonnTP/beats that referenced this pull request Jun 11, 2020
…nce file (elastic#18965)

* Add outputconsole to Functionbeat doc

* Remove no_codec attirbute

* Updates following review
# Conflicts:
#	libbeat/outputs/console/docs/console.asciidoc
#	x-pack/functionbeat/functionbeat.reference.yml
#	x-pack/functionbeat/scripts/mage/config.go
v1v added a commit to v1v/beats that referenced this pull request Jun 12, 2020
…ngs-archive

* upstream/master: (119 commits)
  Update filebeat input docs (elastic#19110)
  Add ECS fields from log pipeline of PostgreSQL (elastic#19127)
  Init package libbeat/statestore (elastic#19117)
  [Ingest Manager] Retryable downloads of beats (elastic#19102)
  [DOCS] Add output.console to Functionbeat doc and Functionbeat reference file (elastic#18965)
  Add compatibility info (elastic#18929)
  Set ecszap version to v0.2.0 (elastic#19106)
  [filebeat][httpjson] Fix unit test function call (elastic#19124)
  [Filebeat][httpjson] Adds oauth2 support for httpjson input (elastic#18892)
  Allow host.* fields to be disabled in Suricata module (elastic#19107)
  Make selector string casing configurable (elastic#18854)
  Switch the GRPC communication where Agent is running the server and the beats are connecting back to Agent (elastic#18973)
  Disable host.* fields by default for netflow module (elastic#19087)
  Automatically fill zube teams on backports if available (elastic#18924)
  Fix crash on vsphere module (elastic#19078)
  [Ingest Manager] Download snapshot artifacts from snapshots repo (elastic#18685)
  [Ingest Manager] Basic Elastic Agent documentation (elastic#19030)
  Make user.id a string in system/users, in line with ECS (elastic#19019)
  [docs] Add 7.8 release highlights placeholder file (elastic#18493)
  Fix translate_sid's empty target field handling (elastic#18991)
  ...
EamonnTP pushed a commit that referenced this pull request Jun 12, 2020
…nce file (#18965) (#19145)

* Add outputconsole to Functionbeat doc

* Remove no_codec attirbute

* Updates following review
# Conflicts:
#	libbeat/outputs/console/docs/console.asciidoc
EamonnTP pushed a commit that referenced this pull request Jun 12, 2020
…nce file (#18965) (#19143)

* Add outputconsole to Functionbeat doc

* Remove no_codec attirbute

* Updates following review
# Conflicts:
#	libbeat/outputs/console/docs/console.asciidoc
EamonnTP pushed a commit that referenced this pull request Jun 16, 2020
…reference file (#18965) (#19147)

* [DOCS] Add output.console to Functionbeat doc and Functionbeat reference file (#18965)

* Add outputconsole to Functionbeat doc

* Remove no_codec attirbute

* Updates following review
# Conflicts:
#	libbeat/outputs/console/docs/console.asciidoc
#	x-pack/functionbeat/functionbeat.reference.yml
#	x-pack/functionbeat/scripts/mage/config.go

* Update x-pack/functionbeat/scripts/mage/config.go

Co-authored-by: Brandon Morelli <bmorelli25@gmail.com>

* Add output console to ref file

Co-authored-by: Brandon Morelli <bmorelli25@gmail.com>
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
…nce file (elastic#18965)

* Add outputconsole to Functionbeat doc

* Remove no_codec attirbute

* Updates following review
leweafan pushed a commit to leweafan/beats that referenced this pull request Apr 28, 2023
…reference file (elastic#18965) (elastic#19147)

* [DOCS] Add output.console to Functionbeat doc and Functionbeat reference file (elastic#18965)

* Add outputconsole to Functionbeat doc

* Remove no_codec attirbute

* Updates following review
# Conflicts:
#	libbeat/outputs/console/docs/console.asciidoc
#	x-pack/functionbeat/functionbeat.reference.yml
#	x-pack/functionbeat/scripts/mage/config.go

* Update x-pack/functionbeat/scripts/mage/config.go

Co-authored-by: Brandon Morelli <bmorelli25@gmail.com>

* Add output console to ref file

Co-authored-by: Brandon Morelli <bmorelli25@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Team:Services (Deprecated) Label for the former Integrations-Services team v7.7.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document (docs and reference yml) new output.console for functionbeat
7 participants