This is how I set up Cacti to monitor some output from lmsensors. Note that this will almost definitely need to be customised to your site, as the output from lmsensors will almost certainly differ according to your chipset.
This assumes you have Cacti setup and working, and lmsensors set up and working.
Grab the check_sensors.pl script from here
Another script that is neater, faster and easier to customise with your selection of temperatures and fan speeds is http://mabula.net/code/check_sensors.pl.
Note that this script merely takes the output of sensors and parses it for values it knows about. Also note that it merely grabs (and tidies slightly) the variables temp1 temp2 temp3 and fan1 fan2 fan3 -- if you want to monitor more sensors you'll need to adjust this.
The script outputs the three fan speeds, then the three temperatures, seperated by spaces, to standard out.
Go to the data input page in cacti, and click 'add'. Fill in the fields with appropriate values, eg
Name: Get LM Sensors Input String: perl <path_cacti>/scripts/check_sensors.pl Output String: <fan1> <fan2> <fan3> <temp1> <temp2> <temp3>
For each of the Output Strings listed above, add a 'Data Input Source Field', setting the name to something sensible like Fan1, the dataname to the variable name in Output String, the type to 'output' and select 'Field Used to Update RRA'
Go to the Data Source page in cacti, and click 'add'. Again, fill in with appropriate values. Note the following:
Go to the Graph control panel page in cacti and click 'add' Most of the information here is up to you to decide. Scales etc are best suited for your preferences.
Once the graph object has been created, you need to edit the graph items. For each item you want to place on this graph, add a line or whatever.
I normally do the following for each graph item
One page links to CactiLMSensors: