Skip to main content

Hello

I’m trying to understand why are the perfdata collected by some plugins are getting so much information in the metric names, and  is there a way to filter/rename them

Right now I’m using centreon 20.10, with plan to upgrade to 21.10, so maybe all this below won’t make any sense, or is explained by some evolution I have yet to discover.

 

I had to monitor some ubiquiti unifi AP and Aruba Instant SSL recently, but instead of getting simple cpu/load or traffic metric I get some output that are difficult to work with

 

example for here is the output for Aruba : 

usr/lib/centreon/plugins//centreon_aruba_instant_snmp.pl --plugin=network::aruba::instant::snmp::plugin     --mode=ap-usage     --hostname=10.10.10.10     --snmp-version='2c'     --snmp-community='test'     --filter-name=''     --warning-status=''     --critical-status='%{status} !~ /up/i'     --warning-cpu=''     --critical-cpu=''     --warning-clients='20'     --critical-clients='50'     --warning-mem-usage=''     --critical-mem-usage=''     --warning-mem-usage-free=''     --critical-mem-usage-free=''     --warning-mem-usage-prct='' --critical-mem-usage-prct='' --verbose

OK: total access points: 1 - Access Point 'e8:26:89:c9:xx:xx' Status is 'up', Current Clients: 2, Cpu: 1.00%, Memory Total: 920.44 MB Used: 491.73 MB (53.42%) Free: 428.70 MB (46.58%) | 'accesspoints.total.count'=1;;;0; 'e8:26:89:c9:xx:xx#clients.current.count'=2;0:20;0:50;0; 'e8:26:89:c9:xx:xx#cpu.utilization.percentage'=1.00%;;;0;100 'e8:26:89:c9:xx:xx#memory.usage.bytes'=515620864B;;;0;965148672 'e8:26:89:c9:xx:xx#memory.free.bytes'=449527808B;;;0;965148672 'e8:26:89:c9:xx:xx#memory.usage.percentage'=53.42%;;;0;100
Access Point 'e8:26:89:c9:xx:xx' Status is 'up', Current Clients: 2, Cpu: 1.00%, Memory Total: 920.44 MB Used: 491.73 MB (53.42%) Free: 428.70 MB (46.58%)

so usually with this kind of output, if you --filter-perfdata=’cpu’ , you only get the cpu metrics, without the additional stuff, but here the output with the filter on cpu

OK: total access points: 1 - Access Point 'e8:26:89:c9:xx:xx' Status is 'up', Current Clients: 2, Cpu: 2.00%, Memory Total: 920.44 MB Used: 491.01 MB (53.35%) Free: 429.43 MB (46.65%) | 'e8:26:89:c9:xx:xx#cpu.utilization.percentage'=2.00%;;;0;100

 

the most annoying is on the traffic discovered by the autodiscover for a single interface, I had this on ubiquity, there is a parameters that specifically says “--use-new-perfdata” in the template

| 'eth0#interface.traffic.in.bitspersecond'=43001.51b/s;;;0;1000000000 'eth0#interface.traffic.out.bitspersecond'=42328.69b/s;;;0;1000000000 'eth0#interface.packets.in.discard.percentage'=0.00%;;;0;100 'eth0#interface.packets.in.error.percentage'=0.00%;;;0;100 'eth0#interface.packets.out.discard.percentage'=0.00%;;;0;100 'eth0#interface.packets.out.error.percentage'=0.00%;;;0;100
Interface 'eth0' Status : up (admin: up), Traffic In : 43.00Kb/s (0.00%), Traffic Out : 42.33Kb/s (0.00%), Packets In Discard : 0.00% (0 on 3768), Packets In Error : 0.00% (0 on 3768), Packets Out Discard : 0.00% (0 on 2556), Packets Out Error : 0.00% (0 on 2556)

wiithout that paremeters

'traffic_in'=291873.33b/s;;;0;1000000000 'traffic_out'=212420.00b/s;;;0;1000000000 'packets_discard_in'=0.00%;;;0;100 'packets_error_in'=0.00%;;;0;100 'packets_discard_out'=0.00%;;;0;100 'packets_error_out'=0.00%;;;0;100
Interface 'eth0' Status : up (admin: up), Traffic In : 291.87Kb/s (0.03%), Traffic Out : 212.42Kb/s (0.02%), Packets In Discard : 0.00% (0 on 1805), Packets In Error : 0.00% (0 on 1805), Packets Out Discard : 0.00% (0 on 1362), Packets Out Error : 0.00% (0 on 1362)

which are workable with, I can make my report with these data, and I don’t see the point of adding the name of the interface, or the name of the system when I know specifically which interface I’m monitoring. (hell, even the Centreon BI report uses the metric name to generate the reports!)

 

unfortunately, not all check have this --use-new-perfdata in the command, or is there an hidden “use old perfdata” somewhere? 

in the ubiquity case, I could add this to the command of the “load” check

--change-perfdata='.*,,eval(%(label) =~ s/system.loadaverage.5m.count/load5/g)' --change-perfdata='.*,,eval(%(label) =~ s/system.loadaverage.1m.count/load1/g)' --change-perfdata='.*,,eval(%(label) =~ s/system.loadaverage.15m.count/load15/g)'

and this to the memory metric :

--change-perfdata='.*,,eval(%(label) =~ s/memory.usage.bytes/used/g)' --filter-perfdata='used'

this gave me  similar result to existing OS/check/graph template already in place, 

 

but for the Aruba, I have the device mac address in the metric name, I guess I could play around with Regex and replacement, but couldn’t make it works (I’m bad at regex)

 

sorry for the long exposition(rant), here the real questions :

are these new name of metrics something that come with an evolution on how perfdata and graph visualisation work with 21.10?

are the BI Reports provided by centreon going to get updated to use these metric names?

Are the display curves able to work with these metric name (I.E: ignoring everything left of the “#” in the metric name)

or is centreon moving to a change in how the metric are stored  somehow (I see more and more json and openmetric option in the plugin commands, and with all these “.” in the metric name, it looks like some data reorganization, but I may be wrong)

 

I couldn’t find a lot of information/roadmap/plan for the future, but I’m not sure where to look

 


Hello @christophe.niel-ACT ,

I’ll try to answers a few questions.. Until 2-3 years ago, our metric names didn’t have an established format so we wanted to have a one. The idea is to:

  • easily understand what the metric is
  • identify the “instance” of a metric
  • ease the use of our metrics outside of Centreon

All new Centreon Plugins come with theses changes and we are slowly rolling them out in all existing Centreon Plugins.

 

are these new name of metrics something that come with an evolution on how perfdata and graph visualisation work with 21.10?

Centreon Plugins are independant of the version. An user with a very old Centreon version would see the same changes with updated Plugins.

 

are the BI Reports provided by centreon going to get updated to use these metric names?

MBI will get updated/evolve too. No ETA on this yet.

 


Reply