Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metrics parser is not working in time format ISO8601 #1

Open
mtulio opened this issue Apr 29, 2021 · 0 comments
Open

Metrics parser is not working in time format ISO8601 #1

mtulio opened this issue Apr 29, 2021 · 0 comments

Comments

@mtulio
Copy link

mtulio commented Apr 29, 2021

Metrics parser is not working in time format ISO8601 and delimiter ";" (not sure if the standard one is ',' or ';')

>>>> Opened metrics.csv
Traceback (most recent call last):
  File "//start.py", line 5, in <module>
    from esxtop_metric_server import esxtop_bp
  File "/esxtop_metric_server.py", line 171, in <module>
    reloadMetrics()
  File "/esxtop_metric_server.py", line 164, in reloadMetrics
    metrics["time"].append(timeToMillis(columns[0].replace('"', '')))
  File "/esxtop_metric_server.py", line 124, in timeToMillis
    return datetime.strptime(time,'%m/%d/%Y %H:%M:%S').timestamp()
  File "/usr/local/lib/python3.9/_strptime.py", line 568, in _strptime_datetime
    tt, fraction, gmtoff_fraction = _strptime(data_string, format)
  File "/usr/local/lib/python3.9/_strptime.py", line 349, in _strptime
    raise ValueError("time data %r does not match format %r" %
ValueError: time data '2021-04-28T21:17:00.000Z;88;0;52;1;0;0;0;0;3;0;0;0;0;4;0;5;0;20;0;0;4263;49;2896;0;0;0;302;0;0;0;0;1;0;0;0;1014;4352\n' does not match format '%m/%d/%Y %H:%M:%S'
1
podman start -a esxtop-grafana_grafana_1

A working arround is in progress in https://github.com/mtulio/esxtop-grafana/tree/devel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant