What are valid names for Geneos components?

As part of the work I am doing on the package in the topic Geneos Golang package I am adding support for sanitising user input for instance names, both with a view to securing of input (Bobby Tables is not welcome here!) but also usability and predictability.

I am not focused on internal data items right now, such as Managed Entities, Samplers and other configuration - but rather the on-disk instances like gateways, probes etc.

Many of the geneos program commands accepts one or more names for instances, such as “MyGateway” etc. but - and this is the real question - what should be a valid name?

We have, by accident more than design, a special gateway name Demo Gateway as per Demo Mode and for predictability the gateway name is usually linked to the on-disk directory name and other meta-configuration items. So, I’m having to account for spaces but this makes me wonder if I should also limit the set of valid characters in names? Typical, ASCII-centric, sets would be letters, number and underscore and dash (regexp '^[w-]+$') but is this enough for users (i.e. you) ?

It would be nice to support Unicode properly but since Geneos doesn’t internally this would introduce a disconnect between on-disk and config. The Unicode “attacks” on code with LR/RL switches and similar visual characters simply breaks with most of Geneos, so there is unintentional protection already.

In terms of spaces, I am going to simplistically replace them in and out of the user interface in my geneos with another character, default ‘+’, but keep the space on disk and in config files etc.

Finally, as another consideration, for my geneos command I am reserving the keywords that describe components, such as “gateway”, “netprobe”, “probe” and others (full list in github) - do any of you call real Geneos instances such generic names? If, as part of an import process, I simply rename them by adding a number on then end will this be a problem?

Hi Peter,

The first place to work back from is the schema as this is what will cause errors if you don’t stick to it. You can get a copy multiple places with a command, but the ActiveConsole has a copy just sitting in the schema\ sub directory. (More information on the schema can be found here: Gateway Setup Editor).

You can look at it in a text editor, but it’s much easier to look in an xml editor:

As far as special words is concerned, if you’re sending emails then you may also end up with ‘Administrator’ or ‘Administrators’ - the two reserved words for authentication.

Hope that helps!