mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Elasticsearch Timestamp in UTC
Elasticsearch timestamps are expected to be in UTC. Currently the returner sends the timestamp in localtime.
This commit is contained in:
parent
b70ffe2bb8
commit
e84b5c530e
@ -141,7 +141,7 @@ def returner(ret):
|
|||||||
'''
|
'''
|
||||||
es_ = _get_instance()
|
es_ = _get_instance()
|
||||||
_create_index(es_, __salt__['config.get']('elasticsearch:index'))
|
_create_index(es_, __salt__['config.get']('elasticsearch:index'))
|
||||||
the_time = datetime.datetime.now().isoformat()
|
the_time = datetime.datetime.utcnow().isoformat()
|
||||||
ret['@timestamp'] = the_time
|
ret['@timestamp'] = the_time
|
||||||
es_.index(index=__salt__['config.get']('elasticsearch:index'),
|
es_.index(index=__salt__['config.get']('elasticsearch:index'),
|
||||||
doc_type='returner',
|
doc_type='returner',
|
||||||
|
Loading…
Reference in New Issue
Block a user