Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tkuchiki/mackerel-plugin-linux-proc-stats
Linux processes metrics plugin for mackerel.io agent.
https://github.com/tkuchiki/mackerel-plugin-linux-proc-stats
golang linux mackerel mackerel-plugin plugins process stats
Last synced: about 1 month ago
JSON representation
Linux processes metrics plugin for mackerel.io agent.
- Host: GitHub
- URL: https://github.com/tkuchiki/mackerel-plugin-linux-proc-stats
- Owner: tkuchiki
- License: apache-2.0
- Created: 2015-12-17T13:47:49.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-06-19T08:11:07.000Z (over 8 years ago)
- Last Synced: 2024-06-20T11:54:32.321Z (7 months ago)
- Topics: golang, linux, mackerel, mackerel-plugin, plugins, process, stats
- Language: Go
- Size: 13.7 KB
- Stars: 13
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mackerel-plugin-linux-proc-stats
Linux processes metrics plugin for mackerel.io agent.## Synopsis
```shell
mackerel-plugin-linux-proc-stats -pid=|-pidfile=|-process-pattern= [-metric-key-prefix=] [-tempfile=] [-follow-child-processes] [-include-dead-children=0]
``````shell
$ ./mackerel-plugin-linux-proc-stats --help
Usage of ./mackerel-plugin-linux-proc-stats:
-follow-child-processes
Follow child processes
-include-dead-children
Include dead kids in cpu sum (default true)
-metric-key-prefix string
Metric key prefix
-pid string
PID
-pidfile string
PID file
-process-pattern string
Match a command against this pattern
-tempfile string
Temp file name
-version
Version
```## Requirements
- [getconf](http://linux.die.net/man/1/getconf)
## Example of mackerel-agent.conf
```
[plugin.metrics.linux_proc_stats]
command = "/path/to/mackerel-plugin-linux-proc-stats -pidfile /var/run/nginx.pid -follow-child-processes"
``````
[plugin.metrics.linux_proc_stats]
command = "/path/to/mackerel-plugin-linux-proc-stats -pidfile /var/run/mackerel-agent.pid"
``````
[plugin.metrics.linux_proc_stats]
command = "/path/to/mackerel-plugin-linux-proc-stats -process-pattern 'nginx: master process'"
```## Example
Running threads.
```shell
$ ./mackerel-plugin-linux-proc-stats -pidfile /var/run/mackerel-agent.pid
mackerel-agent_process.memory.vsize 812974080.000000 1458808344
mackerel-agent_process.memory.rss 10448896.000000 1458808344
mackerel-agent_process.num.running 0.000000 1458808344
mackerel-agent_process.num.processes 1.000000 1458808344
mackerel-agent_process.num.threads 26.000000 1458808344
mackerel-agent_process.cpu.usage 0.083986 1458808344
```Only master process.
```shell
$ ./mackerel-plugin-linux-proc-stats -pidfile /var/run/nginx.pid
nginx_process.cpu.usage 0.000000 1458808477
nginx_process.memory.vsize 107450368.000000 1458808477
nginx_process.memory.rss 3399680.000000 1458808477
nginx_process.num.running 0.000000 1458808477
nginx_process.num.processes 1.000000 1458808477
nginx_process.num.threads 1.000000 1458808477
```Master process and worker processes.
```shell
$ ./mackerel-plugin-linux-proc-stats -pidfile /var/run/nginx.pid -follow-child-processes
nginx_process.num.running 0.000000 1458808496
nginx_process.num.processes 2.000000 1458808496
nginx_process.num.threads 2.000000 1458808496
nginx_process.cpu.usage 0.000095 1458808496
nginx_process.memory.vsize 215269376.000000 1458808496
nginx_process.memory.rss 7966720.000000 1458808496
```