Closed kozfelipe closed 7 years ago
I managed to insert the service including a template. Apparently its mandatory. Yet, I couldnt view it as my operating user. The service can only by viewed by admin user
on massive services import, clapi imports only the first service from script without check_command_arguments
[root@OP-CENTREON tmp]# centreon -u admin -p ****** -o SERVICE -a setparam -v "RTCE-RBO008-01;RTCE-RBO008-01 Traffic eth-1/1 ACL3000006;check_command_arguments;!eth-1/1"
-bash: !eth-1/1": event not found
clapi wont escape "!"
also another issue:
[root@OP-CENTREON tmp]# centreon -u admin -p ****** -o SERVICE -a setparam -v "RTCE-RBO008-01;RTCE-RBO008-01 Traffic eth-1/1 ACL3000006;service_use_only_contacts_from_hostname;0"
Please check that your parameters are valid
I managed to escape "!" with the following command:
centreon -u admin -p ****** -o SERVICE -a setparam -v "RTCE-RBO008-01;RTCE-RBO008-01 Traffic eth-1/1 ACL3000006;check_command_arguments;"'!'"eth-1/1"
and I ignored service_use_only_contacts_from_hostname setparam
after that the script continued the next services
A missing ACL association was preventing users to view imported services via clapi.
Im closing this issue
Centreon Web 2.8.4-5 Centreon Engine 1.6.1 Centreon Broker 3.0.1 CentOS release 6.8 (Final) MariaDB 5.5.53 CES VirtualBox
Unable to import services by host
here's my clapi-export.txt
here's my import output
here's the host
services by hostgroup works fine
here's an alternative trial (https://documentation.centreon.com/docs/centreon-clapi/en/latest/objects/services.html#add)
references: https://forum.centreon.com/forum/centreon-ui/centreon-clapi-import-export-automation-etc/139350-clapi-imports-all-except-services?p=139388#post139388
196