From: Otto Moerbeek Date: Wed, 4 Nov 2020 09:35:18 +0000 (+0100) Subject: snmp-master-socket -> snmp-daemon-socket X-Git-Tag: rec-4.5.0-alpha1~79^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=485e415b3a4f795b7500cc8ce76c38fb3eadb289;p=thirdparty%2Fpdns.git snmp-master-socket -> snmp-daemon-socket --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index 94ddd976b3..4c06ffe5de 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -4881,7 +4881,11 @@ static int serviceMain(int argc, char*argv[]) blacklistStats(StatComponent::SNMP, ::arg()["stats-snmp-blacklist"]); if (::arg().mustDo("snmp-agent")) { - g_snmpAgent = std::make_shared("recursor", ::arg()["snmp-master-socket"]); + string setting = ::arg()["snmp-daemon-socket"]; + if (setting.empty()) { + setting = ::arg()["snmp-master-socket"]; + } + g_snmpAgent = std::make_shared("recursor", setting); g_snmpAgent->run(); } @@ -5372,7 +5376,8 @@ int main(int argc, char **argv) ::arg().setSwitch("reuseport","Enable SO_REUSEPORT allowing multiple recursors processes to listen to 1 address")="no"; ::arg().setSwitch("snmp-agent", "If set, register as an SNMP agent")="no"; - ::arg().set("snmp-master-socket", "If set and snmp-agent is set, the socket to use to register to the SNMP master")=""; + ::arg().set("snmp-master-socket", "If set and snmp-agent is set, the socket to use to register to the SNMP daemon (deprecated)")=""; + ::arg().set("snmp-daemon-socket", "If set and snmp-agent is set, the socket to use to register to the SNMP daemon")=""; std::string defaultBlacklistedStats = "cache-bytes, packetcache-bytes, special-memory-usage"; for (size_t idx = 0; idx < 32; idx++) { diff --git a/pdns/recursordist/docs/settings.rst b/pdns/recursordist/docs/settings.rst index c5f5a9cc31..369e3fef67 100644 --- a/pdns/recursordist/docs/settings.rst +++ b/pdns/recursordist/docs/settings.rst @@ -1549,12 +1549,21 @@ If set to true and PowerDNS has been compiled with SNMP support, it will registe ``snmp-master-socket`` ---------------------- + .. versionadded:: 4.1.0 +.. deprecated:: 4.5.0 + Use :ref:`setting-snmp-daemon-socket`. + +.. _setting-snmp-daemon-socket: + +``snmp-daemon-socket`` +---------------------- +.. versionadded:: 4.5.0 - String - Default: empty -If not empty and ``snmp-agent`` is set to true, indicates how PowerDNS should contact the SNMP master to register as an SNMP agent. +If not empty and ``snmp-agent`` is set to true, indicates how PowerDNS should contact the SNMP daemon to register as an SNMP agent. .. _setting-socket-dir: