Skip to content

Commit

Permalink
Dispatcher: Don't update poller groups when updating stats (#13363)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
murrant committed Oct 15, 2021
1 parent d8e831d commit da57ea6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions LibreNMS/service.py
Expand Up @@ -789,13 +789,12 @@ def log_performance_stats(self):
try:
# Report on the poller instance as a whole
self._db.query(
"INSERT INTO poller_cluster(node_id, poller_name, poller_version, poller_groups, last_report, master) "
'values("{0}", "{1}", "{2}", "{3}", NOW(), {4}) '
'ON DUPLICATE KEY UPDATE poller_version="{2}", poller_groups="{3}", last_report=NOW(), master={4}; '.format(
"INSERT INTO poller_cluster(node_id, poller_name, poller_version, last_report, master) "
'values("{0}", "{1}", "{2}", NOW(), {3}) '
'ON DUPLICATE KEY UPDATE poller_version="{2}", last_report=NOW(), master={3}; '.format(
self.config.node_id,
self.config.name,
"librenms-service",
",".join(str(g) for g in self.config.group),
1 if self.is_master else 0,
)
)
Expand Down

0 comments on commit da57ea6

Please sign in to comment.