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 the azure billing package #2160

Merged
merged 5 commits into from
Nov 17, 2021

Conversation

narph
Copy link
Contributor

@narph narph commented Nov 15, 2021

What does this PR do?

Add support for the azure billing package

Issue #1047

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.
  • If I'm introducing a new feature, I have modified the Kibana version constraint in my package's manifest.yml file to point to the latest Elastic stack release (e.g. ^7.15.0).

Screenshots

image
image

Ex records:

{
        "_index" : ".ds-metrics-azure.billing-default-2021.11.16-000001",
        "_type" : "_doc",
        "_id" : "K6cVKX0BGqHSTKPCHwjc",
        "_score" : 1.0,
        "_source" : {
          "agent" : {
            "hostname" : "docker-fleet-agent",
            "name" : "docker-fleet-agent",
            "id" : "3a39222a-2dc8-41c5-b719-b5c4ea0257a0",
            "ephemeral_id" : "68ca2a06-f478-468d-b657-52c3d1066a83",
            "type" : "metricbeat",
            "version" : "7.15.3"
          },
          "elastic_agent" : {
            "id" : "3a39222a-2dc8-41c5-b719-b5c4ea0257a0",
            "version" : "7.15.3",
            "snapshot" : true
          },
          "cloud" : {
            "instance" : {
              "name" : "alextest223",
              "id" : "/subscriptions/..../resourceGroups/alex-test-resources/providers/Microsoft.Storage/storageAccounts/alextest223"
            },
            "provider" : "azure",
            "region" : "CentralUS"
          },
          "@timestamp" : "2021-11-16T14:09:48.857Z",
          "ecs" : {
            "version" : "1.11.0"
          },
          "service" : {
            "type" : "azure"
          },
          "data_stream" : {
            "namespace" : "default",
            "type" : "metrics",
            "dataset" : "azure.billing"
          },
          "host" : {
            "hostname" : "docker-fleet-agent",
            "os" : {
              "kernel" : "4.19.128-microsoft-standard",
              "codename" : "Core",
              "name" : "CentOS Linux",
              "type" : "linux",
              "family" : "redhat",
              "version" : "7 (Core)",
              "platform" : "centos"
            },
            "containerized" : true,
            "ip" : [
              "172.31.0.7"
            ],
            "name" : "docker-fleet-agent",
            "id" : "0e45dc0f765dee79aa8992abcd05b189",
            "mac" : [
              "02:42:ac:1f:00:07"
            ],
            "architecture" : "x86_64"
          },
          "metricset" : {
            "period" : 86400000,
            "name" : "billing"
          },
          "event" : {
            "duration" : 9829417200,
            "agent_id_status" : "verified",
            "ingested" : "2021-11-16T14:09:49Z",
            "module" : "azure",
            "dataset" : "azure.billing"
          },
          "azure" : {
            "subscription_id" : "...",
            "resource" : {
              "name" : "alextest223",
              "type" : "Microsoft.Storage",
              "group" : "alex-test-resources"
            },
            "billing" : {
              "pretax_cost" : "0.000002327970961",
              "product" : "Bandwidth Inter-Region - Data Transfer Out - North America",
              "usage_start" : "2021-11-15T00:00:00.000Z",
              "usage_end" : "2021-11-15T23:59:59.000Z",
              "account_name" : "R&D",
              "department_name" : "....",
              "currency" : "USD",
              "billing_period_id" : "/subscriptions/.../providers/Microsoft.Billing/billingPeriods/20211101"
            }
          }
        }
      }
 {
        "_index" : ".ds-metrics-azure.billing-default-2021.11.16-000001",
        "_type" : "_doc",
        "_id" : "fKcVKX0BGqHSTKPCIAhD",
        "_score" : null,
        "_source" : {
          "agent" : {
            "hostname" : "docker-fleet-agent",
            "name" : "docker-fleet-agent",
            "id" : "3a39222a-2dc8-41c5-b719-b5c4ea0257a0",
            "ephemeral_id" : "68ca2a06-f478-468d-b657-52c3d1066a83",
            "type" : "metricbeat",
            "version" : "7.15.3"
          },
          "elastic_agent" : {
            "id" : "3a39222a-2dc8-41c5-b719-b5c4ea0257a0",
            "version" : "7.15.3",
            "snapshot" : true
          },
          "cloud.provider" : "azure",
          "@timestamp" : "2021-11-16T14:09:48.857Z",
          "ecs" : {
            "version" : "1.11.0"
          },
          "service" : {
            "type" : "azure"
          },
          "data_stream" : {
            "namespace" : "default",
            "type" : "metrics",
            "dataset" : "azure.billing"
          },
          "host" : {
            "hostname" : "docker-fleet-agent",
            "os" : {
              "kernel" : "4.19.128-microsoft-standard",
              "codename" : "Core",
              "name" : "CentOS Linux",
              "family" : "redhat",
              "type" : "linux",
              "version" : "7 (Core)",
              "platform" : "centos"
            },
            "containerized" : true,
            "ip" : [
              "172.31.0.7"
            ],
            "name" : "docker-fleet-agent",
            "id" : "0e45dc0f765dee79aa8992abcd05b189",
            "mac" : [
              "02:42:ac:1f:00:07"
            ],
            "architecture" : "x86_64"
          },
          "metricset" : {
            "period" : 86400000,
            "name" : "billing"
          },
          "event" : {
            "duration" : 9832326700,
            "agent_id_status" : "verified",
            "ingested" : "2021-11-16T14:09:50Z",
            "module" : "azure",
            "dataset" : "azure.billing"
          },
          "azure" : {
            "billing" : {
              "usage_date" : "2021-11-17T00:00:00.000Z",
              "currency" : "USD",
              "forecast_cost" : "35.611388"
            }
          }
        },
        "sort" : [
          1637071788857
        ]
      }

image

@narph narph self-assigned this Nov 15, 2021
@elasticmachine
Copy link

elasticmachine commented Nov 15, 2021

💚 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

  • Duration: 12 min 23 sec

🤖 GitHub comments

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

  • /test : Re-trigger the build.

@narph narph added Integration:Azure Team:Integrations Label for the Integrations team labels Nov 16, 2021
@elasticmachine
Copy link

Pinging @elastic/integrations (Team:Integrations)

@narph narph merged commit 41afb3f into elastic:master Nov 17, 2021
@narph narph deleted the add-azure-billing branch November 17, 2021 10:12
@masci masci mentioned this pull request Dec 30, 2021
4 tasks
eyalkraft pushed a commit to build-security/integrations that referenced this pull request Mar 30, 2022
* initial create

* changelog

* add properties

* add dashboard

* reset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Integration:Azure Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants