Skip to main content
Question

Export Settings

  • March 29, 2022
  • 1 reply
  • 220 views

Forum|alt.badge.img+8

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

kduret
Centreonian
Forum|alt.badge.img+10
  • Centreonian
  • March 30, 2022

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