I have a list defined in a cluster:

    - type: org.apache.brooklyn.enricher.stock.Aggregator
      brooklyn.config:
        enricher.sourceSensor: $brooklyn:sensor("cm_host_port")
        enricher.targetSensor: $brooklyn:sensor("cm_host_port_list")
        enricher.aggregating.fromMembers: true

I'd like to use that list when I customize the entity. 

The issue is creating the "cm_host_port" in the entity.  I've tried 
various combinations.  This works, but doesn't get the sensor created 
until too late:

    brooklyn.enrichers:
      - type: org.apache.brooklyn.enricher.stock.Transformer
        brooklyn.config:
          enricher.sourceSensor: $brooklyn:sensor("service.isUp")
          enricher.targetSensor: $brooklyn:sensor("cm_host_port")
          enricher.targetValue: $brooklyn:formatString("%s:%s", 
$brooklyn:attributeWhenReady("host.name"), 
$brooklyn:attributeWhenReady("ca.port"))

If I change the sourceSensor to:
         enricher.sourceSensor: $brooklyn:sensor("host.name")
or
         enricher.sourceSensor: $brooklyn:attributeWhenReady("host.name")

Then the entity hangs, waiting for host.name to be set.

I tried:
          enricher.triggerSensors:
          - $brooklyn:sensor("host.name")

But that never got triggered.
(BTW, I cant find "triggerSensors" in the code)

Any Idea how I can fix this without doing something in my Java code?

Thanks
Graham Ashby

Reply via email to