Cacti/plugin_weathermap

Fixing #97 - Boost Auto-Detect is buggy

leonardo0014 opened this issue · 3 comments

Hello @TheWitness

The fix #97 does not work as it should. The loop doesn't recognize the existing entry and rewrites it each time, just with a new ID.
Here you should check again where the error is.

SELECT * FROM `cacti.weathermap_settings`
id	mapid	groupid	optname	optvalue	
1	0	0	rrd_user_poller_output	1	
2	0	0	rrd_user_poller_output	1	
3	0	0	rrd_user_poller_output	1	
4	0	0	rrd_user_poller_output	1	
5	0	0	rrd_user_poller_output	1	
6	0	0	rrd_user_poller_output	1	
7	0	0	rrd_user_poller_output	1	
8	0	0	rrd_user_poller_output	1	
9	0	0	rrd_user_poller_output	1	
10	0	0	rrd_user_poller_output	1	
11	0	0	rrd_user_poller_output	1	
12	0	0	rrd_user_poller_output	1	
13	0	0	rrd_user_poller_output	1	
14	0	0	rrd_user_poller_output	1	
15	0	0	rrd_user_poller_output	1	
16	0	0	rrd_user_poller_output	1	
17	0	0	rrd_user_poller_output	1	
18	0	0	rrd_user_poller_output	1	
19	0	0	rrd_user_poller_output	1	
20	0	0	rrd_user_poller_output	1	
21	0	0	rrd_user_poller_output	1	
22	0	0	rrd_user_poller_output	1	
23	0	0	rrd_user_poller_output	1	
24	0	0	rrd_user_poller_output	1	
25	0	0	rrd_user_poller_output	1	
...

I just saw a typo. In line 553 you ask for "rrd_use_poller_output" and in line 557 you write "rrd_user_poller_output". One "r" too many ;-)

Can you create a pull request?

I hope that was what you wanted

Yea, that was perfect. Thanks!! You might want to delete the duplicate entries. That's another issue all together though.