Cacti 0.8 Beginner's Guide
上QQ阅读APP看书,第一时间看更新

Time for action – defining a CDEF in Cacti

  1. Go to Management | Graph Management and click on the CDEFs submenu.
  2. On the usual screen, click on the Add link to the top right.
  3. Now you can give the new CDEF a useful name. Enter isGreen_0-44 and click on Create.
  4. Another table will appear. Click on the Add link.
  5. For CDEF Item Type, select Custom String from the drop-down box.
  6. Enter a,0,44,LIMIT into the CDEF Item Value field and click on Create. The first CDEF is created and you will see your CDEF definition together with a Save Successful message at the top.
    TiCDEF definitionaboutme for action – defining a CDEF in Cacti
  7. Repeat the steps and create a new CDEF called isYellow_45-50 and the Item Value of a,45,50,LIMIT.
  8. Now that you have defined your two CDEF items, you can proceed with the graph template creation.

What just happened?

You have created the two CDEF items which you are going to use to change the appearance of your running processes graph to go yellow before reaching a threshold, and stay green when it is way below the threshold.

Defining the graph template

Now that you have created your CDEFs, you can create your special graph template. The graph will have the green, yellow, and red areas defined, as well as the HRULE item showing the threshold. The threshold is set at 50.