Skip to content

Commit

Permalink
Fixed #130 missing perf data on check_service (intentionally no perf …
Browse files Browse the repository at this point in the history
…for "all services" as that is a long list)
  • Loading branch information
mickem committed Mar 30, 2016
1 parent 4fca7fa commit 179dc4f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/CheckSystem/CheckSystem.cpp
Expand Up @@ -749,7 +749,7 @@ void CheckSystem::check_service(const Plugin::QueryRequestMessage::Request &requ
filter_helper.add_options("not state_is_perfect()", "not state_is_ok()", "", filter.get_filter_syntax(), "unknown");
filter_helper.add_syntax("${status}: ${crit_list}, delayed (${warn_list})", filter.get_filter_syntax(), "${name}=${state} (${start_type})", "${name}", "%(status): No services found", "%(status): All %(count) service(s) are ok.");
filter_helper.get_desc().add_options()
("computer", po::value<std::string>(&computer), "THe name of the remote computer to check")
("computer", po::value<std::string>(&computer), "The name of the remote computer to check")
("service", po::value<std::vector<std::string>>(&services), "The service to check, set this to * to check all services")
("exclude", po::value<std::vector<std::string>>(&excludes), "A list of services to ignore (mainly usefull in combination with service=*)")
("type", po::value<std::string>(&type)->default_value("service"), "The types of services to enumerate available types are driver, file-system-driver, kernel-driver, service, service-own-process, service-share-process")
Expand Down Expand Up @@ -779,6 +779,9 @@ void CheckSystem::check_service(const Plugin::QueryRequestMessage::Request &requ

if (services.empty()) {
services.push_back("*");
} else {
if (filter_helper.data.perf_config.empty())
filter_helper.data.perf_config = "extra(state)";
}
if (!filter_helper.build_filter(filter))
return;
Expand Down

0 comments on commit 179dc4f

Please sign in to comment.