Hi lfat, Thank you for the answers, please see my reply inline.
On Tue, Aug 9, 2016 at 6:51 PM Afek, Ifat (Nokia - IL) <[email protected]> wrote: > Hi Yujun, > > Please see my answers below. > > Best Regards, > Ifat. > > From: Yujun Zhang > Date: Tuesday, 9 August 2016 at 12:06 > > > For proprietary datasource, I'm considering to adapt the api to common > protocol/interface, e.g. RESTful, SNMP and etc and I wish to know how to > add support for these interface. > > [Ifat]: Do you mean that you want to write a datasource that gets its > information from SNMP/REST API? Note that for alarm datasources, we have in > our roadmap to support OPNFV Doctor SB REST API[1]. Will it be relevant for > your use cases? > [yujunz] Great, this could also be a good start point for us > Some documents are found in https://github.com/openstack/vitrage-specs and >> datasource seems to be related to synchronizer but I didn't find a >> dedicated spec. >> > [Ifat]: We started documenting the process of adding a new datasource, but > the document is not final. We will try to finish it shortly. BTW, there are > many other documents in Vitrage wiki page[2]. > [yujunz] Thanks. > 1. How do I register a new datasource in an existing system? >> > [yujunz] It seems to be in https://github.com/openstack/vitrage/blob/master/vitrage/datasources/__init__.py > 2. Is the type of datasource (ALARM/RESOURCE) configured in >> `/etc/vitrage/datasource_values/<datasource>.yaml` ? >> > [Ifat]: No, it is configured in the datasource code. For information about > datasource_values please see [3] > [yujunz] which code file? I found `category: RESOURCE` in the datasource configuration file as https://github.com/openstack/vitrage/blob/master/doc/source/resource-state-config.rst#format > 3. Is there any other datasource type besides ALARM/RESOURCE? > > [Ifat]: No, and at the moment we don’t see a need for that. Vitrage can > hold resources of any type in a topology graph, and manage alarms that are > raised on these resources. If you see a use case for other datasource > types, let us know. > [yujunz] I agree. Just ask to confirm my guess :-) > 4. What does `aggregated values` and `priority` mean >> > [Ifat]: Detailed in [3] > [yujunz]: Clear now. > 5. What is the required data format for the datasource driver api? The >> inline comments give some brief description but didn't specify the api >> signature. >> Many thanks. >> > [Ifat]: This should be part of the datasource documentation that we need > to add. But basically, the driver should return a dictionary with few > predefined fields (like datasource type, timestamp), and add whatever data > is needed for the datasource. Then, the datasource transformer will > transform this data into a vertex and decide where to connect it to the > graph. > [yujunz] So if I understand it correctly, driver and transformer works as a pair and the intermediate data format is not exposed to vitrage. It consumes data from the sources and convert them into graph > [1] https://gerrit.opnfv.org/gerrit/12179 > [2] https://wiki.openstack.org/wiki/Vitrage > *[3] * > https://github.com/openstack/vitrage/blob/master/doc/source/resource-state-config.rst >
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: [email protected]?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
