}
}
+ if(g_dstates.getCopy().empty()) {
+ errlog("No downstream servers defined: all packets will get dropped");
+ // you might define them later, but you need to know
+ }
+
for(auto& dss : g_dstates.getCopy()) { // it is a copy, but the internal shared_ptrs are the real deal
if(dss->availability==DownstreamState::Availability::Auto) {
- bool newState=upCheck(dss->remote);
- warnlog("Marking downstream %s as '%s'", dss->getName(), newState ? "up" : "down");
+ bool newState=upCheck(dss->remote, dss->checkName, dss->checkType, dss->mustResolve);
+ warnlog("Marking downstream %s as '%s'", dss->remote.toStringWithPort(), newState ? "up" : "down");
dss->upStatus = newState;
}
}
{"latency-avg10000", &latencyAvg10000}, {"latency-avg1000000", &latencyAvg1000000},
{"uptime", uptimeOfProcess},
{"real-memory-usage", getRealMemoryUsage},
- {"fd-usage", getOpenFileDescriptors},
- {"noncompliant-queries", &nonCompliantQueries}
++ {"noncompliant-queries", &nonCompliantQueries},
+ {"cpu-user-msec", getCPUTimeUser},
+ {"cpu-sys-msec", getCPUTimeSystem},
+ {"fd-usage", getOpenFileDescriptors}
};
};