官术网_书友最值得收藏!

Time for action – adding the color areas

Now you are going to add colors to the three areas of the graph.

  1. Add another item.
  2. Select the Host-Resource-Mib: Running Processes as the Data Source.
  3. Select a red color.
  4. Select AREA as the Graph Item Type and put Over Threshold into the Text Format field.
  5. Click on 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_45-50 as the CDEF function to use.
  9. Click on Create.
  10. The last one will be the green area, so click on 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-44 as the CDEF function and check the Insert Hard Return box.
  13. Click on Create. Your graph definition should now look like the following screenshot. Verify that you have defined all of the items in the same way.
    Time for action – adding the color areas

What just happened?

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.

Adding a legend to the graph

Your graph is now nearly complete, but is missing the legend. So let's add this now to finish your graph template.

主站蜘蛛池模板: 平山县| 青川县| 鹤岗市| 共和县| 磐石市| 当阳市| 米脂县| 北川| 黄浦区| 乳山市| 商水县| 河源市| 丹巴县| 凤庆县| 宁陵县| 天长市| 铁岭县| 隆德县| 汉寿县| 潮州市| 和林格尔县| 垫江县| 竹山县| 大连市| 亚东县| 汉源县| 济源市| 且末县| 栖霞市| 彭山县| 崇仁县| 馆陶县| 胶南市| 石屏县| 林西县| 襄城县| 西乡县| 黔东| 密山市| 项城市| 北流市|