This scrip will help you to collect metrics based on per process. Required process name as a argument, also able to kill that process if desired thresould crossed.
pull the script and place it under sensu embedded directory.
/opt/sensu/embedded/bin/metrics_per_process.py
now create a config for the check /etc/sensu/conf.d/myapp.json
{
"checks": {
"myapp-stats": {
"type": "metric",
"command":"/opt/sensu/embedded/bin/metrics_per_process.py -p /home/user/my-app.js",
"interval": 60,
"subscribers": [
"my-app"
],
"handler": "librato"
}
}
psutil
pip install psutil
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Adil Mehmood DevOps Engineer - Initial work - ThinkDifferent
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details