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

Can't append procstat to config #133

Closed
damiendurant opened this issue Dec 1, 2020 · 1 comment · Fixed by #141
Closed

Can't append procstat to config #133

damiendurant opened this issue Dec 1, 2020 · 1 comment · Fixed by #141

Comments

@damiendurant
Copy link

Hi,

I use ssm to configure cloudwatch using AmazonCloudWatch-ManageAgent.

First with configure action, and the following configuration from parameter store :

{
	"agent": {
		"logfile": "c:\\ProgramData\\Amazon\\AmazonCloudWatchAgent\\Logs\\amazon-cloudwatch-agent.log"
	},
	"metrics": {
	    "append_dimensions": {
			"InstanceId": "${aws:InstanceId}"
		},
		"metrics_collected": {
			"Memory": {
				"metrics_collection_interval": 5,
				"measurement": [
					"% Committed Bytes In Use"
				]
			},
			"procstat": [{
				"exe": "KAVFS",
				"measurement": [
					"pid_count"
				]
			}],
			"LogicalDisk": {
				"measurement": [{
					"name": "% Free Space",
					"unit": "Percent"
				}],
				"resources": [
					"*"
				]
			}
		}
	}
}

Then, I use the append action to add some metrics :

{
"metrics": {
    "metrics_collected": {
			"procstat": [
                                {
				"exe": "W3SVC",
				"measurement": [
					"pid_count"
				]
				},
            	{
				"exe": "IISADMIN",
				"measurement": [
					"pid_count"
				]
			}]
}
}
}

Therefore the agent crash trying to merging the configuration

2020/12/01 14:40:53 Reading json config file path: C:\ProgramData\Amazon\AmazonCloudWatchAgent\Configs\ssm__infr-adm-edfx_metrics_iis.tmp ...

2020/12/01 14:40:53 Reading json config file path: C:\ProgramData\Amazon\AmazonCloudWatchAgent\Configs\ssm__infr-adm-edfx_metrics_standardWindows ...

2020/12/01 14:40:53 Failed to merge multiple json config files.

2020/12/01 14:40:53 Under path : /metrics/metrics_collected/procstat | Error : Different values are specified for procstat

How to handle this ?

@hdj630
Copy link
Contributor

hdj630 commented Dec 7, 2020

This should be a bug, thanks for reporting.

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