diff options
| author | Grant Limberg <[email protected]> | 2023-04-25 12:44:18 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-04-25 12:44:18 -0700 |
| commit | e4cb74896b01e96b5feb09b9bc906ae818b6ff5d (patch) | |
| tree | 89967a72584361aa31111f729f545b59f9feadfe /controller/PostgreSQL.cpp | |
| parent | 8e6e4ede6d17d1cf3c012269ab29e1c58568476e (diff) | |
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
Diffstat (limited to 'controller/PostgreSQL.cpp')
| -rw-r--r-- | controller/PostgreSQL.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/controller/PostgreSQL.cpp b/controller/PostgreSQL.cpp index ae705bb3..00b61bc3 100644 --- a/controller/PostgreSQL.cpp +++ b/controller/PostgreSQL.cpp @@ -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 |
