Cacti Update

Well that was easy. I’ve just moved two tables to the type Memory/Heap and cacti runs like it used to (in fact a hell of a lot better than it has been doing recently.)

The two tables moved are: snmp_counter64* and poller_output. Both these tables can afford to loose the data on restart – they hold data before it is moved into the rra and holds at most 5 mins worth of data (IE one cycle).

It also improves the situation if the server restarts as if data is left in the poller_output table it can push the the php poller over its memory limit and stop it working properly, so its a good idea to start with it empty.

Snmp_counter64 also needs emptying every now and again – as when you remove devices from cacti it does not get removed from here

The SQL code to achieve this is:

alter table cacti.snmp_counter64 engine=heap;
delete from cacti.poller_output;
ALTER TABLE cacti.poller_output MODIFY COLUMN output VARCHAR(255);
alter table cacti.poller_output engine=heap;

Warning
Some graphs may stop updating if the script used to generate data for the output more the 255 characters If you use MYSQL 5, then you can use something like VARCHAR(1024) instead.
This may cause data to be lost from the current run.

The server now copes pretty well. I haven’t tried anything new to it yet, but it generally appears to be working better then it has done for past couple of months. I would like to re do the disk structure, but for now this will do.

*This table is from a patch – most people won’t have this table.

September 17, 2006   Posted in: Networking, Software