-
Notifications
You must be signed in to change notification settings - Fork 47
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
Update GitHub audit log path for GitHub Enterprise 2.11 #8
Conversation
Thanks for this pull request, @rashamalek! It’s interesting to hear that GitHub Enterprise changed the log file location from 2.10 to 2.11. For now, we shouldn’t assume that users are on GitHub Enterprise ≥ 2.11 necessarily. I won’t be able to implement the switch in the next days though, as I have many other things to do. And for your information, I want to add a GitHub Enterprise version check at some point to make sure that Hubble runs on a supported version 😃. |
@rashamalek We can use this command to check the GHE version: https://github.com/larsxschneider/scotty/blob/a68d16339a6da8cd20559ce36533f148e3376d47/lib-ghe.sh#L66-L67 We'll get this in soon as we plan to upgrade to 2.11, too 😄 |
updater/scripts/git-download.sh
Outdated
@@ -4,7 +4,7 @@ | |||
# | |||
echo -e "repository\tuser\tcloning?\trequests/day\tdownload/day [B]" | |||
|
|||
zcat -f /var/log/github/audit.log.1* | | |||
zcat -f /var/log/github-audit.log.1* | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make this variable based on the output here: https://github.com/larsxschneider/scotty/blob/a68d16339a6da8cd20559ce36533f148e3376d47/lib-ghe.sh#L66-L67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, Doing a version check is reasonable, will try to adapt it.
Thanks for the update, @rashamalek! However, I fear hat looking for I think the best solution would be to select the file locations based on the GitHub Enterprise version in use, and to always take a |
@pluehne Sorry, It was not supposed to be pushed to Autodesk/hubble, It was an internal test, will fix it |
No worries, you can always rebase this branch 😃. |
@rashamalek I cherry picked your commit and added support for pre 2.11 in #11 |
on ghe 2.11.2 the github-audit path is a link (/var/log/github/audit.log) to /var/log/github-audit.log
this leads to an empty git-download.tsv and an empty result in hubble/housekeeping-git-traffic.
Rotated logs are kept as /var/log/github/audit.log.[1-9].*
This pr changes the ghe-audit log path in hubble/updater/script/gith-download.sh from
/var/log/github/audit.log.1* -> /var/log/github-audit.log.1*