[pve-devel] [PATCH manager] influxdb: do not test the connection when entry is disabled

Dominik Csapak d.csapak at proxmox.com
Thu Sep 30 13:38:34 CEST 2021


else we cannot disable entries where influxdb is not reachable

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 PVE/Status/InfluxDB.pm | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/PVE/Status/InfluxDB.pm b/PVE/Status/InfluxDB.pm
index ba434569..cb788c4e 100644
--- a/PVE/Status/InfluxDB.pm
+++ b/PVE/Status/InfluxDB.pm
@@ -244,6 +244,9 @@ sub _connect {
 sub test_connection {
     my ($class, $cfg, $id) = @_;
 
+    # do not check connection for disabled plugins
+    return if $cfg->{disable};
+
     my $proto = $cfg->{influxdbproto} // 'udp';
     if ($proto eq 'udp') {
 	return $class->SUPER::test_connection($cfg, $id);
-- 
2.30.2






More information about the pve-devel mailing list