-
-
Notifications
You must be signed in to change notification settings - Fork 241
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
Feature/multiple rules files #166
Feature/multiple rules files #166
Conversation
manifests/init.pp
Outdated
@@ -158,6 +158,7 @@ | |||
Array $remote_read_configs = $::prometheus::params::remote_read_configs, | |||
Array $remote_write_configs = $::prometheus::params::remote_write_configs, | |||
$alerts = $::prometheus::params::alerts, | |||
$extra_alerts = {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a datatype for this new parmeter and documentation in the header.
manifests/alerts.pp
Outdated
@@ -11,29 +11,32 @@ | |||
# [*alertfile_name*] | |||
# Filename to use when storing the alerts file | |||
# | |||
class prometheus::alerts ( | |||
String $location, | |||
define prometheus::alerts ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please write a spec file with unit tests for this new defined resource?
manifests/alerts.pp
Outdated
Variant[Array,Hash] $alerts, | ||
String $alertfile_name = $prometheus::params::alertfile_name, | ||
) inherits prometheus::params { | ||
String $location = "$::prometheus::config_dir/rules", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please adjust the documenation in the header
Hi @zipkid , thanks for the PR. I added some inline comments. |
e241bb1
to
0446853
Compare
@bastelfreak Comments handled and spec test added. |
) inherits prometheus::params { | ||
if ( versioncmp($::prometheus::version, '2.0.0') < 0 ){ | ||
file { "${location}/${alertfile_name}": | ||
String $location = "${::prometheus::config_dir}/rules", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Datatypes \o/
This looks good to me. @tuxmea can you review this as well? |
Needs a major version bump as interface changes from class to define. |
I am willing to bump the version but unsure about the actions / steps to do it.... |
@zipkid, don't worry. We will deal with this in our release workflow. |
…iles Feature/multiple rules files
Allow the use of multiple alert rules files.