diff --git a/docs/checks/commands/check_service_linux.md b/docs/checks/commands/check_service_linux.md index 314454f1..1cd4cc5c 100644 --- a/docs/checks/commands/check_service_linux.md +++ b/docs/checks/commands/check_service_linux.md @@ -61,7 +61,7 @@ Naemon Config | critical | ( state not in ('running', 'oneshot', 'static') \|\| active = 'failed' ) && preset != 'disabled' | | empty-state | 3 (UNKNOWN) | | empty-syntax | %(status) - No services found | -| top-syntax | %(status) - %(crit_list) | +| top-syntax | %(status) - %{count} service(s) %(crit_list) | | ok-syntax | %(status) - All %(count) service(s) are ok. | | detail-syntax | \${name}=\${state} | diff --git a/docs/checks/commands/check_service_windows.md b/docs/checks/commands/check_service_windows.md index fa5fd1e0..26f7903f 100755 --- a/docs/checks/commands/check_service_windows.md +++ b/docs/checks/commands/check_service_windows.md @@ -50,16 +50,16 @@ Naemon Config ## Argument Defaults -| Argument | Default Value | -| ------------- | ------------------------------------------------ | -| filter | none | -| warning | state != 'running' && start_type = 'delayed' | -| critical | state != 'running' && start_type = 'auto' | -| empty-state | 3 (UNKNOWN) | -| empty-syntax | %(status) - No services found | -| top-syntax | %(status) - %(crit_list), delayed (%(warn_list)) | -| ok-syntax | %(status) - All %(count) service(s) are ok. | -| detail-syntax | \${name}=\${state} (\${start_type}) | +| Argument | Default Value | +| ------------- | -------------------------------------------------------------------- | +| filter | none | +| warning | state != 'running' && start_type = 'delayed' | +| critical | state != 'running' && start_type = 'auto' | +| empty-state | 3 (UNKNOWN) | +| empty-syntax | %(status) - No services found | +| top-syntax | %(status) - %{count} service(s) %(crit_list), delayed (%(warn_list)) | +| ok-syntax | %(status) - All %(count) service(s) are ok. | +| detail-syntax | \${name}=\${state} (\${start_type}) | ## Check Specific Arguments diff --git a/pkg/snclient/check_service_linux.go b/pkg/snclient/check_service_linux.go index 580d42d3..8cc257af 100644 --- a/pkg/snclient/check_service_linux.go +++ b/pkg/snclient/check_service_linux.go @@ -71,7 +71,7 @@ There is a specific [check_service for windows](../check_service_windows) as wel defaultFilter: "active != inactive", defaultCritical: stateCondition + " && preset != 'disabled'", detailSyntax: "${name}=${state}", - topSyntax: "%(status) - %(crit_list)", + topSyntax: "%(status) - %{count} service(s) %(crit_list)", okSyntax: "%(status) - All %(count) service(s) are ok.", emptySyntax: "%(status) - No services found", emptyState: CheckExitUnknown, diff --git a/pkg/snclient/check_service_windows.go b/pkg/snclient/check_service_windows.go index d2aa8bc3..bd063a3b 100644 --- a/pkg/snclient/check_service_windows.go +++ b/pkg/snclient/check_service_windows.go @@ -71,7 +71,7 @@ There is a specific [check_service for linux](../check_service_linux) as well.`, defaultCritical: "state != 'running' && start_type = 'auto'", defaultWarning: "state != 'running' && start_type = 'delayed'", detailSyntax: "${name}=${state} (${start_type})", - topSyntax: "%(status) - %(crit_list), delayed (%(warn_list))", + topSyntax: "%(status) - %{count} service(s) %(crit_list), delayed (%(warn_list))", okSyntax: "%(status) - All %(count) service(s) are ok.", emptySyntax: "%(status) - No services found", emptyState: CheckExitUnknown,