From 2f3f331c5f0e0eb526ecc0cea7f98f9ccca00f96 Mon Sep 17 00:00:00 2001 From: Daniel Hiltgen Date: Mon, 23 Nov 2015 15:33:38 -0800 Subject: [PATCH] Expose generalized configuration API This exposes a generalized configuration API base on dividing the configuration space up into subsystems. Within a given subsystem, the configuration is read/written in one json blob. This also does some slight tweaks to the logging subsystem based on this new API structure. --- logging.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/logging.md b/logging.md index 36192628ac..f0015285ac 100644 --- a/logging.md +++ b/logging.md @@ -1,17 +1,18 @@ # Remote logging configuration -To setup remote logging in Orca you must edit the KV store directly. +To setup remote logging in Orca you must edit the API directly. You'll need to run explicit curl commands described below. This -assumes you've already set up your environment per the [KV Store -instructions](kv_store.md) +assumes you've already set up your environment with a downloaded +bundle. ## Display the current settings ```sh +export ORCA_URL="https://$(echo $DOCKER_HOST | cut -f3 -d/ )" curl -s \ --cert ${DOCKER_CERT_PATH}/cert.pem \ --key ${DOCKER_CERT_PATH}/key.pem \ --cacert ${DOCKER_CERT_PATH}/ca.pem \ - ${KV_URL}/v2/keys/orca/v1/config/logging | jq "." + ${ORCA_URL}/api/config/logging | jq "." ``` ## Setup remote logging @@ -20,22 +21,21 @@ curl -s \ --cert ${DOCKER_CERT_PATH}/cert.pem \ --key ${DOCKER_CERT_PATH}/key.pem \ --cacert ${DOCKER_CERT_PATH}/ca.pem \ - -XPUT -d value='{"host":"mylogger:514","protocol":"tcp","level":"INFO"}' \ - ${KV_URL}/v2/keys/orca/v1/config/logging | jq "." + -XPOST -d '{"host":"mylogger:514","protocol":"tcp","level":"INFO"}' \ + ${ORCA_URL}/api/config/logging | jq "." ``` - ## Stopping remote logging -If you're simply changing the target, use the "set" example above with a new host. If you no longer want to send logging -to any remote syslogger, use the following: +If you set the host to an empty string, remote logging will be disabled. ```sh curl -s \ --cert ${DOCKER_CERT_PATH}/cert.pem \ --key ${DOCKER_CERT_PATH}/key.pem \ --cacert ${DOCKER_CERT_PATH}/ca.pem \ - -XDELETE ${KV_URL}/v2/keys/orca/v1/config/logging | jq "." + -XPOST -d '{"host":"","level":"DEBUG"}' \ + ${ORCA_URL}/api/config/logging | jq "." ``` # Setting up an ELK stack