Failure to push data through CLI
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
congress |
Triaged
|
Medium
|
Unassigned |
Bug Description
Could be user error, but pushing data via the CLI seems to not work. Didn't test the API directly with curl.
(openstack) congress datasource create doctor push
+------
| Field | Value |
+------
| config | None |
| description | None |
| driver | doctor |
| enabled | True |
| id | 71eba7e6-
| name | push |
| type | None |
+------
(openstack) congress datasource row update push data '[ ["data1", "data2"], ["data3", "data4"]]'
Bad Request:
Changed in congress: | |
assignee: | nobody → Anusha (anusha-iiitm) |
Changed in congress: | |
assignee: | Anusha (anusha-iiitm) → nobody |
Changed in congress: | |
status: | New → Confirmed |
status: | Confirmed → Triaged |
Managed to get this working, but it was a struggle. As a user I didn't know what the schema should be for pushing data, so I used the 'congress driver schema show' command. That doesn't give me the right answer because it's the schema for the data *after* it has been translated. So then I looked up the schema used to do the pushing in the source code. Not sure exactly how to make the user experience better.
$ openstack congress datasource row update push events '[{"id": "0", "time": "2016", "type": "compute. host.down" , "details": {"hostname": "a", "status": "down", "monitor": "up", "monitor_event_id": "beta"}}]' /opt/stack/ python- congressclient$ openstack congress datasource row list push events -----+- ------- ------- ----+-- ------- -+----- ---+--- ------+ ------- ------- ----+ -----+- ------- ------- ----+-- ------- -+----- ---+--- ------+ ------- ------- ----+ -----+- ------- ------- ----+-- ------- -+----- ---+--- ------+ ------- ------- ----+
styra@ubuntu:
+----+-
| id | time | type | hostname | status | monitor | monitor_event_id |
+----+-
| 0 | 2016 | compute.host.down | a | down | up | beta |
+----+-
I also hit another 500 error..
$ openstack congress datasource row update push events '[{"id": "0", "time": "2016", "type": "compute. host.down" , "hostname": "bob", "status": "up", "monitor": "here", "monitor_event_id": "there", "details": "whatever"}]' dc09-4b91- 86d0-2048b2a197 9f)
Internal server error (HTTP 500) (Request-ID: req-d492b373-