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

Using absolute time while searching #96

Open
arunmathews opened this issue Dec 24, 2021 · 1 comment
Open

Using absolute time while searching #96

arunmathews opened this issue Dec 24, 2021 · 1 comment

Comments

@arunmathews
Copy link

How can I pass in an absolute time when running a search using the cli ? When I tried it like this

humioctl ... -s 1640040603936

I got the error

Could not parse 6 to a known time unit. unit=6
humioctl -v
humioctl 0.28.11 (f128a9f6232a8bcebc942e2e228a55fc8f9a6ae7 on 2021-10-25T10:52:26Z)
@ryjogo
Copy link

ryjogo commented Apr 18, 2022

I think this is due to

cli/api/search.go

Lines 21 to 22 in 74bc201

Start string `json:"start,omitempty"`
End string `json:"end,omitempty"`

Perhaps this could be interface{} instead? when this changes, the request is sent as an int and Humio can then parse the exact time, not relative when sent as string.

Alternative could perhaps be to check if int, and type assert before sending out the request..

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