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

Double Custom metrics for Windows Instances #1350

Open
RonaldoNazo opened this issue Sep 13, 2024 · 1 comment
Open

Double Custom metrics for Windows Instances #1350

RonaldoNazo opened this issue Sep 13, 2024 · 1 comment
Labels

Comments

@RonaldoNazo
Copy link

Describe the bug
I am trying to install and run CloudWatch agent into some Windows EC2 instances, and Configuring to pull : "% Free Space" on "C:" ,and "% Committed Bytes In Use" . And I want only "aggregation_dimensions": [ [ "InstanceId" ] ]" .But The configuration Creates 4-Custom metrics, and not 2.

Steps to reproduce

I use Run commands with this configuration: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/download-CloudWatch-Agent-on-EC2-Instance-SSM-first.html#install-CloudWatch-Agent-EC2-first

I install the cw agent and also configure this configuration from a parameter store.

What did you expect to see?
I want to see 2 metrics into the namespace of /AWS/EC2/AGENT ,and into dimension "InstanceId" .

What did you see instead?
I see 4 metrics into the namespace /AWS/EC2/AGENT , mem_used_percent and disk_free_percent into dimension InstanceId, 1 into dimension "InstanceId, objectname" for mem_used_percent , and 1 into dimension "InstanceId, instance, objectname" for "disk_free_percent".

What version did you use?
Version: CWAgent/1.300044.0b793 (go1.22.6; windows; amd64)

What config did you use?
Config:

{
  "metrics": {
    "namespace": "AWS/EC2/AGENT",
    "aggregation_dimensions": [
      [
        "InstanceId"
      ]
    ],
    "append_dimensions": {
      "InstanceId": "${aws:InstanceId}"
    },
    "metrics_collected": {
      "LogicalDisk": {
        "drop_device": true,
        "drop_original_metrics": true,
        "aggregation_dimensions": [
          [
            "InstanceId"
          ]
        ],
        "measurement": [
          {
            "name": "% Free Space", "rename": "disk_free_percent"
          }
        ],
        "metrics_collection_interval": 10,
        "resources": [
          "C:"
        ]
      },
      "Memory": {
        "drop_original_metrics": true,
        "aggregation_dimensions": [
          [
            "InstanceId"
          ]
        ],
        "measurement": [
          {
            "name": "% Committed Bytes In Use", "rename": "mem_used_percent"
          }
        ],
        "metrics_collection_interval": 10
      }
    }
  }
}

Environment
OS:

OS Name:                   Microsoft Windows Server 2022 Datacenter
OS Version:                10.0.20348 N/A Build 20348
OS Manufacturer:           Microsoft Corporation
OS Configuration:          Standalone Server
OS Build Type:             Multiprocessor Free
Registered Owner:          EC2
Registered Organization:   Amazon.com

Additional context
I don't want to cause double costs because of this cloudwatch agent misconfiguration .

Copy link
Contributor

This issue was marked stale due to lack of activity.

@github-actions github-actions bot added the Stale label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant