Skip to main content

Hello all,

 

Using the Virt-VMWare2-ESX-Memory-Generic service, I want to be able to graph the values as a percentage.

https://docs.centreon.com/pp/integrations/plugin-packs/procedures/virtualization-vmware2-esx/

 

By default, the plugin outputs these three performance data, but the one that interests me the most is missing.

'used'=83033128960B;;;0;205563826176
'overhead'=0B;;;0;
'state'=0;;;0;3

 

To this I would add at the output of the service a performance metric which calculates and graphs the percentage. I would hope to do this with the “EXTRAOPTIONS” but I don't know how.

 

Does anyone know if this is possible ? without having to rewrite the official script ? 

I need it for this case but it could be used in other contexts and plugins

 

Thanks a lot

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)'
 

Reply