Page MenuHomeSoftware Heritage

icinga: monitor puppet agent activation
ClosedPublic

Authored by vsellier on Tue, Feb 9, 9:37 AM.

Details

Summary

Raise a warning if puppet is disabled for 4h and a critical alert
if it's disabled for more than 24h

Related to T2566

Test Plan
diff origin/production/pergamon.softwareheritage.org current/pergamon.softwareheritage.org
*******************************************
+ Concat::Fragment[icinga2::object::Service::puppet_agent] =>
   parameters =>
     "content": "\napply Service \"puppet_agent\" {\n  import \"generic-service\"...
     "order": 60,
     "target": "/etc/icinga2/zones.d/global-templates/services.conf"
*******************************************
+ Concat_fragment[icinga2::object::Service::puppet_agent] =>
   parameters =>
     "content": "\napply Service \"puppet_agent\" {\n  import \"generic-service\"...
     "order": 60,
     "tag": "_etc_icinga2_zones.d_global-templates_services.conf",
     "target": "/etc/icinga2/zones.d/global-templates/services.conf"
*******************************************
+ Icinga2::Object::Service[puppet_agent] =>
   parameters =>
     "apply": true,
     "assign": [
       "host.vars.os == Linux"
     ],
     "check_command": "file_age",
     "command_endpoint": "host.name",
     "ensure": "present",
     "ignore": [
       "host.vars.noagent"
     ],
     "import": [
       "generic-service"
     ],
     "order": 60,
     "prefix": false,
     "service_name": "puppet_agent",
     "target": "/etc/icinga2/zones.d/global-templates/services.conf",
     "template": false,
     "vars": {
       "file_age_file": "/var/lib/puppet/state/agent_disabled.lock",
       "file_age_warning_time": "240",
       "file_age_critical_time": "1440",
       "file_age_ignore_missing": "true"
     }
*******************************************
+ Icinga2::Object[icinga2::object::Service::puppet_agent] =>
   parameters =>
     "apply": true,
     "assign": [
       "host.vars.os == Linux"
     ],
     "attrs": {
       "check_command": "file_age",
       "command_endpoint": "host.name",
       "vars": {
         "file_age_file": "/var/lib/puppet/state/agent_disabled.lock",
         "file_age_warning_time": "240",
         "file_age_critical_time": "1440",
         "file_age_ignore_missing": "true"
       }
     },
     "attrs_list": [
       "display_name",
       "host_name",
       "check_command",
       "check_timeout",
       "check_interval",
       "check_period",
       "retry_interval",
       "max_check_attempts",
       "groups",
       "enable_notifications",
       "enable_active_checks",
       "enable_passive_checks",
       "enable_event_handler",
       "enable_flapping",
       "enable_perfdata",
       "event_command",
       "flapping_threshold_low",
       "flapping_threshold_high",
       "volatile",
       "zone",
       "command_endpoint",
       "notes",
       "notes_url",
       "action_url",
       "icon_image",
       "icon_image_alt",
       "vars",
       "Acknowledgement",
       "ApiBindHost",
       "ApiBindPort",
       "ApiEnvironment",
       "ApplicationType",
       "AttachDebugger",
       "BuildCompilerName",
       "BuildCompilerVersion",
       "BuildHostName",
       "Concurrency",
       "Critical",
       "Custom",
       "Deprecated",
       "Down",
       "DowntimeEnd",
       "DowntimeRemoved",
       "DowntimeStart",
       "Environment",
       "FlappingEnd",
       "FlappingStart",
       "HostDown",
       "HostUp",
       "IncludeConfDir",
       "Internal",
       "Json",
       "LocalStateDir",
       "LogCritical",
       "LogDebug",
       "LogInformation",
       "LogNotice",
       "LogWarning",
       "Math",
       "MaxConcurrentChecks",
       "ModAttrPath",
       "NodeName",
       "OK",
       "ObjectsPath",
       "PidPath",
       "PkgDataDir",
       "PlatformArchitecture",
       "PlatformKernel",
       "PlatformKernelVersion",
       "PlatformName",
       "PlatformVersion",
       "PrefixDir",
       "Problem",
       "Recovery",
       "RunAsGroup",
       "RunAsUser",
       "RunDir",
       "ServiceCritical",
       "ServiceOK",
       "ServiceUnknown",
       "ServiceWarning",
       "StatePath",
       "SysconfDir",
       "System",
       "Types",
       "Unknown",
       "Up",
       "UseVfork",
       "VarsPath",
       "Warning",
       "ZonesDir",
       "NodeName",
       "ZoneName",
       "TicketSalt",
       "PluginDir",
       "PluginContribDir",
       "ManubulonPluginDir",
       "name",
       "NodeName",
       "ZoneName",
       "TicketSalt",
       "PluginDir",
       "PluginContribDir",
       "ManubulonPluginDir",
       "name"
     ],
     "ensure": "present",
     "ignore": [
       "host.vars.noagent"
     ],
     "import": [
       "generic-service"
     ],
     "object_name": "puppet_agent",
     "object_type": "Service",
     "order": 60,
     "prefix": false,
     "target": "/etc/icinga2/zones.d/global-templates/services.conf",
     "template": false
*******************************************
*** End octocatalog-diff on pergamon.softwareheritage.org

Diff Detail

Repository
rSPSITE puppet-swh-site
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vsellier created this revision.
vsellier edited the test plan for this revision. (Show Details)
vsellier added a subscriber: System administrators.
vsellier removed a subscriber: System administrators.
This revision is now accepted and ready to land.Tue, Feb 9, 9:42 AM