[Hawkular-dev] hawkular java agent now supports ${x} in config

John Mazzitelli mazz at redhat.com
Mon Mar 20 08:50:41 EDT 2017


OK, 0.29.2.Final uses the ${env.X} syntax.

Just to expand on why I introduced this ${x} feature in the first place. I assume when you install the Java Agent in your Java app (be it WildFly or whatever) when the app is deployed inside OpenShift, things like IP addresses are not going to be known at the time you build your pod definition yaml or the agent's own yaml. So you won't be able to pre-define config settings like that - you'll have to specify them via this ${env.X} (if you want to pass them in as environment variables that you define in the pod) or as system properties (${x}) that you pass to the Java app in your container definition for the pod.

----- Original Message -----
> OK. I'll make this change now - should have a new release shortly that will
> use the ${env.X} syntax.
> 
> ----- Original Message -----
> > Consistency helps :)
> > 
> > On Mon, Mar 20, 2017 at 12:16 PM, John Mazzitelli <mazz at redhat.com> wrote:
> > 
> > > It was pointed out to me (which I forgot) that WildFly itself supports
> > > the
> > > syntax ${env.X} to denote environment variables.
> > >
> > > Now, this Java Agent isn't based on WildFly and these ${x} tokens appear
> > > in the yaml file and not the standalone.xml so we technically do no have
> > > to
> > > be consistent with WildFly syntax, but I wonder if I should switch this
> > > anyway to use the ${env.X} syntax just to make it consistent for people
> > > that are familiar with WildFly syntax.
> > >
> > > Let me know - this would be a trivial change but I would like to make
> > > another release quickly if this change is to be made.
> > >
> > > --John Mazz
> > >
> > > ----- Original Message -----
> > > > Thanks for the update ! And for releasing-early/releasing-often
> > > >
> > > > On Sat, Mar 18, 2017 at 3:22 PM, John Mazzitelli <mazz at redhat.com>
> > > wrote:
> > > >
> > > > > Just released Hawkular Java Agent 0.29.1.Final that contains a new
> > > feature.
> > > > >
> > > > > To support deploying Java Agent within containers (though this
> > > > > feature
> > > > > isn't restricted to that use-case), you can configure many settings
> > > > > in
> > > the
> > > > > Java Agent YAML config with ${x} expressions (similar to how HWFA can
> > > be
> > > > > configured in standalone.xml).
> > > > >
> > > > > It supports getting values from system properties, environment
> > > variables,
> > > > > with default values optionally defined. The following expressions are
> > > > > supported - hopefully this is self-explanatory:
> > > > >
> > > > > ${some.system.property}
> > > > >
> > > > > ${some.system.property:a-default-value}
> > > > >
> > > > > ${ENV~SOME_ENV_VAR}
> > > > >
> > > > > ${ENV~SOME_ENV_VAR:a-default-value}
> > > > >
> > > > > Not all properties support expressions (most don't need them) but
> > > > > properties that define things like hosts, ports, urls, passwords,
> > > > > filepaths, do support expressions.
> > > > >
> > > > > If I missed any, or if you'd like a property to support expressions
> > > that
> > > > > does not currently, write a HWKAGENT JIRA: https://issues.jboss.org/
> > > > > projects/HWKAGENT
> > > > >
> > > > > _______________________________________________
> > > > > hawkular-dev mailing list
> > > > > hawkular-dev at lists.jboss.org
> > > > > https://lists.jboss.org/mailman/listinfo/hawkular-dev
> > > > >
> > > > >
> > > > >
> > > >
> > > _______________________________________________
> > > hawkular-dev mailing list
> > > hawkular-dev at lists.jboss.org
> > > https://lists.jboss.org/mailman/listinfo/hawkular-dev
> > >
> > >
> > >
> > 
> _______________________________________________
> hawkular-dev mailing list
> hawkular-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hawkular-dev
> 


More information about the hawkular-dev mailing list