sensu / sensu-puppet

Sensu Puppet module.
https://github.com/sensu/sensu-puppet
MIT License
165 stars 290 forks source link

more relaxed data types for Annotations #1344

Open elfranne opened 12 hours ago

elfranne commented 12 hours ago

Annotations data type is too restricted, that makes it not compatible with remediation for example: https://github.com/sensu/sensu-remediation-handler?tab=readme-ov-file#example-check-definition-and-remediation-request-configuration

  sensu_check { 'check-puppet-errors-with-remidiation':
    ensure         => present,
    command        => 'check-puppet-errors',
    interval       => 300,
    subscriptions  => ['linux'],
    runtime_assets => ['nmollerup/sensu-check-puppet'],
    annotations    => {
      'comment'                                                    => 'The last Puppet run had failures. Investigation needed',
      'io.sensu.remediation.config.actions'                        => [
        {
          'description' => 'Retry another Puppet run.',
          'request'     => 'remediation-puppet-linux',
          'occurrences' => [1],
          'severities'  => [1,2]
        },
      ],
    },
    handlers       => ['remediation'],
  }