# check_rancher2 command definition object CheckCommand "check_rancher2" { import "plugin-check-command" command = [ "/usr/lib/nagios/plugins/check_rancher2.sh" ] arguments = { "-H" = { description = "Address of Rancher 2 API (e.g. rancher.example.com)" value = "$rancher2_address$" } "-U" = { description = "API username (Access Key)" value = "$rancher2_username$" } "-P" = { description = "API password (Secret Key)" value = "$rancher2_password$" } "-S" = { description = "Use https instead of http" set_if = "$rancher2_ssl$" } "-s" = { description = "Allow self-signed certificates" set_if = "$rancher2_selfsigned_cert$" } "-t" = { description = "Check type (see list below for available check types)" value = "$rancher2_type$" } "-c" = { description = "Cluster name (for specific cluster check)" value = "$rancher2_cluster$" } "-p" = { description = "Project name (for specific project check, needed for workload checks)" value = "$rancher2_project$" } "-n" = { description = "Namespace name (needed for specific pod checks)" value = "$rancher2_namespace$" } "-w" = { description = "Workload name (for specific workload check)" value = "$rancher2_workload$" } "-o" = { description = "Pod name (for specific pod check, this makes only sense if you use static pods)" value = "$rancher2_pod$" } "-i" = { description = "Comma-separated list of status(es) to ignore (currently only supported in node check type)" value = "$rancher2_ignore$" } "--cpu-warn" = { description = "Exit with WARNING status if more than PERCENT of cpu capacity is used (currently only supported in cluster specific node and cluster check type)" value = "$rancher2_cpu_warn$" } "--cpu-crit" = { description = "Exit with CRITICAL status if more than PERCENT of cpu capacity is used (currently only supported in cluster specific node and cluster check type)" value = "$rancher2_cpu_crit$" } "--memory-warn" = { description = "Exit with WARNING status if more than PERCENT of mem capacity is used (currently only supported in cluster specific node and cluster check type)" value = "$rancher2_memory_warn$" } "--memory-crit" = { description = "Exit with CRITICAL status if more than PERCENT of mem capacity is used (currently only supported in cluster specific node and cluster check type)" value = "$rancher2_memory_crit$" } "--pods-warn" = { description = "Exit with WARNING status if more than PERCENT of pod capacity is used (currently only supported in cluster specific node and cluster check type)" value = "$rancher2_pods_warn$" } "--pods-crit" = { description = "Exit with CRITICAL status if more than PERCENT of pod capacity is used (currently only supported in cluster specific node and cluster check type)" value = "$rancher2_pods_crit$" } "--cert-warn" = { description = "Warning threshold in days to warn before a certificate expires (supported check types: local-certs)" value = "$rancher2_cert_warn$" } "-h" = { description = "Help. I need somebody. Help. Not just anybody. Heeeeeelp!" set_if = "$rancher2_help$" } } vars.rancher2_address = "$address$" # If you only run one Rancher2, you can define api access here, too: #vars.rancher2_username = "token-XXXXX" #vars.rancher2_password = "iWahca3ohngeiReedeingaiiWahca3ohngeiReedeingai432k1dda" #vars.rancher2_ssl = true #vars.rancher2_selfsigned_cert = false }