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

I should be able to assign metrics per resource type when using resource groups #63

Open
andrewmitchell21 opened this issue Aug 23, 2019 · 4 comments

Comments

@andrewmitchell21
Copy link

andrewmitchell21 commented Aug 23, 2019

At present this module doesn't appear to support exporting different metrics for resource groups that have multiple resource Ids, for example, we should be able to to the following:

resource_groups:
  - resource_group: "test-rg"
    resource_types:
    - "Microsoft.Sql/servers/databases"
        metrics:
        - name: "storage_percent"
        - name: "cpu_percent"
        - name: "allocated_data_storage"
        - name: "workers_percent"
        - name: "physical_data_read_percent"
        - name: "log_write_percent"
        - name: "sessions_percent"
        - name: "xtp_storage_percent"
        - name: "storage"
        - name: "connection_successful"
        - name: "connection_failed"
        - name: "blocked_by_firewall"
        - name: "deadlock"
     - "Microsoft.Sql/servers/elasticPools"
        metrics
        -name "cpu_percent"

At the moment the config expects the following:

resource_groups:
  - resource_group: "test-rg"
    resource_types:
    - "Microsoft.Sql/servers/databases"
    - "Microsoft.Sql/servers/elasticPools"
    metrics:
     - name: "storage_percent"
     - name: "cpu_percent"
     - name: "allocated_data_storage"
     - name: "workers_percent"
     - name: "physical_data_read_percent"
     - name: "log_write_percent"
     - name: "sessions_percent"
     - name: "xtp_storage_percent"
     - name: "storage"
     - name: "connection_successful"
     - name: "connection_failed"
     - name: "blocked_by_firewall"
     - name: "deadlock"

resource types have different metrics, and this causes 400's

@wanieldilson
Copy link

Also having this issue

@brian-brazil
Copy link
Member

What does the output for the respective metrics look like?

@wanieldilson
Copy link

wanieldilson commented Jun 11, 2021

I just get a tonne of 400 errors for metrics that don't exist for x resource type. But that seems to stop any valid metrics coming through also. Config below

resource_tags:
      - resource_tag_name: "prometheus"
        resource_tag_value: "tomonitor"
        resource_types:
          - "Microsoft.Network/loadbalancers"
          - "Microsoft.Network/virtualnetworkgateways"
          - "Microsoft.Compute/virtualMachines"
        metrics:
          - name: "CPU Credits Consumed"
          - name: "Percentage CPU"
          - name: "Inbound Flows"
          - name: "Outbound Flows"
          - name: "Network In Total"
          - name: "Network Out Total"
          - name: "OS Disk Queue Depth"
          - name: "Byte Count"
          - name: "Health Probe Status"
          - name: "Tunnel Ingress Bytes"
          - name: "Tunnel Egress Bytes"
          - name: "Tunnel Bandwidth" 

@wanieldilson
Copy link

Any idea where we can go from here?

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

No branches or pull requests

3 participants