Sensu-go: Agents not joining non-default organizations

Created on 13 Feb 2018  路  4Comments  路  Source: sensu/sensu-go

After creating a new organization (e.g. home) and having an agent start with the --organization home parameters, the agent is not shown via the sensuctl entity list --organization home command.

screen shot 2018-02-13 at 12 38 21 pm

bug

Most helpful comment

I think we should create a default environment when we create an organization.

We should probably issue log.Fatal, or whatever the logrus equivalent is (which calls os.Exit(1) after logging) when the org/env does not exist.

All 4 comments

@amdprophet I have it working with ENV vars, I wonder if it's isolated to the CLI args.

@nikkiattea and I were able to track this down to the environment missing. I had assumed that a default environment would be created when an organization is created. Perhaps we should consider creating a default environment on organization creation?

The agent will currently continue to run without any errors when an org/env does not exist. I think we should return an error to the agent (and os.Exit(1)) in this case so users do not have to dig through backend logs to realize that their agent isn't actually connected.

I think we should create a default environment when we create an organization.

We should probably issue log.Fatal, or whatever the logrus equivalent is (which calls os.Exit(1) after logging) when the org/env does not exist.

Was this page helpful?
0 / 5 - 0 ratings