From d5bfd20260e9ca97f5d210c1f5deea915d8a75ec Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Wed, 24 Feb 2016 15:38:32 -0800 Subject: [PATCH] add documentation for system gc endpoint and update log docs --- website/source/docs/http/system.html.md | 38 +++++++++++++++++++++++ website/source/docs/jobspec/index.html.md | 22 ++++++------- website/source/layouts/http.erb | 4 +++ 3 files changed, 53 insertions(+), 11 deletions(-) create mode 100644 website/source/docs/http/system.html.md diff --git a/website/source/docs/http/system.html.md b/website/source/docs/http/system.html.md new file mode 100644 index 000000000..359b20590 --- /dev/null +++ b/website/source/docs/http/system.html.md @@ -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 + +
+
Description
+
+ Initiate garbage collection of jobs, evals, allocations and nodes. +
+ +
Method
+
GET
+ +
URL
+
`/v1/system/gc`
+ +
Parameters
+
+ None +
+ +
Returns
+
+ None +
+
diff --git a/website/source/docs/jobspec/index.html.md b/website/source/docs/jobspec/index.html.md index a17237edc..b15cf65b1 100644 --- a/website/source/docs/jobspec/index.html.md +++ b/website/source/docs/jobspec/index.html.md @@ -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 diff --git a/website/source/layouts/http.erb b/website/source/layouts/http.erb index f22413041..bca83a2aa 100644 --- a/website/source/layouts/http.erb +++ b/website/source/layouts/http.erb @@ -97,6 +97,10 @@ Status + > + System + + <% end %>