-
Notifications
You must be signed in to change notification settings - Fork 619
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
Splunk Log Driver #454
Comments
@smugcloud can you please paste the output of Thanks, |
I was wondering how to get all that data @aaithal :D It does indeed look like Splunk is missing from here. Is this supposed to be a part of the default agent?
|
Yeah, that does seem to be the issue. You'd have to override the ECS Agent config to add splunk logging driver using the For example, the following user-data registers the instance with #!/bin/bash
echo ECS_AVAILABLE_LOGGING_DRIVERS='["splunk","awslogs"]' >> /etc/ecs/ecs.config |
Thanks @aaithal . For any AWS employees reading this, it would be wonderful if this was included in the recommended AMI's so we don't need to account for this as well. |
@smugcloud Is there an easy way where we can test the functionality of the splunk logging driver? If we can write a functional test for the splunk log driver (for example, awslogs driver is being tested here), we can look at modifying Thanks, |
@aaithal can we just add that ECS_AVAILABLE_LOGGING_DRIVERS line to the /etc/ecs/ecs.config after the fact? We dont want to have to rebuild the cluster. |
@aaithal That test could be modified to validate the existence of the Splunk log driver in the base config. It shouldn't need to be added out of band, if that functionality is provided by default. Just like fluentd, gelf, etc. are exposed as available options in the UI, Splunk should be too. @MaerF0x0 yes, you can update the |
@MaerF0x0 as per @smugcloud's comment, you can just update the @smugcloud we are working on enabling that in the UI. My question was more about writing an end-to-end test in the ECS Agent for splunk logging driver. If you look at the test that I mentioned earlier, we start a task (with container using |
@aaithal I don't have a great suggestion for that. Validating that all of the available drivers are active for the agent is a valuable test as it would have saved me some time, and prevent regressions in the future. Outside of that, I supposed you'd have to do something similar and ensure calls are being made to the HTTP endpoint. |
@aaithal We are having the same issue until the env variable is manually configured in agent. Since we are able to specify the log driver in task definition, should the agent take care of the env variable without it being explicitly specified? |
@ericwush Since the logging drivers could be streaming logs to an external endpoint, which could require additional configuration on the instance, we chose not to enable all logging drivers by default on the ECS Agent as there isn't a straight forward/generic scheme for the ECS Agent to validate such configurations, which could lead to task start failures. |
Hi All, we are closing this issue as the only missing item here is enabling the Splunk logging driver by default. Since it's hard for the ECS Agent to verify the driver configuration, we are not in favor of this being enabled by default. You can still override the environment variables and use the Splunk logging driver in your application. Please let us know if you have any additional comments. Thanks, |
I am also facing the same issue with my setup. Is there a permanent fix provided by AWS or do we have to run command : echo ECS_AVAILABLE_LOGGING_DRIVERS='["splunk","awslogs"]' >> /etc/ecs/ecs.config on all the ECS nodes? |
It's frustrating that the ECS task definition provides an option to stream logs to Splunk, but doesn't enable the necessary configuration on the EC2 instance by default. I wasted hours troubleshooting why my tasks were stuck in the provisioning state, only to fail with the vague "TaskFailedToStart: Attribute" error. If additional setup is required (it shouldn't be), the UI should clearly indicate that. It would save a lot of time and frustration. "we are closing this issue as the only missing item here is enabling the Splunk logging driver by default." For anyone encountering this issue, you can also adjust the Launch Template used by your Auto Scaling Group, instead of updating each EC2 instance. In the AWS Management Console:
This should resolve the issue and allow your tasks to start successfully. |
Hi Guys,
First, thanks for including the Splunk log driver in ECS. I am running agent v. 1.11.0 with Docker v. 1.11.2 on the ami-241bd844.
If I try to run the task definition below, I am getting an error. Is there something else I need to specify in order for the Splunk log driver to begin being used? I am able to run the same
docker run
command with no issues on the same host.Error:
Task Definition:
The text was updated successfully, but these errors were encountered: