This post is also available in: French
In Centreon, you can custom the graphs. Curves or legends can be changed to match your needs. In this article, we are going to show you some examples of personalization that will improve the look of your graphs.You have probably noticed that when several services bring up the same metric, this one appears by default in a different colors for each host. Indeed, if you don’t define the color for a metric, this one use a random color for each equipment.
To simplify the visualization of graphs, you can custom the metric colors, for example, a color for a curve and another one for the area (curve area).
To customize a curve, go to the menu “Views>Graphs>Curves” and if the curve doesn’t exist, you have to create it by clicking on “Add”.
When the modifications are done, the changes are directly reflected without restarting the scheduler (Nagios or Centreon Engine). Indeed, the graphics customization is handled directly by Centreon and not the monitoring engine.
Let’s start with an example:
When watching metric traffic in and traffic out, you can notice that one of these metrics is reversed. This represents input and output traffic: the input traffic is positive and the output is negative.
The out_traffic is opposite by default in Centreon but you can customize it in the menu metric configuration (Views>Graphs>Curves).
This is an example of reverse curve:
If you use plugin check_centreon_snmp_traffic and you asked yourself why the metrics are superimposed, now you understand.
This is network traffic graph overview:
We are going to improve the graph display by stacking metrics. To do that, we will modify the load average metrics (load1, load5 and load15) by clicking on Views>Graphs>Curves.
You have to check the “filling” box to fill curves and choose the filling order with the selection list “Order” :
Configuration curve load1:
Configuration curve load5:
Configuration curve load15:
The display is better than the one used by default but we will add the metrics filling.
To do that, we will check the “filling” box for load average metrics (load1, load5 and load15).
Check the new result:
For example: if you have cpu_idle, cpu_system, cpu_wait, cpu_user and cpu_total for the CPU service on Linux distribution.
You are probably asked to scale graphs (from 0 to max value). It can be very interesting to compare the present curve and the maximum or useful disk space. But we are not going to modify metrics one by one particularly if we have a large number of modifications to do (Disk-C, Disk-D, Disk-/, Disk-var, etc)
The best solution is to create a graph model, as for hosts, services and contacts.
These models can be assigned to services by modifying models (the tab “Supplementary Information of service).
Centreon gives some graph models by default.
For example, the graph model about disk:
Note: you can check the “size max” box to display the maximum value ( total size of disk for example).
As each service is different, you can change the type of “DATA SOURCE” and thus, you can change the graph appearance.
The different types of DATA SOURCE (DS) available in Centreon are: GAUGE,COUNTER, DERIVE, ABSOLUTE.
- GAUGE can be used to keep temperature or disk space.
- COUNTER is incremental counter that doesn’t accept recording less than latest value included except in the case of overflow ( it determines the overflow on 32 or 64 bits). Useful to measure the number of network interface packages.
- DERIVE gives derivative to the latest recording done. Interesting when a gauge show absurd values.
- ABSOLUTE is a specific counter: it returns positive values.
From the graphical interface, you can modify the metric DATA SOURCE. Currently, two types of DATA SOURCE are supported by the graphical interface: GAUGE and COUNTER. But if you use Centreon Broker, you can use all DATA SOURCE mentioned above.
When you modify the metric DATA SOURCE,you have to build again RRD (Round Robin Database) file for changes to take effect.
If you use Centreon Broker, you can specify the type of DATA SOURCE directly in your plugin result (OUTPUT).
Instead of this result:
CPU Usage 98%|cpu=98%;80;95;0;100
The result will be:
CPU Usage 98%|c[cpu]=98%;80;95;0;100
c (for COUNTER) is the type of DATA SOURCE (http://oss.oetiker.ch/rrdtool/doc/rrdcreate.en.html)
Stay tuned !
Next month, we will present you the Good Practices about the virtual metrics.
All previous Good Practices are now available from the Menu Good Practices.
Incoming search terms:
- centreon graph
- add cpu metric centrenon
- centreon add graph