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 support for appinsights in the metricbeat azure module #18940

Merged
merged 7 commits into from
Jul 13, 2020

Conversation

narph
Copy link
Contributor

@narph narph commented Jun 3, 2020

What does this PR do?

Adds an azure metricset that retrieves azure app insights metrics.

Why is it important?

Adds support for appinsights in the metricbeat azure module

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

Using the app insights GET metrics API (https://dev.applicationinsights.io/documentation/Using-the-API/Metrics) users can collect specified metrics.
This metricset can be followed by a light metricset that will collect the most relevant/popular app metrics and dashboards.

Configuration:

- module: azure
  metricsets:
    - app_insights
  enabled: true
  period: 2h
  application_id: ""
  api_key: ""
  metrics:
    - id: ["requests/count", "requests/failed"]
      segment: "request/name"
      aggregation: ["sum"]

Example output:

{
    "@timestamp": "2017-10-12T08:05:34.853Z",
        "azure" : {
        "app_insights" : {
            "metrics" : {
                "requests_failed" : {
                    "sum" : 182
                },
                "request_name" : "GET /favicon.ico"
            },
            "start_date" : "2020-07-12T10:52:11.831Z",
            "end_date" : "2020-07-12T12:52:11.831Z",
            "application_id" : "42cb59a9-d5be-400b-a5c4-69b0a0026ac6"
        }
    },
    "cloud": {
        "provider": "azure"
    },
    "event": {
        "dataset": "azure.app_insights",
        "duration": 115000,
        "module": "azure"
    },
    "metricset": {
        "name": "app_insights",
        "period": 10000
    },
    "service": {
        "type": "azure"
    }
}

@narph narph self-assigned this Jun 3, 2020
@narph narph added the Team:Platforms Label for the Integrations - Platforms team label Jun 3, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Jun 3, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #18940 updated]

  • Start Time: 2020-07-13T15:44:18.810+0000

  • Duration: 64 min 54 sec

Test stats 🧪

Test Results
Failed 0
Passed 3454
Skipped 793
Total 4247

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: 2 min 22 sec

    • Start Time: 2020-07-13T16:10:36.696+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: 1 min 27 sec

    • Start Time: 2020-07-13T16:37:29.228+0000

    • log

@narph narph added Team:Integrations Label for the Integrations team and removed Team:Platforms Label for the Integrations - Platforms team labels Jul 12, 2020
@narph narph marked this pull request as ready for review July 12, 2020 20:48
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@narph narph added needs_backport PR is waiting to be backported to other branches. [zube]: In Review and removed [zube]: In Progress labels Jul 12, 2020
@narph narph merged commit 2efea84 into elastic:master Jul 13, 2020
@narph narph deleted the azure-app branch July 13, 2020 16:49
narph added a commit to narph/beats that referenced this pull request Jul 13, 2020
…8940)

* app

* changelog

* update

* Revert "update"

This reverts commit 06db76b.

* avoid winio

* fix text

(cherry picked from commit 2efea84)
narph added a commit that referenced this pull request Jul 13, 2020
…19854)

* app

* changelog

* update

* Revert "update"

This reverts commit 06db76b.

* avoid winio

* fix text

(cherry picked from commit 2efea84)
v1v added a commit to v1v/beats that referenced this pull request Jul 14, 2020
* upstream/master: (25 commits)
  [Elastic Agent] Send checkin payload to Fleet (elastic#19857)
  [Ingest Manager] Fixed tests across agent elastic#19877
  [Ingest Manager] Fix serialization test  elastic#19876
  Fix service start type mapping in windows/service metricset (elastic#19551)
  ci: Change comment trigger detection method (elastic#19827)
  Add 21 autogenerated filesets from rsa2elk devices (elastic#19713)
  [Ingest Manager] Agent config cleanup (elastic#19848)
  libbeat/publisher/pipeline: fix data races (elastic#19821)
  Update monitoring-internal-collection.asciidoc (elastic#19422) (elastic#19697)
  [Elastic Agent] Trust exchange endpoint must bind to 127.0.0.1 (elastic#19861)
  Specify an ECS version in Auditbeat/Packetbeat/Winlogbeat (elastic#19159)
  Add azure billing metricset (elastic#19207)
  Add support for appinsights in the metricbeat azure module (elastic#18940)
  Add MySQL query metricset with lightweight module and SQL helper (elastic#18955)
  [Ingest Manager] Refuse invalid stream values in configuration (elastic#19587)
  Do not use vendor during integration tests (elastic#19839)
  LIBBEAT: Enhancement Convert dissected values from String to other basic data types and IP (elastic#18683)
  [Elastic Agent] Remove support for "logs" and only support logfile (elastic#19761)
  [CI] support windows-2012 (elastic#19773)
  Do not update go.mod during packaging and testing (elastic#19823)
  ...
@narph narph added test-plan Add this PR to be manual test plan v7.9.0 labels Jul 17, 2020
@andresrc andresrc added the test-plan-added This PR has been added to the test plan label Jul 21, 2020
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
…8940)

* app

* changelog

* update

* Revert "update"

This reverts commit 06db76b.

* avoid winio

* fix text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs_backport PR is waiting to be backported to other branches. Team:Integrations Label for the Integrations team test-plan Add this PR to be manual test plan test-plan-added This PR has been added to the test plan v7.9.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for appinsights in Metricbeat and Filebeat
5 participants