Merge pull request #849 from hashicorp/d-system-gc

Docs: System gc endpoint and updated log docs
This commit is contained in:
Alex Dadgar 2016-02-25 09:21:08 -08:00
commit e1cde24abb
3 changed files with 53 additions and 11 deletions

View file

@ -0,0 +1,38 @@
---
layout: "http"
page_title: "HTTP API: /v1/system/"
sidebar_current: "docs-http-system"
description: |-
The '/1/system/' endpoints are used to for system maintance.
---
# /v1/system
The `system` endpoint is used to for system maintance and should not be
necessary for most users. By default, the agent's local region is used; another
region can be specified using the `?region=` query parameter.
## PUT
<dl>
<dt>Description</dt>
<dd>
Initiate garbage collection of jobs, evals, allocations and nodes.
</dd>
<dt>Method</dt>
<dd>GET</dd>
<dt>URL</dt>
<dd>`/v1/system/gc`</dd>
<dt>Parameters</dt>
<dd>
None
</dd>
<dt>Returns</dt>
<dd>
None
</dd>
</dl>

View file

@ -381,29 +381,29 @@ The `constraint` object supports the following keys:
### Log Rotation
The `logs` object configures how Nomad does log rotation of the `stdout` and
`stderr` buffers of a Task. The `logs` object supports the following keys -
The `logs` object configures the log rotation policy for a task's `stdout` and
`stderr`. The `logs` object supports the following keys:
* `max_files` - Determines the maximum number of rotated files Nomad
is going to retain for the `stdout` and the `stderr` buffers.
* `max_files` - The maximum number of rotated files Nomad will retain for
`stdout` and `stderr`, each tracked individually.
* `max_file_size` - Determines the size of each rotated file. The
size is specified in `MB`.
* `max_file_size` - The size of each rotated file. The size is specified in
`MB`.
If the amount of disk resource requested for the task is less than the total
amount of disk space needed to retain the rotated set of files, Nomad will return
amount of disk space needed to retain the rotated set of files, Nomad will return
a validation error when a job is submitted.
```
logs {
max_files = 3
max_file_size = 100
max_file_size = 10
}
```
In the above example we have asked Nomad to retain 3 rotated files and size of
each file is 100MB. And so the minimum amount of disk space that would be
required for the task would be 300MB
In the above example we have asked Nomad to retain 3 rotated files for both
`stderr` and `stdout` and size of each file is 10MB. The minimum disk space that
would be required for the task would be 60MB.
## JSON Syntax

View file

@ -97,6 +97,10 @@
<a href="/docs/http/status.html">Status</a>
</li>
<li<%= sidebar_current("docs-http-system") %>>
<a href="/docs/http/system.html">System</a>
</li>
</ul>
</div>
<% end %>