forked from puppetlabs/puppet_metrics_dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow port numbers of services to be specified
This commit updates the master_list, puppetdb_list, and postgres_host_list parameters to allow pairs of `[hostname, port_number]` in addition to just a hostname. If the port number is specified, then Telegraf will be configured to use that port when requesting metrics from the host. If no port number is specified, then Telegraf will be configured to use the default prts of 8140 for Puppet Server, 8081 for PuppetDB, and 5432 for Postgres. Closes puppetlabs#48
- Loading branch information
Showing
7 changed files
with
153 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
spec/type_aliases/puppet_metrics_dashboard_host_list_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
require 'spec_helper' | ||
|
||
describe 'Puppet_metrics_dashboard::HostList' do | ||
it do | ||
is_expected.to allow_value(['some-host.test', | ||
'some-other.host.test']) | ||
end | ||
it do | ||
is_expected.to allow_value(['some-host.test', | ||
['some-other.host.test', 9140]]) | ||
end | ||
|
||
it do | ||
is_expected.not_to allow_value([['some-host.test', '9140']]) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# A list of hostnames, or pairs of hostname and port. | ||
type Puppet_metrics_dashboard::HostList = Array[ | ||
Variant[ | ||
String, | ||
Tuple[String, Integer] | ||
] | ||
] |