mirror of
https://github.com/ZeroTier/ZeroTierOne
synced 2025-07-06 13:01:47 -07:00
reorganize metric initialization
This commit is contained in:
parent
879d66162c
commit
bd8f048bef
4 changed files with 24 additions and 13 deletions
|
@ -112,6 +112,7 @@ using namespace ZeroTier;
|
|||
MemberNotificationReceiver::MemberNotificationReceiver(PostgreSQL *p, pqxx::connection &c, const std::string &channel)
|
||||
: pqxx::notification_receiver(c, channel)
|
||||
, _psql(p)
|
||||
, _mem_notifications{"controller_pgsql_member_notifications_received", "number of member change notifications received via pgsql NOTIFY"}
|
||||
{
|
||||
fprintf(stderr, "initialize MemberNotificationReceiver\n");
|
||||
}
|
||||
|
@ -136,6 +137,7 @@ void MemberNotificationReceiver::operator() (const std::string &payload, int pac
|
|||
NetworkNotificationReceiver::NetworkNotificationReceiver(PostgreSQL *p, pqxx::connection &c, const std::string &channel)
|
||||
: pqxx::notification_receiver(c, channel)
|
||||
, _psql(p)
|
||||
, _net_notifications{"controller_pgsql_network_notifications_received", "number of network change notifications received via pgsql NOTIFY"}
|
||||
{
|
||||
fprintf(stderr, "initialize NetworkNotificationReceiver\n");
|
||||
}
|
||||
|
@ -173,6 +175,8 @@ PostgreSQL::PostgreSQL(const Identity &myId, const char *path, int listenPort, R
|
|||
, _redis(NULL)
|
||||
, _cluster(NULL)
|
||||
, _redisMemberStatus(false)
|
||||
, _redis_mem_notif{"controller_redis_member_notifications_received", "number of member change notifications received via redis"}
|
||||
, _redis_net_notif{"controller_redis_network_notifications_received", "number of network change notifications received via redis"}
|
||||
{
|
||||
char myAddress[64];
|
||||
_myAddressStr = myId.address().toString(myAddress);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue