diff --git a/templates/logspout/0/README.md b/templates/logspout/0/README.md index c985949..2ff9771 100644 --- a/templates/logspout/0/README.md +++ b/templates/logspout/0/README.md @@ -5,10 +5,4 @@ Glider Labs Logspout with Logstash adapter ### Info: For any services launched from the Rancher UI to use Logspout, please make sure to disable the '-t' [tty] option in the Advanced Options of the service definition. - -### Community Version - -This version adds the Environment option, where you can specify the name of the Environment. -All Syslogs will then be sent with this as the Source Hostname rather than the hostname of -the Docker Host on which the container is running. - + \ No newline at end of file diff --git a/templates/logspout/0/docker-compose.yml b/templates/logspout/0/docker-compose.yml index f6005e9..3f4f811 100644 --- a/templates/logspout/0/docker-compose.yml +++ b/templates/logspout/0/docker-compose.yml @@ -3,9 +3,10 @@ logspout: environment: ROUTE_URIS: "${route_uri}" LOGSPOUT: 'ignore' - SYSLOG_HOSTNAME: "${envname}" volumes: - '/var/run/docker.sock:/var/run/docker.sock' + external_links: + - ${target_link}:${target_link_name} labels: io.rancher.scheduler.global: 'true' io.rancher.container.hostname_override: container_name diff --git a/templates/logspout/0/rancher-compose.yml b/templates/logspout/0/rancher-compose.yml index 027a841..e2cccf3 100644 --- a/templates/logspout/0/rancher-compose.yml +++ b/templates/logspout/0/rancher-compose.yml @@ -1,33 +1,32 @@ .catalog: name: Logspout - version: 0.2.0-1 + version: 0.2.0-rancher1 description: | - Logspout is a log router for Docker containers. This community template - allows you to log against the Rancher Environment rather than the hostname for - easier analysis. + Logspout is a log router for Docker containers. questions: - variable: "route_uri" label: "Logspout route for logs" type: "string" required: true - default: "syslog://syslog.example.com:514" + default: "logstash://logstash:5000" description: | This will be the target where all logs are sent. - - variable: "envname" - label: "Environment" + By default it uses logstash and points to a linked service + logstash. + - variable: "target_link" + label: "Logging Target Link" + type: "service" + required: true + default: "logstash/logstash" + description: | + Name of the stack/service to send logs to. + - variable: "target_link_name" + label: "Link Name" type: "string" required: true - default: "Rancher:" + default: "logstash" description: | - This is the environment name, which will be used as the Hostname - label in Syslog instead of the Host or Container name. - - variable: "format" - label: "Format" - type: "enum" - options: - - "rfc5424" - - "rfc3164" - required: true - default: "rfc5424" + Alias link name description: | - The Syslog format to use. If not certain, use rfc5424 + DNS name to send logs to. The DNS + Name should line up with the route uri. diff --git a/templates/logspout/1/README.md b/templates/logspout/1/README.md new file mode 100644 index 0000000..c985949 --- /dev/null +++ b/templates/logspout/1/README.md @@ -0,0 +1,14 @@ +# Add Logspout Stack + +Glider Labs Logspout with Logstash adapter + +### Info: + +For any services launched from the Rancher UI to use Logspout, please make sure to disable the '-t' [tty] option in the Advanced Options of the service definition. + +### Community Version + +This version adds the Environment option, where you can specify the name of the Environment. +All Syslogs will then be sent with this as the Source Hostname rather than the hostname of +the Docker Host on which the container is running. + diff --git a/templates/logspout/1/docker-compose.yml b/templates/logspout/1/docker-compose.yml new file mode 100644 index 0000000..f6005e9 --- /dev/null +++ b/templates/logspout/1/docker-compose.yml @@ -0,0 +1,14 @@ +logspout: + restart: always + environment: + ROUTE_URIS: "${route_uri}" + LOGSPOUT: 'ignore' + SYSLOG_HOSTNAME: "${envname}" + volumes: + - '/var/run/docker.sock:/var/run/docker.sock' + labels: + io.rancher.scheduler.global: 'true' + io.rancher.container.hostname_override: container_name + tty: true + image: rancher/logspout-logstash:v0.2.0 + stdin_open: true diff --git a/templates/logspout/1/rancher-compose.yml b/templates/logspout/1/rancher-compose.yml new file mode 100644 index 0000000..027a841 --- /dev/null +++ b/templates/logspout/1/rancher-compose.yml @@ -0,0 +1,33 @@ +.catalog: + name: Logspout + version: 0.2.0-1 + description: | + Logspout is a log router for Docker containers. This community template + allows you to log against the Rancher Environment rather than the hostname for + easier analysis. + questions: + - variable: "route_uri" + label: "Logspout route for logs" + type: "string" + required: true + default: "syslog://syslog.example.com:514" + description: | + This will be the target where all logs are sent. + - variable: "envname" + label: "Environment" + type: "string" + required: true + default: "Rancher:" + description: | + This is the environment name, which will be used as the Hostname + label in Syslog instead of the Host or Container name. + - variable: "format" + label: "Format" + type: "enum" + options: + - "rfc5424" + - "rfc3164" + required: true + default: "rfc5424" + description: | + The Syslog format to use. If not certain, use rfc5424