Skip to content

Comments

Consider logstash configuration useability#109

Merged
mwl merged 23 commits intomasterfrom
feature/109-external-configuration
Mar 1, 2016
Merged

Consider logstash configuration useability#109
mwl merged 23 commits intomasterfrom
feature/109-external-configuration

Conversation

@mwl
Copy link
Collaborator

@mwl mwl commented Feb 29, 2016

I don't know the right answer. But using CLI parameters to alter the logstash config seems clunky. It's not immediately obvious to users who are used/have read that you use a configuration file.

Consider allowing the use of a configuration file (like ES) that is the same as a logstash configuration file. Parse and alter if you must, but it may be more simple (and reduce lines of code) to not parse the file at all. I.e. the user is responsible for passing the correct ES endpoint, etc.

@jhftrifork
Copy link

We've discussed this here before. I agree with your suggested approach. Users want to interact with mesos-logstash in a similar way to Logstash.

However we wouldn't be able to just pass through a Logstash config file without alteration. Some current features are more dynamic, e.g. adding the Mesos slave ID to each log event.

@frankscholten
Copy link
Contributor

What about having the config file generated by the scheduler and available on an endpoint? On task launch it can be downloaded by the Mesos fetcher just like the executor Jar and the logstash distribution.

@mwl
Copy link
Collaborator

mwl commented Feb 5, 2016

Another thing… So I was thinking about using a template engine like Freemarker to generate Logstash configuration. Which is fairly easy. But then comes the resources, mainly ports.
If we give users the freedom to put whatever they want into the configuration, they will end up writing the same things in more places.

I see two solutions to giving users total freedom with a template logstash configuration:

  1. Parse up the generated Logstash configuration and guess what resources are needed
  2. Take all resources allocated to role that are offered by Mesos.

I vote for 2nd.

@mwl
Copy link
Collaborator

mwl commented Feb 29, 2016

Quite a few things happened here.

  • The framework was migrated to Mesos-Starter
  • Spring Boot got upgraded to 1.3.2
  • Upgraded Minimisos to 0.6.something
  • Implemented external configuration

deployScheduler(null, null, false, logstashConfig, false);

final int elasticsearchPort = 9300;
SECONDS.sleep(2);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not necessary considering the await next.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The driver throws a stupid Exception, because nothing was ready.

@philwinder
Copy link
Collaborator Author

That looks great Martin. Ready.

@philwinder
Copy link
Collaborator Author

Make sure you do some manual testing before you release, though.

mwl added a commit that referenced this pull request Mar 1, 2016
Consider logstash configuration useability
@mwl mwl merged commit 54a25fe into master Mar 1, 2016
@mwl mwl deleted the feature/109-external-configuration branch March 1, 2016 12:07
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.

5 participants