Skip to main content
All CollectionsInstallation
Dynamically defining instance names in FusionReactor
Dynamically defining instance names in FusionReactor

Running a standard script tp register FR ? You may wish to dynamically name instances, so that you can distinguish between them, here's how

David Tattersall avatar
Written by David Tattersall
Updated over a week ago

The name of an instance is in java agent argument of FusionReactor by default. It is equal to the value of the "name=something" value.

If you have your default installation where you pass the name statically into the JVM properties then all instances will register with the same name.

This results in all instances appearing with the same name, so you can't distinguish between them.

As a workaround to this, you could name your instances dynamically, which requires a script on the server you are installing. The easiest way to do this is it so override the name within the instance's configuration file. This is something you must do before starting your server as this name cannot be changed during runtime.

A script for this using bash would be something like:

touch {FusionReactor Directory}/instance/{Instance Name}/conf/reactor.conf
echo "version=7" >> {FusionReactor Directory}/instance/{Instance Name}/conf/reactor.conf
echo "name={myDynamicName or environment variable}" >> {FusionReactor Directory}/instance/{Instance Name}/conf/reactor.conf

When this script has run, you can then start your server e.g. ColdFusion with the dynamic name set.

This name could be {hostname}-{appName}-{InstanceID} for example so it is unique to identify, but what you set it as can be any unique value that works for you.

Did this answer your question?