[Dprglist] Visualizing data [was: PID]
Murray Altheim
murray18 at altheim.com
Sat Oct 10 15:19:45 PDT 2020
Hi Bob,
I've made a modicum of progress with the Elasticsearch Docker instance. Turns out
it was as simple as not including "http://" in the host name in the python, i.e.,
the code didn't want a URL, it wanted a host name. Kinda duh really.
In any case, my ping now works, I've been able to figure out the API, creating,
checking existence of, and deleting indices, and creating (overwriting or not)
single Elasticsearch records from some hardwired JSON. All good. I've not yet
tried again to connect Grafana to Elasticsearch.
I don't think the timestamps will be an issue. I don't really need the date, so
I'm currently formatting them as "hh:mm:ss.SSSSSS", e.g., "22:31:53.618.565083".
I just modified my existing Logger so that if I add "log_to_file=True" to the
constructor I'll get a timestamped CSV file written to the ./log/ directory at
the end of the run. Easy peasy.
My current class (still early days) is at:
https://github.com/ifurusato/ros/blob/master/elastic.py
So I guess the next step is to convert my CSV-like rows into individual JSON
documents, and feeding them up to the Elasticsearch engine. Like you I'm not too
concerned with performance. If it takes a minute, big deal.
I'd earlier thought that the CSV file from an entire robot run (an entire
spreadsheet) would be uploaded rather than by row, but your code seems to be
writing to the server row-by-row.
Was there a reason for that, i.e., that's the way Elasticsearch expects the data?
Cheers,
Murray
On 4/10/20 7:07 am, Bob Cook via DPRGlist wrote:
> Oh and one more thing: ElasticSearch is expecting something like milliseconds[...]
...........................................................................
Murray Altheim <murray18 at altheim dot com> = = ===
http://www.altheim.com/murray/ === ===
= = ===
In the evening
The rice leaves in the garden
Rustle in the autumn wind
That blows through my reed hut.
-- Minamoto no Tsunenobu
More information about the DPRGlist
mailing list