Penguin
Blame: CactiDataInput
EditPageHistoryDiffInfoLikePages
Annotated edit history of CactiDataInput version 2, including all changes. View license author blame.
Rev Author # Line
1 DanielLawson 1 A CactiDataInput is a script stored on the server [Cacti] runs on, which outputs some information onto standard out when it is executed.
2
3 Important things to consider when writing scripts for this purpose:
2 ThomasBaden 4 * It must output space separated values, on one line
1 DanielLawson 5 * It must be executable by the user that runs the cacti scripts, which is typically the same as the user your webserver runs as. Using sudo or setuid binaries to get around this may be a security risk for some applications so treat this carefully.
6
7
8 !Adding a CactiDataInput
9 Go to the data input page in cacti, and click 'add'.
10
11 There are three fields at first: Name, Input String and Output String
12
13 Name is verbose name, used for user recognition. Be verbose, include spaces, etc. 'Get LM Sensors' is an example.
14
15 Input String is the command line that is executed when the script is run. An example would be:
16 perl <path_cacti>/scripts/check_sensors.pl
17 This says to run perl with the script at <path_cacti>/scripts/check_sensors.pl (<path_cacti> is automatically expanded). Note that if you need to provide command line arguments to your scripts, you can specify them here too, eg
18 perl <path_cacti>/scripts/check_smart.pl <disk>
19 We will talk more about input strings later.
20
21 Output String is the expected format of the output from the script specified in 'Input String'. For the check_sensors.pl script mentioned earlier, an output string might be:
22 <fan1> <fan2> <fan3> <temp1> <temp2> <temp3>
23 We'll talk more about these later.
24
25
26 For each of the Input and Output fields you entered, (eg, <disk>, <fan1> etc), you need to add a Data Input Source Field.
27
28 The format of these is very simple:
29
30 Name is a verbose name
31
32 Data Name is the name of the data field you are creating this for (eg, <disk>, <fan1> etc)
33
34 Input/Output specifies just that.
35
36 Update RRA should be checked for all output fields, and one input field (I think?)
37
38
39 Once this is complete, press Save
40
41
42
43
44 This is just a Data Input mechanism. This isn't actually a Data Source. To actually have cacti retrieving data you need to add a CactiDataSource next

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach()