<div dir="ltr">I tried the doctorDriver again. This time I was successful! I'm still getting an error when listing the datasources though. I tried updating and installing my client, but no change.<div><br></div><div>// Create the datasource</div><div>$ openstack congress datasource create doctor doctor</div><div>+-------------+--------------------------------------+</div><div>| Field | Value |</div><div>+-------------+--------------------------------------+</div><div>| config | None |</div><div>| description | None |</div><div>| driver | doctor |</div><div>| enabled | True |</div><div>| id | 3717095c-25a7-4fe2-8f18-25d845b11c60 |</div><div>| name | doctor |</div><div>| type | None |</div><div>+-------------+--------------------------------------+</div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">// Push data</span></div><div><span style="line-height:1.5">$ curl -g -i -X PUT <a href="http://localhost:1789/v1/data-sources/3717095c-25a7-4fe2-8f18-25d845b11c60/tables/events/rows">http://localhost:1789/v1/data-sources/3717095c-25a7-4fe2-8f18-25d845b11c60/tables/events/rows</a> -H "User-Agent: python-congressclient" -H "Content-Type: application/json" -H "Accept: application/json" -d '[ </span><br></div><div><div>> {</div><div>> "id": "0123-4567-89ab",</div><div>> "time": "2016-02-22T11:48:55Z",</div><div>> "type": "compute.host.down",</div><div>> "details": {</div><div>> "hostname": "compute1",</div><div>> "status": "down",</div><div>> "monitor": "zabbix1",</div><div>> "monitor_event_id": "111"</div><div>> }</div><div>> }</div><div>> ]'</div><div>HTTP/1.1 200 OK</div><div>Content-Type: application/json; charset=UTF-8</div><div>Content-Length: 0</div><div>X-Openstack-Request-Id: req-47c6dfdf-74cd-4101-829a-657b6aea1e2c</div><div>Date: Thu, 24 Mar 2016 18:28:31 GMT</div><div><br></div><div><br></div><div>// Ask for contents of table that we pushed</div><div>$ openstack congress datasource row list doctor events</div><div>+----------------+------------------+------------------+----------+--------+---------+------------------+</div><div>| id | time | type | hostname | status | monitor | monitor_event_id |</div><div>+----------------+------------------+------------------+----------+--------+---------+------------------+</div><div>| 0123-4567-89ab | 2016-02-22T11:48 | compute.host.dow | compute1 | down | zabbix1 | 111 |</div><div>| | :55Z | n | | | | |</div><div>+----------------+------------------+------------------+----------+--------+---------+------------------+</div><div><br></div><div><br></div><div>// List the datasources</div><div>$ openstack congress datasource list</div><div>'NoneType' object has no attribute 'items'</div><div><br></div></div><div>Tim</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Mar 17, 2016 at 5:56 PM Tim Hinrichs <<a href="mailto:tim@styra.com">tim@styra.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I tried the doctor driver out. I just added the file to congress/datasources, and set up /etc/congress/congress.conf to include congress.datasources.doctor_driver.DoctorDriver.</div><div><br></div><div>I could create a new doctor driver, but afterwards I couldn't list all the datasources, and I couldn't push any data to it. See transcript below. </div><div><br></div><div>$ openstack congress datasource create doctor doctor<br></div><div><div>+-------------+--------------------------------------+</div><div>| Field | Value |</div><div>+-------------+--------------------------------------+</div><div>| config | None |</div><div>| description | None |</div><div>| driver | doctor |</div><div>| enabled | True |</div><div>| id | 906c6327-15f1-4f3c-aa51-1590540c06b9 |</div><div>| name | doctor |</div><div>| type | None |</div><div>+-------------+--------------------------------------+</div><div><br></div><div>$ openstack congress datasource list</div><div>'NoneType' object has no attribute 'items'</div></div><div><br></div><div><div><div>The other problem I saw was that the schema was fixed for the doctor driver. So I tried to create a push driver that would accept any collection of tuples. This wouldn't allow the user to push arbitrary JSON, but they could push any tuples they'd like. While experimenting, I fixed the problem mentioned above by adding a single (unnecessary) configuration option. Then I ran into a Datasource not found problem. I pushed the code to review so we can all take a look.</div></div></div><div><br></div><div><a href="https://review.openstack.org/294348" target="_blank">https://review.openstack.org/294348</a><br></div><div><br></div><div><div>$ curl -g -i -X PUT <a href="http://localhost:1789/v1/data-sources/push/tables/data/rows" target="_blank">http://localhost:1789/v1/data-sources/push/tables/data/rows</a> -H "User-Agent: python-congressclient" -H "Content-Type: application/json" -H "Accept: application/json" -d '[[1]]'</div><div>HTTP/1.1 404 Not Found</div><div>Content-Type: application/json; charset=UTF-8</div><div>Content-Length: 102</div><div>X-Openstack-Request-Id: req-23432974-b107-4657-9bbc-c2e05fd25a98</div><div>Date: Thu, 17 Mar 2016 21:13:03 GMT</div><div><br></div><div>{"error": {"message": "Not Found::Datasource not found push", "error_data": null, "error_code": 404}}</div></div><div><br></div><div>Masahito: do you know what the Datasource Not Found problem is? If not, could you look into it? I ran into it with the Doctor Driver too.</div></div><div dir="ltr"><div><br></div><div dir="ltr"><div>Tim</div><div><br></div></div></div><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">On Thu, Mar 17, 2016 at 2:31 AM Masahito MUROI <<a href="mailto:muroi.masahito@lab.ntt.co.jp" target="_blank">muroi.masahito@lab.ntt.co.jp</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi folks,<br>
<br>
This[1] is the driver I mentioned at meeting. It is used for OPNFV<br>
Doctor[2]. So I plan to push it into master in Newton release, since<br>
feature freeze for Mitaka was passed and the schema of its translator is<br>
under the discussion.<br>
<br>
If it's worth to push it in current release to test push driver, I don't<br>
mind doing it.<br>
<br>
[1]<br>
<a href="https://github.com/muroi/congress/blob/doctor-poc/congress/datasources/doctor_driver.py" rel="noreferrer" target="_blank">https://github.com/muroi/congress/blob/doctor-poc/congress/datasources/doctor_driver.py</a><br>
[2] <a href="https://wiki.opnfv.org/doctor" rel="noreferrer" target="_blank">https://wiki.opnfv.org/doctor</a><br>
<br>
--<br>
室井 雅仁(Masahito MUROI)<br>
Software Innovation Center, NTT<br>
Tel: +81-422-59-4539<br>
<br>
<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div></div></blockquote></div>