Skip to main content
Question

Centreon 24.10 - CLAPI - stpl getmacro

  • December 16, 2024
  • 1 reply
  • 58 views

Forum|alt.badge.img+10

Hi,

since upgrade to 24.10 from 23.04 we can’t GETMACRO from clapi command.

ie: 

sudo centreon -u XXX -p "XXX" -o STPL -a SHOW -v "Virt-VMWare2-Vm-Tools-Generic-custom"
id;description;alias;check command;check command arg;normal check interval;retry check interval;max check attempts;active checks enabled;passive checks enabled
130;Virt-VMWare2-Vm-Tools-Generic-custom;Vm-Tools;Virt-VMWare2-VM-Tools-Global-Custom;;;;;2;2

but :

sudo centreon -u XXX -p "XXX" -o STPL -a GETMACRO -v "Virt-VMWare2-Vm-Tools-Generic-custom"
macro name;macro value;description;is_password
PHP Warning: Uninitialized string offset 0 in /usr/share/centreon/www/class/centreon-clapi/centreonObject.class.php on line 668
EXTRAOPTIONS;--verbose;;0
PHP Warning: Uninitialized string offset 0 in /usr/share/centreon/www/class/centreon-clapi/centreonObject.class.php on line 668
SERVICEID;VMware-064;;0


 

1 reply

Forum|alt.badge.img+10
  • Author
  • Builder *
  • December 19, 2024

same for :
sudo centreon -u "XXXX" -p "XXXX" -o HOST -a GETMACRO -v "HOSTNAME" | awk -F";" '/MYMACRO/ {print $2}' 2>/dev/null | grep -v "PHP Warning"

 

give me:
PHP Warning: Uninitialized string offset 0 in /usr/share/centreon/www/class/centreon-clapi/centreonObject.class.php on line 668
PHP Warning: Uninitialized string offset 0 in /usr/share/centreon/www/class/centreon-clapi/centreonObject.class.php on line 668
PHP Warning: Uninitialized string offset 0 in /usr/share/centreon/www/class/centreon-clapi/centreonObject.class.php on line 668
PHP Warning: Uninitialized string offset 0 in /usr/share/centreon/www/class/centreon-clapi/centreonObject.class.php on line 668
PHP Warning: Uninitialized string offset 0 in /usr/share/centreon/www/class/centreon-clapi/centreonObject.class.php on line 668
PHP Warning: Uninitialized string offset 0 in /usr/share/centreon/www/class/centreon-clapi/centreonObject.class.php on line 668
PHP Warning: Uninitialized string offset 0 in /usr/share/centreon/www/class/centreon-clapi/centreonObject.class.php on line 668
4365

 

but i want only:
4365