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

network_traffic: fix passing of period and timeout parameters to agent #5804

Merged
merged 1 commit into from
Apr 6, 2023

Conversation

efd6
Copy link
Contributor

@efd6 efd6 commented Apr 6, 2023

What does this PR do?

This fixes the passing of the flows period and timeout parameters which previously were passed to agent in the wrong location always resulting in the agent using the default values specified by packetbeat, 10s and 30s.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Author's Checklist

  • [ ]

How to test this PR locally

To confirm this is working correctly, before running the tests with elastic-package, set the agent logging level to "debug". Run the system tests and when they have completed, step into the agent's terminal and collect diagnostics with ./elastic-agent diagnostics. Examine the log file for the log line describing packetbeat's understanding of the parameters, e.g. (note the period=-1s):

$ jq 'select(.message | startswith("new flows worker")).message' < elastic-agent-diagnostics-2023-04-06T04-52-21Z-00/logs/elastic-agent-20230406.ndjson
"new flows worker. timeout=5s, period=-1s, tick=5s, ticksTO=1, ticksP=-1"
"new flows worker. timeout=30s, period=1s, tick=1s, ticksTO=30, ticksP=1"
"new flows worker. timeout=30s, period=1s, tick=1s, ticksTO=30, ticksP=1"
"new flows worker. timeout=30s, period=-1s, tick=30s, ticksTO=1, ticksP=-1"

Related issues

Screenshots

@efd6 efd6 force-pushed the 5771-network_traffic-config branch from d72b63c to 5b0573f Compare April 6, 2023 04:39
@elasticmachine
Copy link

elasticmachine commented Apr 6, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-04-06T04:39:38.180+0000

  • Duration: 73 min 58 sec

Test stats 🧪

Test Results
Failed 0
Passed 178
Skipped 0
Total 178

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

@elasticmachine
Copy link

🌐 Coverage report

Name Metrics % (covered/total) Diff
Packages 100.0% (0/0) 💚
Files 100.0% (0/0) 💚 50.0
Classes 100.0% (0/0) 💚 50.0
Methods 75.0% (48/64) 👍 5.769
Lines 100.0% (0/0) 💚 29.63
Conditionals 100.0% (0/0) 💚

@efd6 efd6 marked this pull request as ready for review April 6, 2023 06:08
@efd6 efd6 requested a review from a team as a code owner April 6, 2023 06:08
@elasticmachine
Copy link

Pinging @elastic/security-external-integrations (Team:Security-External Integrations)

@efd6 efd6 merged commit bc86462 into elastic:main Apr 6, 2023
@elasticmachine
Copy link

Package network_traffic - 1.11.1 containing this change is available at https://epr.elastic.co/search?package=network_traffic

@Danouchka
Copy link

[Network Packet Capture] Network Flows dashboard is broken. Seems it comes with no dataview selected.

Capture d’écran 2023-04-09 à 01 09 17 (2)

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

Successfully merging this pull request may close these issues.

[Network Packet Capture] Flow Metrics not reported properly
4 participants