Documented the agent '/metrics/snapshot' endpoint. Review: https://reviews.apache.org/r/46935/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/8e482f36 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/8e482f36 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/8e482f36 Branch: refs/heads/master Commit: 8e482f361d516a25f914e70bc55323a5ca06c936 Parents: 860e4a1 Author: Benjamin Bannier <benjamin.bann...@mesosphere.io> Authored: Mon May 9 15:20:31 2016 +0200 Committer: Alexander Rukletsov <al...@apache.org> Committed: Mon May 9 15:34:10 2016 +0200 ---------------------------------------------------------------------- docs/endpoints/slave/monitor/statistics.json.md | 11 ++++++++++- docs/endpoints/slave/monitor/statistics.md | 11 ++++++++++- src/slave/http.cpp | 7 ++++++- 3 files changed, 26 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/8e482f36/docs/endpoints/slave/monitor/statistics.json.md ---------------------------------------------------------------------- diff --git a/docs/endpoints/slave/monitor/statistics.json.md b/docs/endpoints/slave/monitor/statistics.json.md index 89a55ad..51d7c39 100644 --- a/docs/endpoints/slave/monitor/statistics.json.md +++ b/docs/endpoints/slave/monitor/statistics.json.md @@ -39,4 +39,13 @@ Example: "timestamp":1388534400.0 } }] -``` \ No newline at end of file +``` + + +### AUTHENTICATION ### +This endpoint requires authentication iff HTTP authentication is +enabled. + +### AUTHORIZATION ### +The request principal should be authorized to query this endpoint. +See the authorization documentation for details. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/mesos/blob/8e482f36/docs/endpoints/slave/monitor/statistics.md ---------------------------------------------------------------------- diff --git a/docs/endpoints/slave/monitor/statistics.md b/docs/endpoints/slave/monitor/statistics.md index 3e9a4d1..342638f 100644 --- a/docs/endpoints/slave/monitor/statistics.md +++ b/docs/endpoints/slave/monitor/statistics.md @@ -39,4 +39,13 @@ Example: "timestamp":1388534400.0 } }] -``` \ No newline at end of file +``` + + +### AUTHENTICATION ### +This endpoint requires authentication iff HTTP authentication is +enabled. + +### AUTHORIZATION ### +The request principal should be authorized to query this endpoint. +See the authorization documentation for details. \ No newline at end of file http://git-wip-us.apache.org/repos/asf/mesos/blob/8e482f36/src/slave/http.cpp ---------------------------------------------------------------------- diff --git a/src/slave/http.cpp b/src/slave/http.cpp index 000c65e..e6db54f 100644 --- a/src/slave/http.cpp +++ b/src/slave/http.cpp @@ -59,6 +59,7 @@ #include "slave/validation.hpp" using process::AUTHENTICATION; +using process::AUTHORIZATION; using process::Clock; using process::DESCRIPTION; using process::Future; @@ -617,7 +618,11 @@ string Slave::Http::STATISTICS_HELP() " \"timestamp\":1388534400.0", " }", "}]", - "```")); + "```"), + AUTHENTICATION(true), + AUTHORIZATION( + "The request principal should be authorized to query this endpoint.", + "See the authorization documentation for details.")); }