diff --git a/docs/build/manual.sgml b/docs/build/manual.sgml index 9dac5c392c..510e943ff8 100644 --- a/docs/build/manual.sgml +++ b/docs/build/manual.sgml @@ -706,10 +706,6 @@ $database_password = "cacti"; - - Graph Viewing Modes - - User Management @@ -846,11 +842,6 @@ $database_password = "cacti"; when this box is checked. - - LDAP Authentication - - - @@ -964,7 +955,58 @@ $database_password = "cacti"; Making Your Scripts Work With Cacti - + + The simplest way to extend Cacti's data gathering functionality is through external scripts. Cacti comes + with a number of scripts out of the box which are located in the scripts/ directory. + These scripts are used by the data input methods that are present in a new installation of Cacti. + + + To have Cacti call an external script to gather data you must create a new data input method, making sure + to specify Script/Command for the Input Type field. See the + previous section, Creating a Data Input Method for more + information about how to create a data input method. To gather data using your data input method, Cacti + simply executes the shell command specified in the Input String field. Because of + this, you can have Cacti run any shell command or call any script which can be written in almost any + language. + + + What Cacti is concerned with is the output of the script. When you define your data input method, you are + required to define one or more output fields. The number of output fields that you define here is important + to your script's output. For a data input method with only one output field, your script should output its + value in the following format: + + <value_1> + + So if I wrote a script that outputs the number of running processes, its output might look like the + following: + + + Example script output using 1 field + + 67 + + + + Data input methods with more than one output field are handled a bit differently when writing scripts. + Scripts that output more than one value should be formatted like the following: + + <fieldname_1>:<value_1> <fieldname_2>:<value_2> ... <fieldname_n>:<value_n> + + Lets say that I write a script that outputs the 1, 5, and 10 minute load average of a Unix machine. In Cacti, + I name the output fields '1min', '5min', and '10min', respectively. Based on these two things, the output of + the script should look like the following: + + + Example script output using 3 fields + + 1min:0.40 5min:0.32 10min:0.01 + + + + One last thing to keep in mind when writing scripts for Cacti is that they will be executed as the user the + data gatherer runs as. Sometimes a script may work correctly when executed as root, but fails due to permissions + problems when executed as a less privileged user. + @@ -1732,10 +1774,6 @@ $database_password = "cacti"; - - Importing/Exporting Templates Using XML - - @@ -1744,13 +1782,78 @@ $database_password = "cacti"; How To - - Add 3rd Party Scripts - - Graph a Single SNMP OID - + + When dealing with SNMP-enabled devices, there are often times when you want to graph the value of a single + OID. This tutorial explains how to do this in Cacti. It also assumes that you have the "SNMP - Generic OID + Template" graph template, which is now included in Cacti as of version 0.8.5. If you do not see this + template listed under Graph Templates, download the template from the Cacti website + in XML form and import it using the Import Templates menu item. + + + To start the process of creating a new graph for your OID, click the New Graphs menu + item and select the host that contains the target OID from the dropdown. Under the Graph + Templates box, you will see a dropdown on the last line that reads (Select a graph + type to create). From this dropdown, choose "SNMP - Generic OID Template" and click the + Create button at the bottom of the page. + + + You will be presented with several fields that will require input before the new graph can be created. + They are described in more detail below. + + + Field Description: SNMP - Generic OID Template + + + + + + Name + Description + + + + + (Graph) Title + The title that is to be used for the new graph. It is generally a good idea to keep |host_description| in the title, as to make the graph easier to identify later. + + + (Graph) Vertical Label + The text that will be printed along the y-axis of the graph. It is generally used to describe units, such as 'bytes' of 'percent'. + + + (Graph Items) Legend Color + The color that will be used to reprent the data on the graph. + + + (Graph Items) Legend Text + The text that will be used to describe the data on the graph legend. + + + (Data Source) Name + The title that is to be used for the new data source. It is generally a good idea to keep |host_description| in the title, as to make the data source easier to identify later. + + + (Data Source) Maximum Value [snmp_oid] + The maximum value that will be accepted from the OID. Make sure you choose a value that is reasonable for the data you are trying to graph because anything larger than the maximum will be ignored. If you are graphing a percentage, you should use '100' as the value should never exceed this. + + + (Data Source) Data Source Type [snmp_oid] + How the data from the OID should be stored by RRDTool and interpreted on the graph. If the value of the OID represents the actual data, you should use GAUGE for this field. If the OID value is a constantly incrimenting number, you should use COUNTER for this field. The two remaining field values, DERIVE and ABSOLUTE can be ignored in most situations. + + + (Custom Data) OID + The actual SNMP OID to graph. It is typically a good idea to enter the number OID here as opposed to using MIB names. For instance, to get the number of open files on a Netware server, you would use ".1.3.6.1.4.1.23.2.28.2.7.0" as the OID. + + + +
+ + When finished filling in values for these fields, click the Create button. Your new graph can + now be accessed through the Graph Management page or the Graphs tab + inside of Cacti. +