sensu / sensu-go

Simple. Scalable. Multi-cloud monitoring.
https://sensu.io
MIT License
1.03k stars 175 forks source link

Feature Request: Expose sensu license as part of sensuctl env. #3823

Closed jspaleta closed 4 years ago

jspaleta commented 4 years ago

Feature Suggestion

Expose sensu license as part of sensuctl env as SENSU_LICENSE_FILE into sensuctl has ability to read the license key

Possible Implementation

Context

This would lower the bar a little bit to develop/test/debug sensuctl commands and other sensu plugins that will be making use of the sensu-plugin-sdk feature that requires this envvar to be set and valid.

nikkictl commented 4 years ago

Could you provide a little more context about the requirement for developing/testing/debugging sensuctl commands and plugins? The sdk will be responsible for checking the presence of the env var and the validity of the license.

Exposing the sensu license as an env var for testing can simply be done with the following command:

SENSU_LICENSE_FILE=$(sensuctl license info --format json)

You can also set and retrieve env vars in go programs and tests by using the os package.

portertech commented 4 years ago

Given @nikkictl's fantastic suggestion, I am going to close this issue. It feels unnecessary to expose the license file on operator hosts unless specifically required for commercial handler asset development (likely just Sensu Inc.).