Cacti Beginner's Guide(Second Edition)
上QQ阅读APP看书,第一时间看更新

Time for action - adding the color areas

This time you are not going to add just one item, but all three areas:

  1. Add another item.
  2. Select AREA as the Graph Item Type and put Over Threshold into the Text Format field.
  3. Select Host-Resource-Mib: Running Processes as the data source.
  4. Select a Red color.
  5. Click Create.
  6. For the yellow area, you need to add yet another item.
  7. Select AREA as the Graph Item Type, choose a yellow color, and put Near Threshold into the Text Format field.
  8. Select isYellow_435-470 as the CDEF function to use.
  9. Click Create.
  10. The last one will be the green area, so click Add again.
  11. Select AREA as the Graph Item Type, choose a green color, and put Under Threshold into the Text Format field.
  12. Select isGreen_0-434 as the CDEF function and check the Insert Hard Return box.
  1. Click Create. Your graph definition should now look like the following screenshot. Verify that you have defined all of the items in the same way:

As you can see in the last screenshot, you have now added your three colored areas to the graph. Using the same principle as for the RRDtool graph command, you based the values of the single areas on a CDEF value. This will make sure that only the relevant area shows up on the graph, depending on the data value.

By selecting a data source, you can also see that this data source is automatically added to the Graph Item Inputs list.