|
29 | 29 | * [`cache_update_linux`](#cache_update_linux): Updates the targets update cache. For RHEL/CentOS this means a `yum clean expire-cache`. For Debian this means a `apt update`. |
30 | 30 | * [`cache_update_windows`](#cache_update_windows): Updates the targets update cache. For Windows this means a Windows Update refresh. |
31 | 31 | * [`history`](#history): Reads the update history from the JSON 'result_file'. |
| 32 | +* [`monitoring_multiple`](#monitoring_multiple): Enable or disable monitoring alerts for multiple monitoring services at once. |
| 33 | +* [`monitoring_prometheus`](#monitoring_prometheus): Create or remove alert silences for hosts in Prometheus. |
32 | 34 | * [`monitoring_solarwinds`](#monitoring_solarwinds): Enable or disable monitoring alerts on hosts in SolarWinds. |
33 | 35 | * [`post_update`](#post_update): Run post-update script on target host(s), only if it exists. If the script doesn't exist or isn't executable, then this task succeeds (this a |
34 | 36 | * [`pre_post_update_linux`](#pre_post_update_linux): Pre-post-update definition to make bolt not throw a warning. Best to use pre_update or post_update directly. |
|
54 | 56 | * [`patching::deploy_scripts`](#patchingdeploy_scripts): |
55 | 57 | * [`patching::get_facts`](#patchingget_facts): Sets patching facts on targets |
56 | 58 | * [`patching::get_targets`](#patchingget_targets): <code>get_targets()</code> except it also performs online checks and gathers facts in one step. |
57 | | -* [`patching::monitoring_solarwinds`](#patchingmonitoring_solarwinds): Creates or deletes VM snapshots on targets in VMware. |
| 59 | +* [`patching::monitoring_multiple`](#patchingmonitoring_multiple): Enable or disable monitoring alerts for multiple monitoring services at once. |
| 60 | +* [`patching::monitoring_prometheus`](#patchingmonitoring_prometheus): Create or remove alert silences for hosts in Prometheus. |
| 61 | +* [`patching::monitoring_solarwinds`](#patchingmonitoring_solarwinds): Enable or disable monitoring alerts on hosts in SolarWinds. |
58 | 62 | * [`patching::ordered_groups`](#patchingordered_groups): Takes a set of targets then groups and sorts them by the <code>patching_order</code> var set on the target. |
59 | 63 | * [`patching::post_update`](#patchingpost_update): Executes a custom post-update script on each node. |
60 | 64 | * [`patching::pre_post_update`](#patchingpre_post_update): Common entry point for executing the pre/post update custom scripts |
@@ -496,6 +500,44 @@ Data type: `Optional[String[1]]` |
496 | 500 |
|
497 | 501 | Log file for patching results. This file will contain the JSON output that is returned from these tasks. This is data that was written by patching::update. If no script name is passed on Linux hosts a default is used: /var/log/patching.json. If no script name is passed on Windows hosts a default is used: C:/ProgramData/PuppetLabs/patching/patching.json |
498 | 502 |
|
| 503 | +### monitoring_prometheus |
| 504 | + |
| 505 | +Create or remove alert silences for hosts in Prometheus. |
| 506 | + |
| 507 | +**Supports noop?** true |
| 508 | + |
| 509 | +#### Parameters |
| 510 | + |
| 511 | +##### `targets` |
| 512 | + |
| 513 | +Data type: `Variant[String[1], Array[String[1]]]` |
| 514 | + |
| 515 | +List of hostnames or IP addresses for targets in SolarWinds that will have monitoring alerts either enabled or disabled. |
| 516 | + |
| 517 | +##### `action` |
| 518 | + |
| 519 | +Data type: `Enum['enable', 'disable']` |
| 520 | + |
| 521 | +Action to perform on monitored targets. 'enable' will enable monitoring alerts. 'disable' will disable monitoring alerts on targets. |
| 522 | + |
| 523 | +##### `prometheus_server` |
| 524 | + |
| 525 | +Data type: `String[1]` |
| 526 | + |
| 527 | +FQDN of the Prometheus server to create an alert silence for |
| 528 | + |
| 529 | +##### `silence_duration` |
| 530 | + |
| 531 | +Data type: `Optional[Integer]` |
| 532 | + |
| 533 | +How long the alert silence will be alive for |
| 534 | + |
| 535 | +##### `silence_units` |
| 536 | + |
| 537 | +Data type: `Optional[Enum['minutes', 'hours', 'days', 'weeks']]` |
| 538 | + |
| 539 | +Goes with the silence duration to determine how long the alert silence will be alive for |
| 540 | + |
499 | 541 | ### monitoring_solarwinds |
500 | 542 |
|
501 | 543 | Enable or disable monitoring alerts on hosts in SolarWinds. |
@@ -1290,6 +1332,156 @@ Data type: `TargetSpec` |
1290 | 1332 |
|
1291 | 1333 | Set of targets to run against. |
1292 | 1334 |
|
| 1335 | +### patching::monitoring_multiple |
| 1336 | + |
| 1337 | +Disable monitoring for targets in multiple services |
| 1338 | + |
| 1339 | +#### Examples |
| 1340 | + |
| 1341 | +##### Remote target definition for $monitoring_target |
| 1342 | + |
| 1343 | +```puppet |
| 1344 | +vars: |
| 1345 | + patching_monitoring_plan: 'patching::monitoring_multiple' |
| 1346 | + patching_monitoring_plan_multiple: |
| 1347 | + - plan: 'patching::monitoring_solarwinds' |
| 1348 | + target: 'solarwinds' |
| 1349 | + - plan: 'patching::monitoring_prometheus' |
| 1350 | + target: 'prometheus' |
| 1351 | +
|
| 1352 | +groups: |
| 1353 | + - name: solarwinds |
| 1354 | + config: |
| 1355 | + transport: remote |
| 1356 | + remote: |
| 1357 | + port: 17778 |
| 1358 | + username: 'domain\svc_bolt_sw' |
| 1359 | + password: |
| 1360 | + _plugin: pkcs7 |
| 1361 | + encrypted_value: > |
| 1362 | + ENC[PKCS7,xxx] |
| 1363 | + targets: |
| 1364 | + - solarwinds.domain.tld |
| 1365 | +
|
| 1366 | + - name: prometheus |
| 1367 | + config: |
| 1368 | + transport: remote |
| 1369 | + remote: |
| 1370 | + username: 'domain\prom_user' |
| 1371 | + password: |
| 1372 | + _plugin: pkcs7 |
| 1373 | + encrypted_value: > |
| 1374 | + ENC[PKCS7,xxx] |
| 1375 | + targets: |
| 1376 | + - prometheus.domain.tld |
| 1377 | +``` |
| 1378 | + |
| 1379 | +#### Parameters |
| 1380 | + |
| 1381 | +The following parameters are available in the `patching::monitoring_multiple` plan. |
| 1382 | + |
| 1383 | +##### `targets` |
| 1384 | + |
| 1385 | +Data type: `TargetSpec` |
| 1386 | + |
| 1387 | +Set of targets to run against. |
| 1388 | + |
| 1389 | +##### `action` |
| 1390 | + |
| 1391 | +Data type: `Enum['enable', 'disable']` |
| 1392 | + |
| 1393 | +What action to perform on the monitored targets: |
| 1394 | + |
| 1395 | + - `enable` Resumes monitoring alerts |
| 1396 | + - 'disable' Supresses monitoring alerts |
| 1397 | + |
| 1398 | +##### `monitoring_plan` |
| 1399 | + |
| 1400 | +Data type: `Array` |
| 1401 | + |
| 1402 | +List of monitoring plans to run if multiple monitoring services need to be enabled/disabled. |
| 1403 | + |
| 1404 | +Default value: `.vars['patching_monitoring_target']` |
| 1405 | + |
| 1406 | +##### `noop` |
| 1407 | + |
| 1408 | +Data type: `Boolean` |
| 1409 | + |
| 1410 | +Flag to enable noop mode. When noop mode is enabled no snapshots will be created or deleted. |
| 1411 | + |
| 1412 | +Default value: `false` |
| 1413 | + |
| 1414 | +### patching::monitoring_prometheus |
| 1415 | + |
| 1416 | +Create or remove alert silences for hosts in Prometheus. |
| 1417 | + |
| 1418 | +#### Examples |
| 1419 | + |
| 1420 | +##### Remote target definition for $monitoring_target |
| 1421 | + |
| 1422 | +```puppet |
| 1423 | +vars: |
| 1424 | + patching_monitoring_target: 'prometheus' |
| 1425 | + patching_monitoring_silence_duration: 24 |
| 1426 | + patching_monitoring_silence_units: 'hours' |
| 1427 | +
|
| 1428 | +groups: |
| 1429 | + - name: prometheus |
| 1430 | + config: |
| 1431 | + transport: remote |
| 1432 | + remote: |
| 1433 | + username: 'domain\prom_user' |
| 1434 | + password: |
| 1435 | + _plugin: pkcs7 |
| 1436 | + encrypted_value: > |
| 1437 | + ENC[PKCS7,xxx] |
| 1438 | + targets: |
| 1439 | + - prometheus.domain.tld |
| 1440 | +``` |
| 1441 | + |
| 1442 | +#### Parameters |
| 1443 | + |
| 1444 | +The following parameters are available in the `patching::monitoring_prometheus` plan. |
| 1445 | + |
| 1446 | +##### `targets` |
| 1447 | + |
| 1448 | +Data type: `TargetSpec` |
| 1449 | + |
| 1450 | +Set of targets to run against. |
| 1451 | + |
| 1452 | +##### `action` |
| 1453 | + |
| 1454 | +Data type: `Enum['enable', 'disable']` |
| 1455 | + |
| 1456 | +What action to perform on the monitored targets: |
| 1457 | + |
| 1458 | + - `enable` Resumes monitoring alerts |
| 1459 | + - 'disable' Supresses monitoring alerts |
| 1460 | + |
| 1461 | +##### `monitoring_silence_duration` |
| 1462 | + |
| 1463 | +Data type: `Optional[Integer]` |
| 1464 | + |
| 1465 | +How long the alert silence will be alive for |
| 1466 | + |
| 1467 | +Default Value: `.vars['patching_monitoring_silence_duration']` |
| 1468 | + |
| 1469 | +##### `monitoring_silence_units` |
| 1470 | + |
| 1471 | +Data type: `Optional[Enum['minutes', 'hours', 'days', 'weeks']]` |
| 1472 | + |
| 1473 | +Goes with the silence duration to determine how long the alert silence will be alive for |
| 1474 | + |
| 1475 | +Default Value: `.vars['patching_monitoring_silence_units']` |
| 1476 | + |
| 1477 | +##### `noop` |
| 1478 | + |
| 1479 | +Data type: `Boolean` |
| 1480 | + |
| 1481 | +Flag to enable noop mode. When noop mode is enabled no snapshots will be created or deleted. |
| 1482 | + |
| 1483 | +Default value: `false` |
| 1484 | + |
1293 | 1485 | ### patching::monitoring_solarwinds |
1294 | 1486 |
|
1295 | 1487 | Communicates to the vSphere API from the local Bolt control node using |
|
0 commit comments