Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for SumoLogic logging driver #992

Merged
merged 1 commit into from
Sep 28, 2017
Merged

Add support for SumoLogic logging driver #992

merged 1 commit into from
Sep 28, 2017

Conversation

bin3377
Copy link

@bin3377 bin3377 commented Sep 27, 2017

Summary

Add SumoLogic Docker Logging Driver support in docker client

Implementation details

Add sumologic in logging_drivers.go
Add 1.29 as minimum support API version

Testing

  • Builds on Linux (make release)
  • Builds on Windows (go build -out amazon-ecs-agent.exe ./agent)
  • Unit tests on Linux (make test) pass
  • Unit tests on Windows (go test -timeout=25s ./agent/...) pass
  • Integration tests on Linux (make run-integ-tests) pass
  • Integration tests on Windows (.\scripts\run-integ-tests.ps1) pass
  • Functional tests on Linux (make run-functional-tests) pass
  • Functional tests on Windows (.\scripts\run-functional-tests.ps1) pass

New tests cover the changes:

Description for the changelog

Licensing

This contribution is under the terms of the Apache 2.0 License:

@samuelkarp samuelkarp changed the base branch from master to dev September 28, 2017 00:48
@samuelkarp samuelkarp self-assigned this Sep 28, 2017
@samuelkarp
Copy link
Contributor

samuelkarp commented Sep 28, 2017

Thank you! I was able to test this and get it working with a task definition like this:

{
        "family": "sumologic-test",
        "containerDefinitions": [
            {
                "name": "hello",
                "image": "ubuntu:latest",
                "cpu": 100,
                "memory": 512,
                "essential": true,
		"entryPoint": ["sh", "-c"],
		"command": ["echo hello sumologic!"],
		"logConfiguration" : {
			"logDriver": "sumologic",
			"options": {
				"sumo-url":"<REDACTED>"
			}
		}
            }
        ]
}

Note that I did need to install the plugin and specify the --alias flag like this: docker plugin install store/sumologic/docker-logging-driver:1.0.1 --alias sumologic.

@samuelkarp samuelkarp merged commit 6861b84 into aws:dev Sep 28, 2017
@bin3377 bin3377 deleted the sumologic-logging-driver branch September 28, 2017 22:50
@jhaynes jhaynes mentioned this pull request Sep 30, 2017
@rh-lphan
Copy link

rh-lphan commented Oct 6, 2017

Hello,

It is giving me "Run tasks failed: Reasons: ["ATTRIBUTE"] "
is it related to
#535

I added this to /etc/ecs/ecs.config and restart
stop ecs
start ecs
, is it necessary?
ECS_AVAILABLE_LOGGING_DRIVERS='["awslogs","sumologic"]'

@bin3377
Copy link
Author

bin3377 commented Oct 6, 2017

there should be no space between sumo and logic

@rh-lphan
Copy link

rh-lphan commented Oct 6, 2017

Hello,

I solved the problem with
/etc/ecs/ecs.config
ECS_AVAILABLE_LOGGING_DRIVERS=["json-file","syslog","sumologic"]

However I see in the ECS agent log:
ime="2017-10-06T04:44:49.789711510Z" level=error msg="Handler for POST /v1.21/containers/create returned error: logger: no log driver named 'sumologic' is registered"

but I do see
docker plugin ls
ID NAME DESCRIPTION ENABLED
c935be3e82c7 sumologic:latest Sumo Logic logging driver true


This error went away with
ECS_AVAILABLE_LOGGING_DRIVERS=[“json-file”,“awslogs”,“sumologic”]

But now the task cannot restart:
STOPPED (CannotCreateContainerError: API error (500): logge)

@jhaynes
Copy link
Contributor

jhaynes commented Oct 6, 2017

Hi @rh-lphan,

If you're still running into trouble with the SumoLogic log driver, please feel free to open a new issue here on github with the relevant logs and configuration or engage AWS support directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants