Staging instance, all changes can be removed at any time

Skip to content

agent_checks: Install check_systemd plugin and command

Install only the command, not the alert yet.

Related to T3497

Test Plan

octo-diff:

$ bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging pergamon
Found host pergamon.softwareheritage.org
...
*******************************************
+ Concat::Fragment[icinga2::object::CheckCommand::check_systemd] =>
   parameters =>
      "order": 15
      "target": "/etc/icinga2/conf.d/swh-plugins.conf"
      "content": >>>

object CheckCommand "check_systemd" {
  import "plugin-check-command"

  command = "/usr/lib/nagios/plugins/check_systemd"
  arguments = {
    "--unit" = {
      value = "$check_systemd_unit$"
      description = "Name of the systemd unit that is being tested."
    }
  }
}
<<<
*******************************************
+ Concat_fragment[icinga2::object::CheckCommand::check_systemd] =>
   parameters =>
      "order": 15
      "tag": "_etc_icinga2_conf.d_swh-plugins.conf"
      "target": "/etc/icinga2/conf.d/swh-plugins.conf"
      "content": >>>

object CheckCommand "check_systemd" {
  import "plugin-check-command"

  command = "/usr/lib/nagios/plugins/check_systemd"
  arguments = {
    "--unit" = {
      value = "$check_systemd_unit$"
      description = "Name of the systemd unit that is being tested."
    }
  }
}
<<<
...
+ Icinga2::Object::Checkcommand[check_systemd] =>
   parameters =>
      "arguments": {"--unit"=>{"value"=>"$check_systemd_unit$", "description"=>"Name of the systemd unit that is being tested."}}
      "checkcommand_name": "check_systemd"
      "command": "/usr/lib/nagios/plugins/check_systemd"
      "ensure": "present"
      "import": ["plugin-check-command"]
      "order": 15
      "target": "/etc/icinga2/conf.d/swh-plugins.conf"
      "template": false
*******************************************
+ Icinga2::Object[icinga2::object::CheckCommand::check_systemd] =>
   parameters =>
      "apply": false
      "assign": []
      "attrs": {"command"=>"/usr/lib/nagios/plugins/check_systemd", "arguments"=>{"--unit"=>{"value"=>"$check_systemd_unit$", "description"=>"Name of the systemd unit that is being tested."}}}
      "attrs_list": ["command", "env", "timeout", "arguments", "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": []
      "import": ["plugin-check-command"]
      "object_name": "check_systemd"
      "object_type": "CheckCommand"
      "order": 15
      "prefix": false
      "target": "/etc/icinga2/conf.d/swh-plugins.conf"
      "template": false
*******************************************
+ Package[monitoring-plugins-systemd] =>
   parameters =>
      "ensure": "present"
*******************************************
*** End octocatalog-diff on pergamon.softwareheritage.org

Migrated from D6124 (view on Phabricator)

Merge request reports

Loading