Skip to main content

Hi, I’m trying to import services via CLAPI but I get an error.

I have imported hosts, hostTemplates and other .cfgs without problems, even serviceTemplates.cfg but now I get and objectNotFound error.

 

I dont know why this happens, I have alredy imported the serviceTemplates… Any idea?

👋

 

@aalz0  Did you follow the format here?

 

https://docs.centreon.com/docs/api/clapi/#import

 

and do the actions for services match?

 

https://docs.centreon.com/docs/api/clapi/#services

 

🤔

 


Thanks for the reply, I will try to do the actions for services match.

 


I have try to add only one service, and I think that the problem is that for each service there can be only one servicetemplate defined. I have checked my centreon_clapi_import_commands.txt and I have multiple templates defined. 

Is there anyway to add more than one template for each service (maybe putting some special character -$, ! …) or I have to make a script to modify thw whole .txt?


The problem is that Centreon only allows to add ONE servicetemplate to a service, but it allows to more than one template to a Host.

In NagiosQL there is the possibilitie to add more than one template to Hosts and to Services, why has been this changed? Its only for the last version or this happens in all versions? It makes no sense for me.

 

Which the way to use more than one template for a service? Doing a categorie?


Is it possible that we might be talking about “Inheritance” as they build on each other

 

https://docs.centreon.com/docs/monitoring/basic-objects/services-templates/#inheritance

 

🤞


Reply