We have configured the "Upper Limit" values of most of the graphs at such a number that:
- - Graph height 25% = completely normal
- Graph height 50% = the server is quite busy
- Graph height 100% = alarm!
Sometimes a big peak happens, causing the graph to rescale.
If you don't notice the graph is rescaled, and you use the 25% height rule, you might misinterpret the graph.
I have fixed this by an easy solution:
I have added a black horizontal line on at the normal upper limit of the graph.
If the graph is rescaled, the black line comes down, and you can see the part below the graph as 100%, and use the 25% rule again.
In this topic I want to explain how to add that black line.
This is what the graph looks like when it has been rescaled and the black line has come down:
This server has 2 processors, so I have set the graph maximum to 4, so 50% (quite busy) = a load of 2.
You need to take the following steps to add such a black upper limit line:
1) Create a special CDEF
- - Log in to Cacti as admin.
- Go to the "Console" tab
- Choose "Graph Magement" from the left menu
- Choose "CDEFs" from the left menu
- Click "Add" on the right top of the page
- Enter the name: "Graph Maximum Line"
- Click "Create"
- Click "Add" right on the page
- Choose "Special Data Source"
- Choose "All Data Sources (Don't include Duplicates)"
- Click "Create"
- Click "Add" right on the page
- Choose "Custom String"
- Enter "0"
- Click "Create"
- Click "Add" right on the page
- Choose "Operator" and " * " (star = multiply)
- Click "Create"
- Click "Add" right on the page
- Choose "Special Data Source" and "Graph: Upper Limit"
- Click "Create"
- Click "Add" right on the page
- Choose "Operator" and " + "
- Click "Create"
- Click "Save"
2) Add the the line to the Graph Template
- - Choose "Graph Templates" from the left menu"
- Click the tempate you wish to add the black maximum line to
- Click "Add" on the right top of the page
- Set the "Data Source" to "none" (the first option)
- Set the "Color" to 000000 / Black (the last option)
- Set the "Graph Item Type" to "LINE1"
- Set the "CDEF function" to the "Graph Maximum Line" you created
- Click "Create"
3) Set a "Upper Limit" for the graph
You can set an upper limit for all the graphs based on a graph template, or you can set it per host.
- - Click "Graph Templates" from the left menu
- Click the graph you want to set the maximum for
- Scoll the page down to the options
- "Auto Scale" should be set off
- "Auto Scale Options" should be set to "Use --alt-autoscale-max (accepting a lower limit)"
- Set the "Upper Limit" to the number you want the graph to scale to by default, for example "4" or "8" for a load graph and "104857600" for a 100 mbit network graph.
- If you want to set an upper limit per separate host, you need to check the checkbox "Use Per-Graph Value" below "Upper Limit"
- Click "Save"
If you have choosen "Use Per-Graph Value", you can set the per-host value this way:
- -Choose "Graph Management" for the left menu
- Click the graph
- Set the "Upper Limit"
- Click "Save"
If you have done all this, you can directly go to the "Graphs" tab and check if the black line appears on top of the graph, or somewhere in the middle if it is rescaled.
Have fun!
God bless you,
Jeroen Vermeulen