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

Errors when importing from Elasticsearch #109

Closed
seb9988 opened this issue Apr 8, 2021 · 1 comment
Closed

Errors when importing from Elasticsearch #109

seb9988 opened this issue Apr 8, 2021 · 1 comment

Comments

@seb9988
Copy link

seb9988 commented Apr 8, 2021

Hi,
I'm trying to import events from Elasticsearch using your python script (I'm using python 3.8.8), but got an error:

C:\LogonTracer>python logontracer.py --es --es-server https://xxx:9200 --es-user xxx --es-pass xxx --es-cafile \xxx.cer -z +2 -f 2021-04-08T08:00:00 -t 2021-04-08T08:00:30
[+] Script start. 2021/04/08 09:07:21
[+] Neo4j Kernel version: 4.2.2
[+] Time zone is 2.
[+] Search ES from 2021-04-08 08:00:00.
[+] Search ES to 2021-04-08 08:00:30.
[+] Start searching the ES.
Traceback (most recent call last):
File "logontracer.py", line 1857, in <module>
main()
File "logontracer.py", line 1851, in main
parse_es()
File "logontracer.py", line 1569, in parse_es
event_series = pd.Series([eventid, ipaddress, username, logintype, status, authname, int(stime.strftime("%s"))], index=event_set.columns)
ValueError: Invalid format string

It looks like stime.strftime("%s") is not supported, see https://stackoverflow.com/questions/11743019/convert-python-datetime-to-epoch-with-strftime or https://bugs.python.org/issue12750.

Could you have a look?
Best regards,

@shu-tom
Copy link
Member

shu-tom commented Apr 14, 2021

Thank you for using LogonTracer. I've fixed it from strftime to timestamp.

@shu-tom shu-tom closed this as completed Apr 28, 2021
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

2 participants