Skip to main content
Solved

How to Exclude a system partition

  • November 27, 2025
  • 5 replies
  • 28 views

Forum|alt.badge.img+6

Hello,

anyone know how to exclude a system partition that does not have a letter?

 

As a workaround a regex that exlude partition with less than 500mb could do the job too.

thanks in advance

best regards,

Best answer by vcoum

In the FILTER macro, add this at the end of the actual value

and letter regexp '[a-zA-Z]'

Complete filter

type = 'fixed' and name not regexp '.*System Reserved.*' and letter regexp '[a-zA-Z]'

It should return drives with a letter

5 replies

vcoum
Centreon Lord Commander
Forum|alt.badge.img+13
  • Centreon Lord Commander
  • November 27, 2025

Hello,

What plugin are you using?

 


Forum|alt.badge.img+6
  • Author
  • Steward **
  • November 27, 2025

Hello,

What plugin are you using?

 

i am using this one

with some regex :

/usr/lib64/nagios/plugins/check_centreon_nrpe3 -H 10.************* -p 5666 -t 30 -u -2 -P 8192  -c check_drivesize -a "drive=*" "perf-config=used(unit:GB)used %(ignored:true)" "filter=type = 'fixed' and name not regexp '.*System Reserved.*'" "warning=total_used>85%" "critical=total_used>95%" detail-syntax='Disk '%(drive)' Free: %(free) (%(free_pct)%) Total: %(size) Used: %(used) (%(used_pct)%)'

 

best regards,


vcoum
Centreon Lord Commander
Forum|alt.badge.img+13
  • Centreon Lord Commander
  • Answer
  • November 27, 2025

In the FILTER macro, add this at the end of the actual value

and letter regexp '[a-zA-Z]'

Complete filter

type = 'fixed' and name not regexp '.*System Reserved.*' and letter regexp '[a-zA-Z]'

It should return drives with a letter


vcoum
Centreon Lord Commander
Forum|alt.badge.img+13
  • Centreon Lord Commander
  • November 27, 2025

As an alternative, with your other idea, you can also filter to get only drives bigger than 500MB, like this

and size > 500000000.0

Size must be set in Bytes, and must have a ‘.0’ at the end

Complete filter

type = 'fixed' and name not regexp '.*System Reserved.*' and size > 500000000.0

Hope it helps


Forum|alt.badge.img+6
  • Author
  • Steward **
  • November 27, 2025

In the FILTER macro, add this at the end of the actual value

and letter regexp '[a-zA-Z]'

Complete filter

type = 'fixed' and name not regexp '.*System Reserved.*' and letter regexp '[a-zA-Z]'

It should return drives with a letter

This one worked! thank you very much!