Cacti data templates maximum value
Once a Template is applied to a Data Source, you will notice that you can only change values for the fields that you checked Use Per-Data Source Value for. However, as previously stated, changes to a Data Template that involve changes to the Data Source Items , will not be automatically applied to those same Data Sources. If you goto the following article How to Work with Templates.
There you will find a step by step guide on how to work with variout Cacti Templates in general. In Cacti, a Graph Template provides a skeleton for an actual Graph. If you have many Graphs that share most of their characteristics, using a Graph Template makes perfect sense. The first thing you must do is give the Graph Template a name. This name has nothing to do with the graph title, but is what you will use to identify the Graph Template throughout Cacti.
Second, you will notice a list of graph field names with Use Per-Graph Value check-boxes next to each one. If you leave the check-box unchecked, every Graph owned by the Graph Template will inherit its value from the Template.
If the check-box is checked, every Graph owned by Graph Template will have its own value for that particular field. When you are finished filling in values for the Graph Template , click Create and you will be presented with a page similar to the image below. The example below is from a completed Traffic Graph Template. In this first image, you can see what elements will be painted on the Graph Canvas. The Multiple Instances field is a parameter to let Cacti know that it should allow you to create more than one Graph per Device using the Graph Template.
The Common Options are options that most every Graph Template included. The Scaling Options are also very common, but related to Graph scaling only. The first thing you should do is create Graph Items for a Graph Template , just like for a stand alone Graph. One difference you will notice is that the Data Sources drop-down will contain a list of Data Template items rather than Data Source Items.
It is important that Cacti can make this association here, so that Cacti doesn't have to make unnecessary assumptions later.
Graph Item Inputs are unique to Graph Templates because of the large number of items they sometimes contain. There are various fields that must be filled in for every graph item input:. Applying a Graph Template to an existing Graph is a very simple process, though very uncommon in a modern Cacti install.
The first thing you must do is select the Graph you want to apply the template to under Graph Management. Once the Graph Template is applied to the existing Graph , you will notice that you can only change values for the fields that you checked Use Per-Graph Value for. You will also notice a new box, called Graph Item Inputs. This is where you can specify values for the Graph Item Inputs that you defined in the Graph Template.
It really accelerates the deployment of a Cacti system across and enterprise of Devices. Once on that page, click Add on the right. You will be redirected back to the edit page with the Associated Graph Templates and Associated Data Queries forms empty. Assume, you're searching for a specific set of templates to monitor a special type of device.
Apart from designing templates from scratch, there's a good chance to find a solution in the Scripts and Templates Forum. The set of templates is usually provided as a single XML file holding all required definitions for a data template and a graph template.
However, also note that in the current version of Cacti, Packages are now importable as well. When you import a Package all of the required additional file changes will also be accommodated. We will discuss Packages later in the documentation. If the XML file was downloaded, simply select that file from the Downloads location on your local system. Cacti no longer supports pasting the XML into the browser window.
Please pay attention the the Data Source Profile field. By default, cacti will attempt to use your default Data Source Profile. However, you can change that at import time to use an alternate Data Source Profile or even the one from the Template itself, if it includes one.
Also, not that if you have made local modification to an earlier version of a Graph Template , and wish to fully migrate to the new Graph Template for all your existing Graphs , please select Remove Orphaned Graph Items.
Otherwise, your Graphs will look awkward in the end. This should not be a problem for new Imports. It's also important to Preview the Template imports to access the impact that the import will have on existing database object. In earlier versions of Cacti, you were unable to determine what would actually change. However, in the current and future versions of Cacti, you will be able to see all local modifications when performing a Preview prior to Importing.
When Previewing, no changes are actually made ot your Cacti system. As mentioned previously, for a single OID based template, Importing the Template is all that will be required. However, for a script based template, the author will provide the script that has to be downloaded to the Cacti. When importing templates, Cacti will perform a version check. Cacti will import only, if your current Cacti version equals or is higher than the exported one. Now that you know how to import, you may want to know in which way to export as well.
Selecting the Export Templates gives. You may select to export a graph template, a data template, a Device Template or a Data Query. When selecting Include Dependencies , e. Output may be written to the browser or to a file for uploading. What is Spine? Support Cacti Report an Issue. Release 1. Templates The real strength of Cacti is unleashed by using templates. There are five different types of templates with the basic Cacti installation: Device Templates - Define a Collection of Graph Templates and Data Queries that belong to a class of Devices Graph Templates - Define how to paint the Graph, it size, legend, left and right Axis and it Canvas Data Templates - Define how data is to be stored in the RRDfile and how often to collect that data Aggregate Templates - A special class of Graph Template that allows you to combine elements from multiple Graph of a common Template into one Graph Color Templates - A collection of color rotations to use for Aggregate Graphs While it is perfectly fine to define all Data Sources and Graphs without using Templates at all, the burden of this approach is high.
Table There are several replacement values available to you when using a Template. The resulting Data Source can still be used on Graphs , but no data will be fed to it until it is made active again. Minimum Value Here is where you specify the minimum value that is expected for this data source in the RRDfile.
If a value lower than the minimum is given, it will be stored as Unknown U. Maximum Value Here is where you specify the maximum value that is expected for this data source in the RRDfile. If a value higher than the maximum is given, it will be stored as Unknown U.
The update function takes the overflow into account. The counter is stored as a per-second rate. When the counter overflows, RRDtool checks if the overflow happened at the bit or bit border and acts accordingly by adding an appropriate value to the result. GAUGE: numbers that are not continuously incrementing, e. Floating point numbers are accepted. This field is usually '' or 2 data gathering intervals". Height The height of the Graph Canvas in pixels. This is not the height of the overall Graph, just the Graph Canvas.
Width The width of the Graph Canvas in pixels Base Value Should be set to for memory values and for traffic measurements. Slope Mode RRDtool graphs are composed of stair case curves by default. This is in line with the way RRDtool calculates its data. Some people favor a more "organic" look for their graphs. Auto Scale Enable auto scale for the graph. This option must be check to use the next two options. Auto Scale Options Choose whether you would like to use --alt-autoscale ignoring given limits , --alt-autoscale-max accepting a lower limit , --alt-autoscale-min accepting an upper limit.
Logarithmic Scaling Choose if you want logarithmic y-axis scaling. But for logarithmic graphs, exponential notation is default. Choose if you want logarithmic y-axis scaling and scientific units.
Rigid Boundaries Mode From the RRDtool manual "Normally rrdgraph will automatically expand the lower and upper limit if the graph contains a value outside the valid range. With this option you can disable this behavior". Auto Padding If you have ever created RRDtool based graphs manually, you may have realized how annoying it can be to get text to line up properly. With this option Cacti will do its best to make the columns on your graph legend line up. This option works best when your graph legend has a consistent number of columns.
Upper Limit The maximum value that will be displayed on the y-axis. This value is ignored is auto-scaling is turned on. Lower Limit The minimum value that will be displayed on the y-axis. Base Value Whether you want to base the y-axis labels on or This field will typically be set to for memory and for traffic measurements.
Unit Grid Value Sets the unit value for the y-axis --y-grid. You should probably keep the unit short as to keep it readable. There are two types of data queries that you will see referred to throughout Cacti. They are script queries and SNMP queries. Script and SNMP queries are virtually identical in their functionality and only differ in how they obtain their information. All data queries have two parts, the XML file and the definition within Cacti. An XML file must be created for each query, that defines where each piece of information is and how to retrieve it.
This could be thought of as the actual query. The second part is a definition within Cacti, which tells Cacti where to find the XML file and associates the data query with one or more graph templates. Last edited by gandalf on Wed Jun 18, pm, edited 9 times in total.
However, the PDF shows only a blank page; could you please upload it again? Thanks in advance. I wanna thanks you so much for this works!!!!
I'm sure it will helps everybody here Lvm, We need to talk about you and cacti. If the purpose of this is to show someone how to create a new data source for monitoring, it would be more informative if it didn't use any existing xml files. I am trying to do some things that are not included in the stock cacti install and learning how best to do that would be a lot more useful.
I was thinking about this very issue before writing this howto. As it shall only demonstrate the principles, it should not matter, what ressources are taken as an example.
The advantage of the interface. And I did not target the creation of a new XML! Nor to explain all the options to be used in those XML definitions. The XML bit is somewhat more complex; perhaps this would make for another howto? Do you have any ideas for that? Something everyone can do himself?
Again, if you have any ideas on this, I will think about implementing them as long as you do not want to do this yourself. Reinhard PS: I changed the title of this topic to show the intention more clearly. OK, now what? Even if I have an XML file from someone else's attempts, there are still some gaps in the process.
0コメント