3

I'm trying to get process level monitoring going for an EC2 instance with a bunch of small nodejs services on it.

Right now I am using this configuration:

{
    "metrics": {
        "metrics_collected": {
            "procstat" : [
                {
                    "pattern": "node",
                    "measurement": [
                        "cpu_usage",
                        "memory_rss"
                    ],
                    "metrics_collection_interval": 10
                }
            ]
        }
    }
}

In my cloudwatch console there are only 4 new metrics after adding this config.

enter image description here

But if I do ps aux | grep node on the server there are 11 separate processes.

How do I get information from each of these separately?

Christopher Reid
  • 253
  • 1
  • 3
  • 12

1 Answers1

1

I solved this a while ago:

Instead of targeting the pattern node you need to explicitly target the command for each process group you want to monitor:

              {
                  "pattern": "\/usr\/bin\/node \/var\/operations\/server",
                  "measurement": [
                      "cpu_usage",
                      "memory_rss"
                  ],
                  "metrics_collection_interval": 60
              },
Christopher Reid
  • 253
  • 1
  • 3
  • 12