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

Log view on dashboard completely empty #170

Open
certrik opened this issue Jun 22, 2023 · 4 comments
Open

Log view on dashboard completely empty #170

certrik opened this issue Jun 22, 2023 · 4 comments

Comments

@certrik
Copy link

certrik commented Jun 22, 2023

I don't know how to debug it or where I can have a look but it seems that the log view on the dashboard somehow is broken. It doesnt show anything but I already feeded one week of pastebin pastes into AIL 5.0.
grafik

@xme
Copy link
Contributor

xme commented Jun 22, 2023

Same here... I see that pasties are processed and stored in PASTIES/ but nothing else...

@fukusuket
Copy link
Contributor

fukusuket commented Jul 9, 2023

I am in the same situation, so I did some research :)

The log file that is the source of the Log view dashboard is as follows.
(Currently, Logs/Script_warn- is hard-coded, so I think that only the warn level is displayed on the dashboard)

@dashboard.route("/_get_last_logs_json")
@login_required
@login_read_only
def get_last_logs_json():
date = datetime.datetime.now().strftime("%Y%m%d")
max_day_search = 6
day_search = 0
warning_found = 0
warning_to_found = max_dashboard_logs
last_logs = []
date_range = get_date_range(date, max_day_search)
while max_day_search != day_search and warning_found != warning_to_found:
filename_warning_log = f'logs/Script_warn-{date_range[day_search]}.log'
filename_log = os.path.join(os.environ['AIL_HOME'], filename_warning_log)

Also, in the above warn log, only the logs that do not return False with the following functions are displayed on the dashboard.(Only if the log message split by semicolon and the split length is 6)

def dashboard_alert(log):
# check if we need to display this log
if len(log) > 50:
date = log[1:5]+log[6:8]+log[9:11]
utc_str = log[1:20]
log = log[46:].split(';')
if len(log) == 6:
date_time = datetime_from_utc_to_local(utc_str)
path = url_for('objects_item.showItem', id=log[5])
res = {'date': date, 'time': date_time, 'script': log[0], 'domain': log[1], 'date_paste': log[2],
'paste': log[3], 'message': log[4], 'path': path}
return res

I think that current behavior is the logs corresponding to the above are displayed on the dashboard.

@fukusuket
Copy link
Contributor

fukusuket commented Jul 13, 2023

If it matches the WARN log mentioned above, I can confirm that the log is displayed on the screen.(AIL v5.2)
スクリーンショット 2023-07-14 2 39 21

@KhaledEid020
Copy link

If it matches the WARN log mentioned above, I can confirm that the log is displayed on the screen.(AIL v5.2) スクリーンショット 2023-07-14 2 39 21

Can u send the OVA file for this machine?

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

4 participants