Skip to content

Conversation

@jschoewe
Copy link
Contributor

@jschoewe jschoewe commented Dec 3, 2020

Added bolt plan to enable/disable monitoring in prometheus by changing a puppet fact on the node. Also added script to refresh Prometheus targets from puppetdb with the matching fact and prometheus resource

…g a puppet fact on the node. Also added script to refresh Prometheus targets from puppetdb with the matching fact and prometheus resource
…recreating the targets file. Also added plan for enabling/disabling monitoring on prometheus and solarwinds simultaneously

# Loop over and run each monitoring plan
$monitoring_plan.each |String $plan| {
run_plan($plan, $targets,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# without a monitoring_target override
patching_monitoring_plan_multiple:
  - plan: 'patching::monitoring_solarwinds'
  - plan: 'patching::monitoring_prometheus'
# override monitoring targets
patching_monitoring_plan_multiple:
  - plan: 'patching::monitoring_solarwinds':
    monitoring_target: 'prod_solarwinds'
  - plan: 'patching::monitoring_prometheus':
    monitoring_target: 'prod_prometheus'

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  $monitoring_plan.each |Hash $plan_hash| {
   if $plan_hash['monitoring_target'] {   
    run_plan($plan_hash['plan'], $targets,
      monitoring_target => $plan_hash['monitoring_target'])
   }
   else {
    run_plan($plan_hash['plan'], $targets, ...)
  }
}

@nmaludy
Copy link
Member

nmaludy commented Jan 13, 2021

@jschoewe i think you just need to get build to pass

@bishopbm1
Copy link
Contributor

@nmaludy can this be merged?

@nmaludy nmaludy merged commit b686418 into EncoreTechnologies:master Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants