Penguin
Blame: CactiLMSensors
EditPageHistoryDiffInfoLikePages
Annotated edit history of CactiLMSensors version 4, including all changes. View license author blame.
Rev Author # Line
2 JohnMcPherson 1 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.
1 DanielLawson 2
2 JohnMcPherson 3 This assumes you have [Cacti] setup and working, and [lmsensors] set up and working.
1 DanielLawson 4
5 Grab the check_sensors.pl script from [here|http://www.wlug.org.nz/archive/cacti_scripts/check_sensors.pl]
4 PaulWay 6
7 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].
1 DanielLawson 8
9 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.
10
11 The script outputs the three fan speeds, then the three temperatures, seperated by spaces, to standard out.
12
13 !Add a Data Input
14 Go to the data input page in cacti, and click 'add'.
15 Fill in the fields with appropriate values, eg
16
17 Name: Get LM Sensors
18 Input String: perl <path_cacti>/scripts/check_sensors.pl
19 Output String: <fan1> <fan2> <fan3> <temp1> <temp2> <temp3>
20
21 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'
22
23 !Add a Data Source
24 Go to the Data Source page in cacti, and click 'add'.
25 Again, fill in with appropriate values. Note the following:
3 ClementOudot 26 * Data Source Type: pick GAUGE
1 DanielLawson 27 * Data Input Source: 'Get LM Sensors' (Assuming you called your Data input this in the previous step)
28 * Minimum and Maximum Value: make sure these are sensible. Ie, if you are monitoring fans, they can run up to several thousand RPM
29 * Associated RRA's: pick all of them
30
31 !Add a Graph
32 Go to the Graph control panel page in cacti and click 'add'
33 Most of the information here is up to you to decide. Scales etc are best suited for your preferences.
34
35 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.
36
37 I normally do the following for each graph item
38
39 * a LINE1 of some suitable colour, with the AVERAGE consolodation function, and a suitably descriptive Text Format:
40 * GPRINTS for each of the following consolodation functions: CURRENT, AVERAGE, MAX, MIN, in that order, again with suitable text formats:
41 * the last GPRINT has a "Hard Return" set.