@@ -186,64 +186,40 @@ Last resort would be to check, that the correct data sources are used. Go to
186186the RRDfile and data source to be used. You may check, that all of them are as
187187wanted.
188188
189- ## Miscellaneous
189+ ## Duplicate Poller Entries
190190
191- Up to current cacti 0.8.6h, table ` poller_output ` may increase beyond reasonable
192- size.
191+ If you installed Cacti from a package (RPM, DEB, etc.), the package may have
192+ created both a cron entry in ` /etc/cron.d/cacti ` and enabled the ` cactid `
193+ systemd service. Running two pollers simultaneously causes data corruption.
193194
194- This is commonly due to php.ini's memory settings of 8MB default. Change this to
195- at least 64 MB.
196-
197- To check this, run the following SQL from MySQL CLI (or phpMyAdmin or the like)
198-
199- ``` sql
200- select count (* ) from poller_output;
201- ```
202-
203- If the result is huge, you may get rid of those stuff by
204-
205- ``` sql
206- truncate table poller_output;
207- ```
208-
209- As of current SVN code for upcoming cacti 0.9, I saw measures were taken on both
210- issues (memory size, truncating poller_output).
211-
212- ## RPM Installation
213-
214- Most rpm installations will setup the crontab entry now. If you've followed the
215- installation instructions to the letter (which you should always do ;-) ), you
216- may now have two poller running. That's not a good thing, though. Most rpm
217- installations will setup cron in ` /etc/cron.d/cacti `
218-
219- Now check all your crontab, especially ` /etc/crontab ` and crontab of users root
220- and cactiuser. Leave only one poller entry for all of them. Personally, I've
221- chosen ` /etc/cron.d/cacti ` to avoid problems when updating RPM's. Most often,
222- you won't remember this item when updating lots of RPM's, so I felt more secure
223- to put it here. And I've made some slight modifications, see
195+ Check for duplicate entries:
224196
225197``` sh
226- shell > vi /etc/cron.d/cacti
227- ```
228-
229- ``` ini
230- */5 * * * * cactiuser /usr/bin/php -q /var/www/html/cacti/poller.php > /var/local/log/poller.log 2>&1
198+ systemctl status cactid
199+ cat /etc/cron.d/cacti
200+ cat /etc/crontab
201+ crontab -l -u cactiuser 2> /dev/null
202+ crontab -l -u root 2> /dev/null
231203```
232204
233- This will produce a file ` /var/local/log/poller.log ` , which includes some
234- additional information from each poller's run, such as RRDtool errors. It
235- occupies only some few bytes and will be overwritten each time.
236-
237- If you're using the crontab of user "cactiuser" instead, this will look like
205+ The recommended approach is to use the ` cactid ` systemd service and remove any
206+ cron-based poller entries:
238207
239208``` sh
240- shell> crontab -e -u cactiuser
209+ systemctl enable --now cactid
210+ # Then remove or comment out any poller.php line in /etc/cron.d/cacti
241211```
242212
213+ If you need to keep cron-based polling, disable the service and leave a single
214+ cron entry:
215+
243216``` ini
244- */5 * * * * /usr/bin/php -q /var/www/html/cacti/poller.php > /var/local/log/poller.log 2>&1
217+ */5 * * * * cactiuser /usr/bin/php -q /var/www/html/cacti/poller.php > /dev/null 2>&1
245218```
246219
220+ Replace ` cactiuser ` with the user your web server runs as (e.g. ` www-data ` on
221+ Debian/Ubuntu, ` apache ` on RHEL-compatible systems).
222+
247223## Not NaN, but 0 (zero) values
248224
249225Pay attention to custom scripts. It is required, that external commands called
0 commit comments