mirror of
https://github.com/elastic/logstash.git
synced 2025-06-28 17:53:28 -04:00
refactor list of license_types
DRY up the list of license types as there were 10 places that listed the types explicitly Fixes #11407
This commit is contained in:
parent
557e287966
commit
3294a4be61
8 changed files with 12 additions and 15 deletions
|
@ -11,7 +11,6 @@ module LogStash module Monitoring
|
|||
include LogStash::LicenseChecker::Licensed
|
||||
include LogStash::Helpers::ElasticsearchOptions
|
||||
include LogStash::Util::Loggable
|
||||
VALID_LICENSES = %w(basic trial standard gold platinum)
|
||||
FEATURE = 'monitoring'
|
||||
|
||||
def initialize(pipeline_config, agent)
|
||||
|
@ -68,7 +67,7 @@ module LogStash module Monitoring
|
|||
:log_level => :error,
|
||||
:log_message => 'Monitoring is not available: License information is currently unavailable. Please make sure you have added your production elasticsearch connection info in the xpack.monitoring.elasticsearch settings.'
|
||||
}
|
||||
elsif !xpack_info.license_one_of?(VALID_LICENSES)
|
||||
elsif !xpack_info.license_one_of?(::LogStash::LicenseChecker::LICENSE_TYPES)
|
||||
{
|
||||
:state => :error,
|
||||
:log_level => :error,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue