Home > Software engineering >  Using AWS Cloudwatch to monitor C (on-premises, not cloud) program
Using AWS Cloudwatch to monitor C (on-premises, not cloud) program

Time:04-13

I am trying to create a simple C program that sends something like a real-time status message to AWS CloudWatch to inform that it is up and running, and the status goes offline when it's closed (real-time online/offline status). The C program will be installed at multiple users' computers, so there will be like a dashboard on CloudWatch. Is this even possible? I'm lost on AWS between Alarms/Logs/Metrics/Events..etc.

I also want to send some stats from each PC where the program is installed, like CPU usage for example, is it possible to make a dashboard on CloudWatch to monitor this as well? Am I free to create dashboard with whatever data I want? All the tutorials I found talk about integrating CloudWatch with other AWS services (Like Lambda and EC2) which isn't my case.

Thank you in advance.

CodePudding user response:

The best way to monitor a process will be using AWS CloudWatch procstat plugin. First, create a CloudWatch configuration file with PID file location from EC2 and monitor the memory_rss parameter of the process. You can read here more.

For stats you can install CloudWatch Agent on each machine and collect necessary metrics. You can read here more.

  • Related