Multiple Managed Entities in Geneos tools Self Announcing Netprobes

I have been trying the geneos command line tool described in the initial release post for the first time over the last couple of days and it has proved incredibly easy to use, with a vast array of features. I was up and running very quickly considering I had not seen it before, and adding things like Java from the command line was very simple. I am going to be switching most of what I do to use this.

The area that does not seem clear though, is where Managed Entities sit in Self Announcing Netprobes (SAN).

  • When you set these up in Geneos then multiple Managed Entities can be added, and within each one then features like name, attributes, variables and types exist.
  • Within the tool there only seems to be support for these at the top level within the json as well as on the command line, i.e. to only create a single Managed Entity per Probe; and that it’s necessary to disable the automatic configuration feature and do manually.

Perhaps I’ve missed something? - If so I’d love for someone to guide me in the right direction.
Otherwise, I believe matching the json structure more tightly with the xml (which will introduce compatibility issues) may be the way to go for long term benefits. Thoughts?

Thanks,

Matt.

Yes, this is a missing feature if you use the built-in templates. The templates are intended to get a basic set-up off the ground but will not, as you have seen, suitable for all use cases.

There is a setting in the component configs that apply to Gateways and SANs, “config.rebuild”, which can be one of never, initial or always. For new Gateways this defaults to initial and for SANs to always. For adopted legacy installs the defaults are actually undefined. I will add that to the TODO list.

$ geneos add gateway blah
...
$ geneos show blah
{
    "name": "blah",
    "host": "localhost",
    "type": "gateway",
    "config": {
        "aesfile": "gateway.aes",
        "binary": "gateway2.linux_64",
        "config": {
            "rebuild": "initial",
            "template": "gateway.setup.xml.gotmpl"
        },
        "gatewayname": "blah",
...
$ cat $(geneos home gateway blah)/gateway.json
{
  "aesfile": "gateway.aes",
  "binary": "gateway2.linux_64",
  "config": {
    "rebuild": "initial",
    "template": "gateway.setup.xml.gotmpl"
  },
  "gatewayname": "blah",

If you set your SAN config.build to never then you should be able to edit the config file manually. If you add new template(s) to the san/templates directory then these can also help maintain the config files.

So:

$ geneos set gateway blah config.rebuild=never
$ geneos show blah
{
    "name": "blah",
    "host": "localhost",
    "type": "gateway",
    "config": {
        "aesfile": "gateway.aes",
        "binary": "gateway2.linux_64",
        "config": {
            "rebuild": "never",
            "template": "gateway.setup.xml.gotmpl"
        },
        "gatewayname": "blah",
...

The templates are in Go text/template format and are passed a structure including all the items under the top-level config item in the instance configuration (see above). For instances that still use *.rc files these are internally converted to the new values but no on-disk change should take place. Basically do a geneos show netprobe abc to see the values that can appear in the template.

The documentation is not very extensive in this area and what there is, after a quick look, is a little out of date. Templates are both embedded in the binary at build time to ensure there are simple, sensible defaults, but they can be overridden. If you have picked up geneos to use with a legacy system then your template directories may be empty; Try this:

$ ls $(geneos home)/san/templates
ls: cannot access /opt/geneos/geneos-utils/system/san/templates: No such file or directory
$ geneos init -T
gateway template written to /opt/geneos/geneos-utils/system/gateway/templates/gateway.setup.xml.gotmpl
gateway instance template written to /opt/geneos/geneos-utils/system/gateway/templates/gateway-instance.setup.xml.gotmpl
san template written to /opt/geneos/geneos-utils/system/san/templates/netprobe.setup.xml.gotmpl
$ ls -l $(geneos home)/san/templates
total 4
-rw-rw-r--. 1 geneos geneos 1582 Jun 29 12:13 netprobe.setup.xml.gotmpl

geneos init -T will write the embedded templates into the right directories.

While testing some of this above I noticed the unset command is also a little broken. Apologies.

1 Like

Thanks for your swift response. Very helpful.

I actually didn’t in this case, I wanted to start brand new on a clean system; over time I see some of the docs being flipped, as I had to read more than expected before getting going as there was a big initial focus on how to migrate existing systems and possible backward compatibility issues, both of which could be tucked away.

No need to apologise - it didn’t take much convincing that this is the way forward. It’s already a fantastic little tool. It’s early days and I’m already really excited by where it will go :stuck_out_tongue: .