Question

Export Settings

  • 29 March 2022
  • 1 reply
  • 70 views

Badge +3

Hello,

I would like to export from e.g. the database,
export host and its hostgroup.

with clapi I get the host and its IP, but would also like to have the respective host group to it.

./centreon -u admin -p password -o HOST -a show
for example
id;name;alias;address;activate
23;TEST;Test Server;192.168.1.1;0

 

Thanks

 

 


1 reply

Userlevel 3
Badge +10

Hi !

You can get linked hostgroups of a specific host by using following command :

./centreon -u <user> -p <password> -o HOST -a gethostgroup -v "<host_name>"

 

It is documented here : https://docs.centreon.com/docs/21.04/api/clapi/#gethostgroup

 

Hope it solves your issue

Reply