We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 539e30f commit da922bdCopy full SHA for da922bd
1 file changed
poller_apcupsd.php
@@ -100,8 +100,6 @@
100
/* apcupsd upses first UPS */
101
$upses = db_fetch_assoc_prepared('SELECT ups.*
102
FROM apcupsd_ups AS ups
103
- LEFT JOIN apcupsd_ups_stats AS stats
104
- ON ups.id = stats.ups_id
105
WHERE type_id = 1
106
AND enabled = "on"
107
AND poller_id = ?',
@@ -134,10 +132,12 @@
134
132
}
135
133
136
137
-$upses = db_fetch_assoc('SELECT *
+$upses = db_fetch_assoc_prepared('SELECT *
138
FROM apcupsd_ups
139
WHERE type_id = 2
140
- AND enabled = "on"');
+ AND enabled = "on"
+ AND poller_id = ?',
+ array($config['poller_id']));
141
142
$snmpupses = cacti_sizeof($upses);
143
0 commit comments