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

How to create custom panel for custom log format #2779

Open
BKSoftCraft opened this issue Jan 5, 2025 · 3 comments
Open

How to create custom panel for custom log format #2779

BKSoftCraft opened this issue Jan 5, 2025 · 3 comments

Comments

@BKSoftCraft
Copy link

BKSoftCraft commented Jan 5, 2025

How to create custom panel for my custom header ?

192.168.1.1 - - [23/Dec/2024:12:34:56 +0000] "GET /index.html HTTP/1.1" 200 612 "Custom-Header-1" "Custom-Header-2" "https://example.com" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"

@BKSoftCraft BKSoftCraft changed the title How to create custom panel How to create custom panel for custom log format Jan 6, 2025
@allinurl
Copy link
Owner

allinurl commented Jan 7, 2025

You can use:

goaccess access.log --log-format='%h %^[%x] "%r" %s %b "%v" "%e" "%R" "%u"' --datetime-format='%d/%b/%Y:%H:%M:%S %z' --date-spec=min

2025-01-06-205235_373x232_scrot

@BKSoftCraft
Copy link
Author

Is there any way I can merge this custom header as on value let say Custom-Header-1/Custom-Header-2 in one panel and I also want separate value.

In above solution %v & %e is for server name & user id respectively. Is there any way to create custom panel for custom header in config file.

@allinurl
Copy link
Owner

allinurl commented Jan 9, 2025

You’ll need to preprocess the log to merge those fields first—using awk should work—then simply pipe the output to GoAccess. At the moment, there are no custom panels, but issue #515 will address this. Stay tuned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants