...
Code Block |
---|
'metrics' => { 'weight_cpuavailability' => '0.1', 'weight_availabilitycpu' => '0.12', 'weight_int' => '0.23', 'weight_mem' => '0.1', 'weight_response' => '0.2', 'weight_reachability' => '0.31', 'metric_health' => '0.4', 'metric_availability' => '0.2', 'metric_reachability' => '0.4', 'average_decimals' => '2', 'average_diff' => '0.1', }, |
...
weight_cpu * 90 + weight_availability * 90 + weight_int * 90 + weight_mem * 60 + weight_response * 100 + weight_reachability * 100
which becomes "0.1 2 * 90 + 0.1 * 90 + 0.2 3 * 90 + 0.1 * 60 + 0.2 * 100 + 0.3 1 * 100" resulting in 92% 90% for the health metric
The calculations can be seen in the collect debug, nmis.pl type=collect node=<NODENAME> debug=true
...
So based on our example before, the node would have the following values:
- Health = 92%90%
- Availability = 90%
- Reachability = 100%
The formula would become, "metric_health * 92 90 + metric_availability * 90 + metric_reachability * 100", resulting in "0.4 * 92 90 + 0.2 * 90 + 0.4 * 100 = 94.8", So a metric of 94 .8 for this node, which is averaged with all the other nodes in this group, or the whole network to result in the metric for each group and the entire network.
...