Github user tbouron commented on a diff in the pull request:
https://github.com/apache/brooklyn-docs/pull/137#discussion_r94744256
--- Diff: guide/yaml/advanced-example.md ---
@@ -177,4 +211,41 @@ The ELK blueprint also contains a good example of a
child entity.
- type: logstash-child
~~~
-In this example, a logstash-child is started as a child of the parent
Tomcat server. The Tomcat server needs to be configured with a
`children.startable.mode` to inform Brooklyn when to bring up the child. In
this case we have selected background so that the child is disassociated from
the parent entity, and late to specify that the parent entity should start
before we start the child.
+In this example, a logstash-child is started as a child of the parent
Tomcat server. The Tomcat server needs
+to be configured with a `children.startable.mode` to inform Brooklyn when
to bring up the child. In this case
+ we have selected background so that the child is disassociated from the
parent entity, and late to specify that
+ the parent entity should start before we start the child.
+
+The example also shows how to configure Logstash inputs and filters, if
necessary, for a particular application,
+in this case Tomcat.
+~~~yaml
+- type: logstash-child
+ name: Logstash
+ brooklyn.config:
+ logstash.elasticsearch.hosts:
$brooklyn:entity("es").attributeWhenReady("urls.http.withBrackets")
+ logstash.config.input:
+ $brooklyn:formatString:
+ - |
+ input {
+ file {
+ path => "%s/logs/localhost_access_log.*"
+ start_position => "beginning"
+ }
+ }
+ - $brooklyn:entity("tomcat").attributeWhenReady("run.dir")
+ logstash.config.filter: |
+ filter {
+ grok {
+ match => { "message" => "%{COMBINEDAPACHELOG}" }
+ }
+ date {
+ match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
+ }
+ }
+~~~
+
+
+Configuring an appropriate visualisation on the Kibana server (access it
via the URL on the summary tab for
+that entity) allows a dashboard to be created such as
+
+
--- End diff --
Good catch, I'll add it
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---