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

The "recordings" tab is empty if the agent name contains an underscore "_" #89

Open
AMD-NICK opened this issue Mar 19, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@AMD-NICK
Copy link

I am not familiar with GoLang or the project structure, but it seems that the issue is related to this code:

fileParts := strings.Split(fileName, "_")

When running the agent with the environment variable AGENT_NAME=some_name, the "Number of days" field in the dashboard always shows 0, while the "Total recordings" field displays the correct number of recordings. However, the "Recordings" tab and "Latest events" remain empty.

Changing the agent's name from "some_name" to "some-name" fixes the issue.

@AMD-NICK
Copy link
Author

screenshot_2023-03-19_13 39 12@2x

Perhaps a good solution would be to create a parsing function for the name based on a regular expression like this: ^(\d+)_(\d+-\d+)_(.+)_(\d+-\d+-\d+-\d+)_(\d+)_(\d+).mp4$

@cedricve
Copy link
Member

thanks @AMD-NICK you are 100% correct. This is a legacy thing, within the Kerberos Hub we expect files to be formatted using _ to separate different variables. Therefore we don't allow agent names including a _, they will be replace by a - when using the UI, but don't do this with environment variables.

Would think it makes sense to have an implicit rename in the startup process of the agent, and throw a warning in the console log?

@cedricve cedricve self-assigned this Mar 19, 2023
@cedricve cedricve added the bug Something isn't working label Mar 19, 2023
@AMD-NICK
Copy link
Author

Yes, I think it would be a good solution, although it sounds a little "hacky" 🙂

@cedricve
Copy link
Member

Yes I agree, and it should be done differently but we would need to rework some parts of our applications to handle that. Looks like a strange design decision in the past, but still this can be integrated. Let's leave the issue open for a reference, and future work. Thank you for your input @AMD-NICK highly appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants