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

Handle multiple upstreams in ingress-controller #21215

Merged
merged 11 commits into from
Sep 29, 2020

Conversation

ChrsMark
Copy link
Member

@ChrsMark ChrsMark commented Sep 22, 2020

What does this PR do?

This PR tunes ingress-controller's pipeline so as to handle multiple upstreams. We put the multiple lengths, times and status_codes in upstream.response.length_list, upstream.response.time_list and upstream.response.status_code_list fields while we sum time under single field upstream.response.time and we only store last response length in upstream.response.length (with this we also preserve the existing dashboards

"field": "nginx.ingress_controller.upstream.response.length",
).

In addition, we preserve the multiple upstreams at upstream_ip_list and we only store the last upstream.ip and upstream.port as well as the last status_code.

Sample log:
192.168.64.14 - - [07/Feb/2020:12:02:42 +0000] "GET /v2/some HTTP/1.1" 200 61 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:72.0) Gecko/20100101 Firefox/72.0" 348 0.001 [default-web2-8080] [] 172.17.0.6:8080, 172.17.0.7:8080 61, 100 0.100, 0.004 200, 203 835136ae24486dbb4156dcbe21f5d402
Sample event:

{
        "nginx.ingress_controller.http.request.id": "835136ae24486dbb4156dcbe21f5d402",
        "nginx.ingress_controller.http.request.length": 348,
        "nginx.ingress_controller.http.request.time": 0.001,
        "nginx.ingress_controller.remote_ip_list": [
            "192.168.64.14"
        ],
        "nginx.ingress_controller.upstream.alternative_name": "",
        "nginx.ingress_controller.upstream.ip": "172.17.0.7",
        "nginx.ingress_controller.upstream.name": "default-web2-8080",
        "nginx.ingress_controller.upstream.port": 8080,
        "nginx.ingress_controller.upstream.response.length": 100,
        "nginx.ingress_controller.upstream.response.length_list": [
            "61",
            "100"
        ],
        "nginx.ingress_controller.upstream.response.status_code": 203,
        "nginx.ingress_controller.upstream.response.status_code_list": [
            "200",
            "203"
        ],
        "nginx.ingress_controller.upstream.response.time": 0.104,
        "nginx.ingress_controller.upstream.response.time_list": [
            "0.100",
            "0.004"
        ],
        "nginx.ingress_controller.upstream_address_list": [
            "172.17.0.6:8080",
            "172.17.0.7:8080"
        ],
}

Why is it important?

So as to handle cases where nginx-ingress retries multiple upstreams.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
@ChrsMark ChrsMark added the Team:Platforms Label for the Integrations - Platforms team label Sep 22, 2020
@ChrsMark ChrsMark self-assigned this Sep 22, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Sep 22, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Sep 22, 2020

💔 Build Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #21215 updated]

  • Start Time: 2020-09-29T07:57:56.291+0000

  • Duration: 75 min 3 sec

Test stats 🧪

Test Results
Failed 0
Passed 20304
Skipped 1858
Total 22162

Steps errors

