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:
parent
8e6e4ede6d
commit
e4cb74896b
5 changed files with 15 additions and 1 deletions
|
@ -61,6 +61,8 @@ public:
|
|||
, m_minPoolSize(min_pool_size)
|
||||
, m_factory(factory)
|
||||
{
|
||||
Metrics::max_pool_size += max_pool_size;
|
||||
Metrics::min_pool_size += min_pool_size;
|
||||
while(m_pool.size() < m_minPoolSize){
|
||||
m_pool.push_back(m_factory->create());
|
||||
Metrics::pool_avail++;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue