YPSI-SAS / centctl

Centctl is a Go CLI which allows to manage multiple Centreon servers.
MIT License
11 stars 4 forks source link

Bug with contact export #10

Closed Arawn777 closed 2 years ago

Arawn777 commented 2 years ago

Hi there :)

First I would like to thanks, CentCTL is great, just discovered it a week ago.

But I have an issue with it. When I try to export a contact, and import it in an oher centreon platform, some notifications parameters has not been imported.

When I look in the .csv which contains my exported contact, it seems that some lines are missing. I only got theese ones:

add,contact,"test_un",test1,test1@mondomaine.fr,sqLe$Jrltv, modify,contact,test1,pager, modify,contact,test1,access,1 modify,contact,test1,admin,1 modify,contact,test1,activate,1

Nothing about Notifications enabled, Host and Services notifications, etc...

Here is a screenshot of my test contact in the web interface before export: contact

I expected something like this https://github.com/YPSI-SAS/centctl/blob/master/exemple/importContact.csv

What I exactly did: ./centctl --server=centreon-centos export contact -r test -f contacts.csv ./centctl --server=centreon-rocky import contact -f contacts.csv

I run Centreon 20.10 on CentOS 7 (VMware) Centreon 21.10 on Rocky Linux 8.4 (VMware)

Thank you for your help 👍

MelissaB79 commented 2 years ago

Hello, We are pleased to learn that the tool is useful to you.

For the export of contacts, it is not yet possible to export all the information related to a contact. The Rest API v1 of centreon does not have the getParam function for contacts and the API v2 does not handle contacts. As soon as the API allows the retrieval of all information of a contact, the export function for contact will be enriched.

Thank you for your contribution 😉

Arawn777 commented 2 years ago

Ok thank you for your time !