Skip to content

Commit

Permalink
update to latest params
Browse files Browse the repository at this point in the history
  • Loading branch information
cristifalcas committed May 8, 2017
1 parent cad130a commit 65ccd52
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 80 deletions.
65 changes: 19 additions & 46 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,11 @@
# The size in bytes for the label pair to fingerprints index cache.
#
# [*storage_local_max_chunks_to_persist*]
# How many chunks can be waiting for persistence before sample
# ingestion will be throttled. Many chunks waiting to be persisted will
# increase the checkpoint size.
# Deprecated. This flag has no effect anymore.
#
# [*storage_local_memory_chunks*]
# How many chunks to keep in memory. While the size of a chunk is
# 1kiB, the total memory usage will be significantly higher than this value
# * 1kiB. Furthermore, for various reasons, more chunks might have to be
# kept in memory temporarily. Sample ingestion will be throttled if the
# configured value is exceeded by more than 10%.
# Deprecated. If set, -storage.local.target-heap-size will be set to
# this value times 3072.
#
# [*storage_local_num_fingerprint_mutexes*]
# The number of mutexes used for fingerprint locking.
Expand Down Expand Up @@ -150,36 +145,12 @@
# 'adaptive' strategy, series files are sync'd for as long as the storage
# is not too much behind on chunk persistence.
#
# [*storage_remote_graphite_address*]
# The host:port of the remote Graphite server to send samples to.
# None, if empty.
#
# [*storage_remote_graphite_prefix*]
# The prefix to prepend to all metrics exported to Graphite. None, if
# empty.
#
# [*storage_remote_graphite_transport*]
# Transport protocol to use to communicate with Graphite. 'tcp', if
# empty.
#
# [*storage_remote_influxdb_url*]
# The URL of the remote InfluxDB server to send samples to. None, if
# empty.
#
# [*storage_remote_influxdb_database*]
# The name of the database to use for storing samples in InfluxDB.
#
# [*storage_remote_influxdb_retention_policy*]
# The InfluxDB retention policy to use.
#
# [*storage_remote_influxdb_username*]
# The username to use when sending samples to InfluxDB. The
# corresponding password must be provided via the INFLUXDB_PW environment
# variable.
#
# [*storage_remote_opentsdb_url*]
# The URL of the remote OpenTSDB server to send samples to. None, if
# empty.
# [*storage_local_target_heap_size*]
# The metrics storage attempts to limit its own memory usage such
# that the total heap size approaches this value. Note that this is not a
# hard limit. Actual heap size might be temporarily or permanently higher
# for a variety of reasons. The default value is a relatively safe setting
# to not use more than 3 GiB physical memory.
#
# == WEB ==
#
Expand All @@ -203,6 +174,13 @@
# [*web_listen_address*]
# Address to listen on for the web interface, API, and telemetry.
#
# [*web_max_connections*]
# Maximum number of simultaneous connections.
#
# [*web_read_timeout*]
# Maximum duration before timing out read of the request, and closing
# idle connections.
#
# [*web_route_prefix*]
# Prefix for the internal routes of web endpoints. Defaults to path
# of -web.external-url.
Expand Down Expand Up @@ -252,19 +230,14 @@
$storage_local_retention = $::prometheus::params::storage_local_retention,
$storage_local_series_file_shrink_ratio = $::prometheus::params::storage_local_series_file_shrink_ratio,
$storage_local_series_sync_strategy = $::prometheus::params::storage_local_series_sync_strategy,
$storage_remote_graphite_address = $::prometheus::params::storage_remote_graphite_address,
$storage_remote_graphite_prefix = $::prometheus::params::storage_remote_graphite_prefix,
$storage_remote_graphite_transport = $::prometheus::params::storage_remote_graphite_transport,
$storage_remote_influxdb_url = $::prometheus::params::storage_remote_influxdb_url,
$storage_remote_influxdb_database = $::prometheus::params::storage_remote_influxdb_database,
$storage_remote_influxdb_retention_policy = $::prometheus::params::storage_remote_influxdb_retention_policy,
$storage_remote_influxdb_username = $::prometheus::params::storage_remote_influxdb_username,
$storage_remote_opentsdb_url = $::prometheus::params::storage_remote_opentsdb_url,
$storage_local_target_heap_size = $::prometheus::params::storage_local_target_heap_size,
$web_console_libraries = $::prometheus::params::web_console_libraries,
$web_console_templates = $::prometheus::params::web_console_templates,
$web_enable_remote_shutdown = $::prometheus::params::web_enable_remote_shutdown,
$web_external_url = $::prometheus::params::web_external_url,
$web_listen_address = $::prometheus::params::web_listen_address,
$web_max_connections = $::prometheus::params::web_max_connections,
$web_read_timeout = $::prometheus::params::web_read_timeout,
$web_route_prefix = $::prometheus::params::web_route_prefix,
$web_telemetry_path = $::prometheus::params::web_telemetry_path,
$web_user_assets = $::prometheus::params::web_user_assets,
Expand Down
4 changes: 2 additions & 2 deletions manifests/node_exporter/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
class prometheus::node_exporter::service {
if $::prometheus::node_exporter::package_ensure == 'absent' {
$service_ensure ='stopped'
$service_enable = false
$service_enable = false
} else {
$service_ensure ='running'
$service_enable = true
$service_enable = true
}

service { 'node_exporter':
Expand Down
11 changes: 3 additions & 8 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,14 @@
$storage_local_retention = undef
$storage_local_series_file_shrink_ratio = undef
$storage_local_series_sync_strategy = undef
$storage_remote_graphite_address = undef
$storage_remote_graphite_prefix = undef
$storage_remote_graphite_transport = undef
$storage_remote_influxdb_url = undef
$storage_remote_influxdb_database = undef
$storage_remote_influxdb_retention_policy = undef
$storage_remote_influxdb_username = undef
$storage_remote_opentsdb_url = undef
$storage_local_target_heap_size = undef
$web_console_libraries = undef
$web_console_templates = undef
$web_enable_remote_shutdown = undef
$web_external_url = undef
$web_listen_address = ':9090'
$web_max_connections = undef
$web_read_timeout = undef
$web_route_prefix = undef
$web_telemetry_path = '/metrics'
$web_user_assets = undef
Expand Down
5 changes: 4 additions & 1 deletion metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cristifalcas-prometheus",
"version": "1.6.1",
"version": "2.0.0",
"author": "Cristian Falcas",
"summary": "Prometheus Puppet module",
"license": "Apache-2.0",
Expand All @@ -10,6 +10,9 @@
"dependencies": [{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 4.6.0 <5.0.0"
},{
"name": "cristifalcas/docker",
"version_requirement": ">= 5.5.0 <6.0.0"
}
],
"operatingsystem_support": [{
Expand Down
31 changes: 8 additions & 23 deletions templates/_prometheus.erb
Original file line number Diff line number Diff line change
Expand Up @@ -62,29 +62,8 @@
<% if @storage_local_series_sync_strategy -%>
-storage.local.series-sync-strategy=<%= scope['prometheus::storage_local_series_sync_strategy'] -%>
<% end -%>
<% if @storage_remote_graphite_address -%>
-storage.remote.graphite-address=<%= scope['prometheus::storage_remote_graphite_address'] -%>
<% end -%>
<% if @storage_remote_graphite_prefix -%>
-storage.remote.graphite-prefix=<%= scope['prometheus::storage_remote_graphite_prefix'] -%>
<% end -%>
<% if @storage_remote_graphite_transport -%>
-storage.remote.graphite-transport=<%= scope['prometheus::storage_remote_graphite_transport'] -%>
<% end -%>
<% if @storage_remote_influxdb_url -%>
-storage.remote.influxdb-url=<%= scope['prometheus::storage_remote_influxdb_url'] -%>
<% end -%>
<% if @storage_remote_influxdb_database -%>
-storage.remote.influxdb.database=<%= scope['prometheus::storage_remote_influxdb_database'] -%>
<% end -%>
<% if @storage_remote_influxdb_retention_policy -%>
-storage.remote.influxdb.retention-policy=<%= scope['prometheus::storage_remote_influxdb_retention_policy'] -%>
<% end -%>
<% if @storage_remote_influxdb_username -%>
-storage.remote.influxdb.username=<%= scope['prometheus::storage_remote_influxdb_username'] -%>
<% end -%>
<% if @storage_remote_opentsdb_url -%>
-storage.remote.opentsdb-url=<%= scope['prometheus::storage_remote_opentsdb_url'] -%>
<% if @storage_local_target_heap_size -%>
-storage.local.target-heap-size=<%= scope['prometheus::storage_local_target_heap_size'] -%>
<% end -%>
<% if @web_console_libraries -%>
-web.console.libraries=<%= scope['prometheus::web_console_libraries'] -%>
Expand All @@ -101,6 +80,12 @@
<% if @web_listen_address -%>
-web.listen-address=<%= scope['prometheus::web_listen_address'] -%>
<% end -%>
<% if @web_max_connections -%>
-web.max-connections=<%= scope['prometheus::web_max_connections'] -%>
<% end -%>
<% if @web_read_timeout -%>
-web.read-timeout=<%= scope['prometheus::web_read_timeout'] -%>
<% end -%>
<% if @web_route_prefix -%>
-web.route-prefix=<%= scope['prometheus::web_route_prefix'] -%>
<% end -%>
Expand Down

0 comments on commit 65ccd52

Please sign in to comment.