Hello, i would look at the EXTRAOPTIONS as you suggest, i would add specific CLI argument to transform your data, the arguments --change-perfdata and --extend-perfdata are probably the most appropriate.
VMware ESX | Centreon Documentation
Hope it helps
--change-perfdata --extend-perfdata | Change or extend perfdata. Syntax: --extend-perfdata=searchlabel,newlabel,targetr,enewuom],omin],im ax]] Common examples: Convert storage free perfdata into used: --change-perfdata=free,used,invert() Convert storage free perfdata into used: --change-perfdata=used,free,invert() Scale traffic values automatically: --change-perfdata=traffic,,scale(auto) Scale traffic values in Mbps: --change-perfdata=traffic_in,,scale(Mbps),mbps Change traffic values in percent: --change-perfdata=traffic_in,,percent() |
--extend-perfdata-group | Add new aggregated metrics (min, max, average or sum) for groups of metrics defined by a regex match on the metrics' names. Syntax: --extend-perfdata-group=regex,namesofnewmetrics,calculationt,one wuom],omin],imax]] regex: regular expression namesofnewmetrics: how the new metrics' names are composed (can use $1, $2... for groups defined by () in regex). calculation: how the values of the new metrics should be calculated newuom (optional): unit of measure for the new metrics min (optional): lowest value the metrics can reach max (optional): highest value the metrics can reach Common examples: Sum wrong packets from all interfaces (with interface need --units-errors=absolute): --extend-perfdata-group=',packets_wrong,sum(packets_(discard |error)_(in|out))' Sum traffic by interface: --extend-perfdata-group='traffic_in_(.*),traffic_$1,sum(traf fic_(in|out)_$1)' |
|
Hello all,
We can use percent fonction
--extend-perfdata='used,percent,percent(),%'
or with math fonction
--extend-perfdata='used,percent,math(current/205563826176*100),%,0,205563826176'
--extend-perfdata=searchlabel,newlabel,methodd,,newuom],,min],,max],,warning],,critical]]
Have a good day