Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add env vars and env file path #616

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions manifests/elasticsearch_exporter.pp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
# Optional proxy server, with port number if needed. ie: https://example.com:8080
# @param proxy_type
# Optional proxy server type (none|http|https|ftp)
# @param env_vars
# hash with custom environment variables thats passed to the exporter via init script / unit file
# @param env_file_path
# The path to the file with the environmetn variable that is read from the init script/systemd unit
duonghoangle marked this conversation as resolved.
Show resolved Hide resolved
class prometheus::elasticsearch_exporter (
String[1] $cnf_uri,
String[1] $cnf_timeout,
Expand Down Expand Up @@ -89,6 +93,8 @@
Optional[Hash] $scrape_job_labels = undef,
Optional[String[1]] $proxy_server = undef,
Optional[Enum['none', 'http', 'https', 'ftp']] $proxy_type = undef,
Hash[String[1], Scalar] $env_vars = {},
Stdlib::Absolutepath $env_file_path = $prometheus::env_file_path,
) inherits prometheus {
#Please provide the download_url for versions < 0.9.0
$real_download_url = pick($download_url,"${download_url_base}/download/v${version}/${package_name}-${version}.${os}-${arch}.${download_extension}")
Expand Down Expand Up @@ -134,5 +140,7 @@
scrape_job_labels => $scrape_job_labels,
proxy_server => $proxy_server,
proxy_type => $proxy_type,
env_vars => $env_vars,
env_file_path => $env_file_path,
}
}