Comments (2)
This snippet should get the versions from the audit log:
$ zcat -f /var/log/github-audit.log.1* | perl -ne 'print if s/.*agent=git\/(\d+(?:\.\d+){0,2}).*"user_id":(\d+).*/\2\t\1/' | sort | uniq | perl -lape 's/\d+ *//' | sort -r -V | uniq -ic
This should also include SSH connections. However, I wonder should take any Git client into considerations with a regex like this (note: I use the user instead of IP here too):
$ zcat -f /var/log/github-audit.log.1* | perl -ne 'print if s/.*agent=git\/(\d+(?:\.\d+){0,2}).*"user_id":(\d+).*/\2\t\1/' | sort | uniq | perl -lape 's/\d+ *//' | sort -r -V | uniq -ic
Even further we could look for other agents:
$ zcat -f /var/log/github-audit.log.1* | perl -ne 'print if s/.*agent=([^\/" ]+\/\d+(?:\.\d+){0,2}).*"user_id":(\d+).*/\2\t\1/' | sort | uniq | perl -lape 's/\d+ *//' | sort | uniq -ic
This would also record JGit
clients and the output would look like this:
1 git/2.9.0
2 git/2.9.2
3 git/2.9.3
4 JGit/4.5.0
5 JGit/4.6.1
6 JGit/4.8.0
@pluehne Could that be easily be made compatible with your versions check logic? Could everything not git/*
be considered "unknown"?
from hubble.
@larsxschneider: I just realize that you addressed most of this issue in #185, which we already merged.
However, I like the idea of recording the client agents in git-versions.tsv
. We could extend the chart to support a mixed data format (with pure versions or versions prefixed by the client agent). Alternatively, we could also write a data migration that prefixes all older entries with git/
to make them compatible (would allow for a cleaner implementation on the dashboard side). What do you think?
from hubble.
Related Issues (20)
- Feature Request: Adding Search Analytics
- Monitor successful backup runs HOT 1
- GHE - Hubble implementation, not able to view dashboard HOT 13
- Cannot parse missing logs after upgrade - KeyError http HOT 2
- List number of deleted repos / archived_repositories
- How to make hubble work for an org on github.com? HOT 3
- Security vulnerabilities found HOT 3
- Hubble install issues HOT 6
- Count number of noop fetches
- Use admin SSH key for data repo
- Enable remote run with docker
- New report for Failed Authentication and menu organization HOT 2
- Does Hubble support gitlab and how to configure itοΌ HOT 1
- Multiple issues after upgrade to GHES 3.0.8 HOT 8
- Issue while running the code on 3.1.0 HOT 3
- Feature Request: Organization Activity Aggregates HOT 5
- ReportRepoSize not working after 3.x upgrade. HOT 3
- Recommended Git Versions: Update git version database so statistics are reflected correctly
- Feature Request: Templatize `dataUrl` and `footer`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hubble.