- Cacti Beginner's Guide(Second Edition)
- Thomas Urban
- 145字
- 2021-07-02 20:15:31
CDEF definition
As a prerequisite, you're first going to create your two CDEFs, one for the green area and one for the yellow area. The threshold is set at 435 for the yellow and 470 for the red threshold, but you can change this to fit your needs. Let's have a look at the two CDEFs you're going to create shortly:
CDEF:isGreen=intspeed,0,434,LIMIT CDEF:isYellow=intspeed,435,470,LIMIT
Cacti does not use named variables such as intspeed, but defines them according to the alphabet from a to z, so your definition from a Cacti view actually looks like:
CDEF:cdefa=a,0,434,LIMIT CDEF:cdefb=a,435,470,LIMIT
isGreen and isYellow also have been changed. Don't worry, Cacti takes care of this automatically. Just remember that your green area will go from 0 to 434, the yellow area will show up once the number of processes is between 435 and 470, and it will show red above 470.