open-nomad/client/allocrunner
Michael Schurter 1c4e585fa7 client: expose allocated memory per task
Related to #4280

This PR adds
`client.allocs.<job>.<group>.<alloc>.<task>.memory.allocated` as a gauge
in bytes to metrics to ease calculating how close a task is to OOMing.

```
'nomad.client.allocs.memory.allocated.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 268435456.000
'nomad.client.allocs.memory.cache.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 5677056.000
'nomad.client.allocs.memory.kernel_max_usage.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 0.000
'nomad.client.allocs.memory.kernel_usage.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 0.000
'nomad.client.allocs.memory.max_usage.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 8908800.000
'nomad.client.allocs.memory.rss.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 876544.000
'nomad.client.allocs.memory.swap.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 0.000
'nomad.client.allocs.memory.usage.example.cache.6d98cbaf-d6bc-2a84-c63f-bfff8905a9d8.redis.rusty': 8208384.000
```
2019-05-10 11:12:12 -07:00
..
interfaces client: cleanup and document context uses 2019-03-12 15:03:54 -07:00
state stale allocation data leads to incorrect (and even negative) metrics (#5637) 2019-05-07 15:54:36 -04:00
taskrunner client: expose allocated memory per task 2019-05-10 11:12:12 -07:00
alloc_runner.go Merge pull request #5632 from hashicorp/f-nomad-exec-parts-01-base 2019-05-09 18:09:27 -04:00
alloc_runner_hooks.go client: cleanup and document context uses 2019-03-12 15:03:54 -07:00
alloc_runner_test.go Update deployment health on failed allocations only if health is unset 2019-05-02 22:59:56 -05:00
alloc_runner_unix_test.go client: emit event and call exited hooks during cleanup 2019-03-05 15:12:02 -08:00
allocdir_hook.go client: cleanup and document context uses 2019-03-12 15:03:54 -07:00
config.go client/drivermananger: add driver manager 2018-12-18 22:55:18 -05:00
health_hook.go client: cleanup and document context uses 2019-03-12 15:03:54 -07:00
health_hook_test.go client: cleanup and document context uses 2019-03-12 15:03:54 -07:00
migrate_hook.go client: cleanup and document context uses 2019-03-12 15:03:54 -07:00
testing.go client: add proper build flag to allocrunner testing.go 2018-12-19 20:22:07 -05:00
upstream_allocs_hook.go client: cleanup and document context uses 2019-03-12 15:03:54 -07:00
util.go allocrunnerv2 -> allocrunner 2018-10-16 16:56:56 -07:00