18

I have installed AWS CloudWatch agent on my EC2 instance and configured with the amazon-cloudwatch-agent-config-wizard. The AWS credentials are stored in .aws/credentials and picked up by the wizard during configuration.

Now I am checking the status of the agent, but I do not understand what "cwoc_status": "stopped" refers to?

Here the output of the agent status:

ubuntu@ip-address:~$ sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -m ec2 -a status
{
  "status": "running",
  "starttime": "2021-02-09T05:37:12+00:00",
  "configstatus": "configured",
  "cwoc_status": "stopped",
  "cwoc_starttime": "",
  "cwoc_configstatus": "not configured",
  "version": "1.247347.3b250378"
}

Alessandro Baffa
  • 1,127
  • 3
  • 11
  • 25

2 Answers2

15

I finally discovered that cwoc refers to AWS-OpenTelemetry Collector, which I think has been installed by default by amazon-cloudwatch-agent.deb that I used to install the CWAgent on my EC2. I found it by doing the following grep

ubuntu@ip-address:/opt/aws/amazon-cloudwatch-agent$ grep -r cwoc

which found the string in the file /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl where I found that reference to the folder /opt/aws/amazon-cloudwatch-agent/cwagent-otel-collector.

Googling otel-collector I found the OpenTelemetry Collector.

Alessandro Baffa
  • 1,127
  • 3
  • 11
  • 25
  • 5
    But does it need to be running for the metrics to be picked up? I get a similar status and I'm not seeing my metrics in cloudwatch. – marqram Feb 26 '21 at 17:24
  • 3
    The metrics sent by the running Cloudwatch agent are picked up. If you want to send the OpenTelemetry metrics, I guess you need to start it too. – Alessandro Baffa Feb 28 '21 at 12:05
1

cwoc is for open telemetry for use by tools like NewRelic and others. But many of those tools now will read from Cloudwatch to avoid the hassle of configuring every server.

sknutsonsf
  • 81
  • 1
  • 2