Skip to main content
Question

CMA plugins sets statefile-dir='' which results in write to /

  • July 1, 2026
  • 1 reply
  • 5 views

Forum|alt.badge.img+6

Hello

When using service template :

OS-Linux-Cpu-Centreon-Monitoring-Agent -> Generic-Passive-CMA-Service-custom -> Generic-Passive-CMA-Service

 

check command is set to :

/usr/lib/centreon/plugins//centreon_linux_local.pl --plugin='os::linux::local::plugin' --mode='cpu'  --warning-core='' --critical-core='' --warning-average='' --critical-average='' --statefile-dir='' 

 

 

but when --statefile-dir=’’, plugin tries to write in /, which results in :

     
UNKNOWN: Cannot write statefile '/cache_linux_local_me_cpu_a181a603769c1f98ad927e7367c7aa51'. Need write/exec permissions on directory.

 

=> the flag --statefile-dir=’’ should be removed from the default command / template

1 reply

Forum|alt.badge.img+6
  • Author
  • Steward **
  • July 1, 2026

Looking at the locked command played, a fix would be to set $_HOSTCENTREONAGENTSTATEFILEDIR$ to a custom dir.

but this macro is not in the default “Generic-Passive-CMA-Host” so not editable.