Expand to view the steps failures

  • Name: Archive the artifacts

    • Description: [2020-09-29T09:12:37.771Z] Archiving artifacts
      [2020-09-29T09:12:37.789Z] ‘build-reasons/*.md’

    • Duration: 0 min 0 sec

    • Start Time: 2020-09-29T09:12:37.764+0000

    • log

  • Name: Process JUnit reports with runbld

    • Description:

    • Duration: 0 min 18 sec

    • Start Time: 2020-09-29T09:12:39.677+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-09-29T09:12:34.169Z]   Version:          1.3.7
[2020-09-29T09:12:34.169Z]   GitCommit:        8fba4e9a7d01810a393d5d25a3621dc101981175
[2020-09-29T09:12:34.169Z]  runc:
[2020-09-29T09:12:34.169Z]   Version:          1.0.0-rc10
[2020-09-29T09:12:34.169Z]   GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
[2020-09-29T09:12:34.169Z]  docker-init:
[2020-09-29T09:12:34.169Z]   Version:          0.18.0
[2020-09-29T09:12:34.169Z]   GitCommit:        fec3683
[2020-09-29T09:12:37.741Z] Post stage
[2020-09-29T09:12:37.756Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats
[2020-09-29T09:12:37.771Z] Archiving artifacts
[2020-09-29T09:12:37.789Z] ‘build-reasons/*.md’ doesn’t match anything: even ‘build-reasons’ doesn’t exist
[2020-09-29T09:12:37.812Z] Error when executing always post condition:
[2020-09-29T09:12:37.818Z] hudson.AbortException: No artifacts found that match the file pattern "build-reasons/*.md". Configuration error?
[2020-09-29T09:12:37.818Z] 	at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:280)
[2020-09-29T09:12:37.818Z] 	at jenkins.tasks.SimpleBuildStep.perform(SimpleBuildStep.java:91)
[2020-09-29T09:12:37.818Z] 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
[2020-09-29T09:12:37.818Z] 	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
[2020-09-29T09:12:37.818Z] 	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
[2020-09-29T09:12:37.818Z] 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[2020-09-29T09:12:37.818Z] 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2020-09-29T09:12:37.818Z] 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2020-09-29T09:12:37.818Z] 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2020-09-29T09:12:37.818Z] 	at java.lang.Thread.run(Thread.java:748)
[2020-09-29T09:12:37.818Z] 
[2020-09-29T09:12:37.959Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats
[2020-09-29T09:12:37.970Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/uncategorized-1601367605838
[2020-09-29T09:12:38.004Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/libbeat-stress-tests-1601367838548
[2020-09-29T09:12:38.041Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/winlogbeat-crosscompile-1601367907601
[2020-09-29T09:12:38.073Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-elastic-agent-build-1601367924928
[2020-09-29T09:12:38.107Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/generator-macos-metricbeat-macosx-1601367933925
[2020-09-29T09:12:38.138Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/generator-macos-beat-macosx-1601367946373
[2020-09-29T09:12:38.175Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/auditbeat-crosscompile-1601367949477
[2020-09-29T09:12:38.208Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/journalbeat-unitTest-1601367955928
[2020-09-29T09:12:38.244Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-dockerlogbeat-build-1601367969605
[2020-09-29T09:12:38.283Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-functionbeat-build-1601368036416
[2020-09-29T09:12:38.315Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/packetbeat-macos-macosx-1601368050596
[2020-09-29T09:12:38.358Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-elastic-agent-macos-macosx-1601368096109
[2020-09-29T09:12:38.395Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/filebeat-macos-macosx-1601368096189
[2020-09-29T09:12:38.432Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/libbeat-crosscompile-1601368108262
[2020-09-29T09:12:38.467Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-auditbeat-macos-macosx-1601368127477
[2020-09-29T09:12:38.499Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/packetbeat-build-1601368140465
[2020-09-29T09:12:38.533Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/metricbeat-unitTest-1601368214992
[2020-09-29T09:12:38.568Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/metricbeat-macos-macosx-1601368238415
[2020-09-29T09:12:38.613Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/heartbeat-macos-macosx-1601368240119
[2020-09-29T09:12:38.645Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-elastic-agent-windows-windows-2019-1601368255963
[2020-09-29T09:12:38.679Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/auditbeat-windows-windows-2019-1601368290751
[2020-09-29T09:12:38.711Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/heartbeat-build-1601368297820
[2020-09-29T09:12:38.748Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-filebeat-macos-macosx-1601368301571
[2020-09-29T09:12:38.780Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-auditbeat-windows-windows-2019-1601368303973
[2020-09-29T09:12:38.817Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-auditbeat-build-1601368324311
[2020-09-29T09:12:38.857Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-functionbeat-macos-macosx-1601368327322
[2020-09-29T09:12:38.890Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/heartbeat-windows-windows-2019-1601368329481
[2020-09-29T09:12:38.928Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/auditbeat-build-1601368393958
[2020-09-29T09:12:38.963Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-winlogbeat-build-windows-2019-1601368406476
[2020-09-29T09:12:39.004Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-metricbeat-macos-macosx-1601368418387
[2020-09-29T09:12:39.035Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/metricbeat-crosscompile-1601368429274
[2020-09-29T09:12:39.064Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-libbeat-build-1601368458385
[2020-09-29T09:12:39.100Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/generator-metricbeat-test-1601368459170
[2020-09-29T09:12:39.130Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/winlogbeat-windows-windows-2019-1601368465816
[2020-09-29T09:12:39.161Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-filebeat-windows-windows-2019-1601368478405
[2020-09-29T09:12:39.197Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/filebeat-windows-windows-2019-1601368482603
[2020-09-29T09:12:39.230Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-functionbeat-windows-windows-2019-1601368488577
[2020-09-29T09:12:39.265Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/generator-beat-test-1601368489600
[2020-09-29T09:12:39.294Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/packetbeat-windows-windows-2019-1601368506187
[2020-09-29T09:12:39.327Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/auditbeat-macos-macosx-1601368660016
[2020-09-29T09:12:39.358Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-metricbeat-windows-windows-2019-1601368690468
[2020-09-29T09:12:39.388Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/metricbeat-windows-windows-2019-1601368738673
[2020-09-29T09:12:39.420Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/filebeat-build-1601369351234
[2020-09-29T09:12:39.456Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/libbeat-build-1601369451962
[2020-09-29T09:12:39.497Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/metricbeat-goIntegTest-1601369759546
[2020-09-29T09:12:39.544Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-filebeat-build-1601369876043
[2020-09-29T09:12:39.582Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/metricbeat-pythonIntegTest-1601370037116
[2020-09-29T09:12:39.623Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats/x-pack-metricbeat-build-1601370465509
[2020-09-29T09:12:39.961Z] + cat
[2020-09-29T09:12:39.962Z] + /usr/local/bin/runbld ./runbld-test-reports --job-name elastic+beats+pull-request
[2020-09-29T09:12:39.962Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-09-29T09:12:48.081Z] runbld>>> runbld started
[2020-09-29T09:12:48.081Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-09-29T09:12:49.465Z] runbld>>> The following profiles matched the job 'elastic+beats+pull-request' in order of occurrence in the config (last value wins).
[2020-09-29T09:12:49.465Z] runbld>>> Matches in the system config:
[2020-09-29T09:12:49.466Z] runbld>>> - Matched ^elastic\+beats
[2020-09-29T09:12:49.466Z] runbld>>> - Matched ^elastic\+beats\+pull-request
[2020-09-29T09:12:50.402Z] runbld>>> Debug logging enabled.
[2020-09-29T09:12:50.402Z] runbld>>> Storing result
[2020-09-29T09:12:50.661Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-09-29T09:12:50.661Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1597739501209/t/20200929091250-D45B1B05
[2020-09-29T09:12:50.661Z] runbld>>> Adding system facts.
[2020-09-29T09:12:52.038Z] runbld>>> Sending debug log to infra-root+runbld-debug@e***.co
[2020-09-29T09:12:52.606Z] runbld>>> Error: The source clone was not found in /var/lib/jenkins/workspace/Beats_beats_PR-21215/src/github.com/elastic/beats.  The most common cause is that Jenkins and runbld are configured with different working directories (referred to as 'basedir' in JJB and 'cwd' in runbld config).
[2020-09-29T09:12:57.886Z] ERROR: runbld post build action failed.
[2020-09-29T09:12:57.886Z] ERROR: script returned exit code 1
[2020-09-29T09:12:58.330Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-21215
[2020-09-29T09:12:58.383Z] [INFO] getVaultSecret: Getting secrets
[2020-09-29T09:12:58.483Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-09-29T09:12:59.124Z] + chmod 755 generate-build-data.sh
[2020-09-29T09:12:59.125Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21215/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21215/runs/9 FAILURE 4502561
[2020-09-29T09:12:59.125Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21215/runs/9/steps/?limit=10000 -o steps-info.json
[2020-09-29T09:13:11.229Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21215/runs/9/tests/?status=FAILED -o tests-errors.json
[2020-09-29T09:13:12.141Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-21215/runs/9/log/ -o pipeline-log.txt

Signed-off-by: chrismark <chrismarkou92@gmail.com>
Signed-off-by: chrismark <chrismarkou92@gmail.com>
for (def item : ctx.nginx.ingress_controller.upstream.response.length_list) {
length = length + Integer.parseInt(item);
}
ctx.nginx.ingress_controller.upstream.response.length = length;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe change the name to indicate it's a total value?

Suggested change
ctx.nginx.ingress_controller.upstream.response.length = length;
ctx.nginx.ingress_controller.upstream.response.length_total = length;

Copy link
Member

Choose a reason for hiding this comment

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

Take into account that this is a breaking change as it changes an existing field. I would prefer to keep the original field.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

Signed-off-by: chrismark <chrismarkou92@gmail.com>
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Arrays are problematic, for example here we might want to use arrays of objects, so we have single objects for the address, status code and response type for each endpoint. But I think you have made a good compromise.

@@ -11,6 +11,26 @@
Real source IP is restored to `source.ip`.

# ingress-controller specific fields
- name: upstream_ip_list
type: array
Copy link
Member

Choose a reason for hiding this comment

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

I think that type: array only doesn't generate any mapping. This should be an array of keywords, or just keyword. Elasticsearch doesn't have a data type for arrays, but any field can have multiple values, see docs about arrays).

We could use just keyword:

Suggested change
type: array
type: keyword

Or if we still want to indicate that this is intended to store multiple values:

Suggested change
type: array
type: array
object_type: keyword

Same for the other lists.

(%{NUMBER:nginx.ingress_controller.upstream.response.status_code:long}|-) %{GREEDYDATA:nginx.ingress_controller.http.request.id}
\[%{DATA:nginx.ingress_controller.upstream.alternative_name}\] (%{UPSTREAM_ADDRESS_LIST:nginx.ingress_controller.upstream_ip_list}|-)
(%{UPSTREAM_RESPONSE_LENGTH_LIST:nginx.ingress_controller.upstream.response.length_list}|-) (%{UPSTREAM_RESPONSE_TIME_LIST:nginx.ingress_controller.upstream.response.time_list}|-)
(%{UPSTREAM_RESPONSE_STATUS_CODE_LIST:nginx.ingress_controller.upstream.response.status_code_list}|-) %{GREEDYDATA:nginx.ingress_controller.http.request.id}
pattern_definitions:
NGINX_HOST: (?:%{IP:destination.ip}|%{NGINX_NOTSEPARATOR:destination.domain})(:%{NUMBER:destination.port})?
NGINX_NOTSEPARATOR: "[^\t ,:]+"
NGINX_ADDRESS_LIST: (?:%{IP}|%{WORD})("?,?\s*(?:%{IP}|%{WORD}))*
UPSTREAM_ADDRESS: '%{IP:nginx.ingress_controller.upstream.ip}(:%{NUMBER:nginx.ingress_controller.upstream.port})?'
Copy link
Member

Choose a reason for hiding this comment

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

Not used now.

"nginx.ingress_controller.upstream.response.time_list": [
"0.000"
],
"nginx.ingress_controller.upstream_ip_list": [
Copy link
Member

Choose a reason for hiding this comment

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

We are not storing ips in this field, maybe we can call it upstream_endpoint_list, or upstream_address_list.

}
int length = 0;
for (def item : ctx.nginx.ingress_controller.upstream.response.length_list) {
length = length + Integer.parseInt(item);
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmmm, does it make sense to sum up the response lengths? The client would only see the most recent response.

Copy link
Member Author

Choose a reason for hiding this comment

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

That makes sense, I will go with it! Thanks!

@jsoriano jsoriano dismissed their stale review September 23, 2020 09:27

Requested changes addressed.

@ChrsMark ChrsMark merged commit b65b123 into elastic:master Sep 29, 2020
ChrsMark added a commit to ChrsMark/beats that referenced this pull request Sep 29, 2020
v1v added a commit to v1v/beats that referenced this pull request Sep 29, 2020
* upstream/master:
  feat: prepare release pipelines (elastic#21238)
  Add IP validation to Security module (elastic#21325)
  Fixes for new 7.10 rsa2elk datasets (elastic#21240)
  o365input: Restart after fatal error (elastic#21258)
  Fix panic in cgroups monitoring (elastic#21355)
  Handle multiple upstreams in ingress-controller (elastic#21215)
  [CI] Fix runbld when workspace does not exist (elastic#21350)
  [Filebeat] Fix checkpoint (elastic#21344)
  [CI] Archive build reasons (elastic#21347)
  Add dashboard for pubsub metricset in googlecloud module (elastic#21326)
  [Elastic Agent] Allow embedding of certificate (elastic#21179)
  Adds a default for failure_cache.min_ttl (elastic#21085)
  [libbeat] Disk queue implementation (elastic#21176)
ChrsMark added a commit that referenced this pull request Sep 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review Team:Platforms Label for the Integrations - Platforms team v7.10.0 [zube]: In Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nginx-ingress grok expression does not handle multiple upstreams
5 participants