hastic-zzz / hastic-server

Hastic data management server for analyzing patterns and anomalies from Grafana
GNU General Public License v3.0
330 stars 23 forks source link

Failing to find timestamp in prometheus query dataframe #521

Open jonyrock opened 5 years ago

jonyrock commented 5 years ago

I got this error when tried to make a jumps on prometheus metric from query:

node_cpu{cpu="cpu0", mode="iowait"}
  File "bin/../analytics/analytic_unit_manager.py", line 96, in handle_analytic_task
    result_payload = await self.__handle_analytic_task(task)
  File "bin/../analytics/analytic_unit_manager.py", line 83, in __handle_analytic_task
    return await worker.do_train(payload['segments'], data, payload['cache'])
  File "bin/../analytics/analytic_unit_worker.py", line 34, in do_train
    new_cache: ModelCache = await asyncio.wait_for(self._training_future, timeout = config.LEARNING_TIMEOUT)
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "bin/../analytics/detectors/pattern_detector.py", line 49, in train
    new_cache = self.model.fit(dataframe, segments, self.analytic_unit_id, cache)
  File "bin/../analytics/models/model.py", line 77, in fit
    segment = Segment(dataframe, segment_map, self.find_segment_center)
  File "bin/../analytics/models/model.py", line 18, in __init__
    self.start = utils.timestamp_to_index(dataframe, pd.to_datetime(self['from'], unit='ms'))
  File "bin/../analytics/utils/common.py", line 74, in timestamp_to_index
    raise ValueError('Dataframe has no appropriate timestamp {}'.format(timestamp))
ValueError: Dataframe has no appropriate timestamp 2019-04-06 04:13:35.744000
'

image

image

jonyrock commented 5 years ago

@amper43 what is the status of this issue?

amper43 commented 5 years ago

@jonyrock it planned on current sprint