Central startup update (#1973)

* allow specifying authtoken in central startup

* set allowManagedFrom

* move redis_mem_notification to the correct place

* add node checkins metric

* wire up min/max connection pool size metrics
This commit is contained in:
Grant Limberg 2023-04-25 12:44:18 -07:00 committed by GitHub
parent 8e6e4ede6d
commit e4cb74896b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 15 additions and 1 deletions

View file

@ -1145,6 +1145,7 @@ void PostgreSQL::_membersWatcher_Redis() {
_redis->xdel(key, id);
}
lastID = id;
Metrics::redis_mem_notification++;
}
}
}
@ -1687,6 +1688,7 @@ void PostgreSQL::onlineNotification_Postgres()
<< " ON CONFLICT (network_id, member_id) DO UPDATE SET address = EXCLUDED.address, last_updated = EXCLUDED.last_updated";
pipe.insert(memberUpdate.str());
Metrics::pgsql_node_checkin++;
}
while(!pipe.empty()) {
pipe.retrieve();
@ -1794,7 +1796,7 @@ uint64_t PostgreSQL::_doRedisUpdate(sw::redis::Transaction &tx, std::string &con
.sadd("network-nodes-all:{"+controllerId+"}:"+networkId, memberId)
.hmset("member:{"+controllerId+"}:"+networkId+":"+memberId, record.begin(), record.end());
++count;
Metrics::redis_mem_notification++;
Metrics::redis_node_checkin++;
}
// expire records from all-nodes and network-nodes member list