Dispatcher: Don't update poller groups when updating stats (#13363)

* Dispatcher: Don't update workers/frequency when updating stats

* Fix the right thing

* Don't set poller groups on the cluster entry, this way config.php can override if it hasn't been set by the webui
This commit is contained in:
Tony Murray
2021-10-14 19:41:35 -05:00
committed by GitHub
parent d8e831d772
commit da57ea65f6

View File

@ -789,13 +789,12 @@ class Service:
try: try:
# Report on the poller instance as a whole # Report on the poller instance as a whole
self._db.query( self._db.query(
"INSERT INTO poller_cluster(node_id, poller_name, poller_version, poller_groups, last_report, master) " "INSERT INTO poller_cluster(node_id, poller_name, poller_version, last_report, master) "
'values("{0}", "{1}", "{2}", "{3}", NOW(), {4}) ' 'values("{0}", "{1}", "{2}", NOW(), {3}) '
'ON DUPLICATE KEY UPDATE poller_version="{2}", poller_groups="{3}", last_report=NOW(), master={4}; '.format( 'ON DUPLICATE KEY UPDATE poller_version="{2}", last_report=NOW(), master={3}; '.format(
self.config.node_id, self.config.node_id,
self.config.name, self.config.name,
"librenms-service", "librenms-service",
",".join(str(g) for g in self.config.group),
1 if self.is_master else 0, 1 if self.is_master else 0,
) )
) )