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

Git traffic and tokenless authentication charts empty after GHE upgrade #139

Closed
talktopiyush opened this issue Mar 21, 2018 · 29 comments
Closed
Assignees
Labels

Comments

@talktopiyush
Copy link

Hello there,

We have hubble as service on a dedicated machine and we recently did GHE upgrade from v2.11 to v2.12.6 and after this hubble does not show the git traffic/ there is no data in git-download.tsv

fyi, there are no errors reported when we run update-stats.py.

In general do we need to do anything before or after we apply an update to GHE.

Regards
Piyush

@talktopiyush
Copy link
Author

talktopiyush commented Mar 21, 2018

similarly no data (or marked as zero against date) in tokenless-authentication.tsv since the upgrade.

@pluehne pluehne self-assigned this Mar 21, 2018
@pluehne
Copy link
Contributor

pluehne commented Mar 21, 2018

Hi @talktopiyush! Thanks for reaching out about these two issues. We noticed the issues with the Git traffic charts as well, and they should be fixed by #138.

I’d like you to check out the latest commit in the master branch and to run the Hubble updater again. This should resolve the first part of the issue. (The context is that we made changes to the naming of the data series, and unfortunately, these weren’t reflected in the data files that the updater produces. Hence, the dashboard couldn’t find the data anymore and would show empty charts.)

Concerning the tokenless authentication chart, there was a change in GitHub’s log file format from 2.11 to 2.12 that broke our script for that chart’s data. I’m currently working on this and hope to have a patch out later today.

As a general suggestion, we recommend that you use the latest release (currently, 0.2.0) and not the master branch directly. Also, we’re trying to avoid issues on master as best as we could, but we can’t guarantee forward compatibility with new GitHub Enterprise versions unfortunately.

@pluehne
Copy link
Contributor

pluehne commented Mar 21, 2018

@talktopiyush: In the meantime, please let me know whether #138 fixed the issues you experienced with the Git traffic charts.

@pluehne pluehne changed the title hubble housekeeping git traffic does not load after GHE upgrade Git traffic and tokenless authentication charts empty after GHE upgrade Mar 21, 2018
@pluehne pluehne added this to To Do in Hubble Enterprise 0.3.0 via automation Mar 21, 2018
@pluehne
Copy link
Contributor

pluehne commented Mar 21, 2018

@talktopiyush: I forgot to notify you, but we merged my fix #141 that should resolve your issue with the tokenless authentication chart. It would be great if you could test all these changes and tell me whether we can close this issue 😃.

@rajivmucheli
Copy link

Hi @pluehne post upgrading, i can confirm Git Traffic Chart is populating data but tokenless-authentication-detailed.tsv FAILS, please note tokenless authentication.tsv gets updated.

@pluehne
Copy link
Contributor

pluehne commented Apr 6, 2018

@rajivmucheli: Happy to hear that the Git traffic chart is fixed for you now. Can you explain what exactly fails with the detailed tokenless authentications report? Is it just empty or do you get an error message?

Also note that the tokenless authentications chart has recently received a fix in #141. Did you experience the issue before or after this pull request had been merged?

@rajivmucheli
Copy link

The report doesn’t process i.e wouldn’t update like other reports. Hubble-data repo for this repo shows last updated was 16th March, which was we updated GHE to 2.12.

I guess after the pull request? I see this fox was on 16th March as well!

@pluehne
Copy link
Contributor

pluehne commented Apr 9, 2018

@rajivmucheli: Do you get any errors in the log? GitHub Enterprise 2.12 is meant to be supported by Hubble, so this shouldn’t be a problem. Also, could you try manually executing tokenless-auth.sh on your GitHub Enterprise appliance? It would be interesting to know whether this script produces output and, if not, errors.

@pluehne
Copy link
Contributor

pluehne commented Apr 9, 2018

@talktopiyush: It would be interesting for me to know whether you’re facing the same issues as @rajivmucheli 🙂.

If everything is resolved for you, I’d like to close this very issue and to open a new one for the problems with the detailed tokenless authentications chart that @rajivmucheli is facing.

@talktopiyush
Copy link
Author

@pluehne we are in the same work group :)

@pluehne
Copy link
Contributor

pluehne commented Apr 9, 2018

@talktopiyush: That’s what I suspected, but I wanted to make sure that these aren’t two unrelated issues 😄. If you have the time, it would help if you could try what I suggested above a few minutes ago 🙂.

@talktopiyush
Copy link
Author

@pluehne We have updated hubble to the latest commit. hopefully tomorrow this will get populated. keep you posted. myself or @rajivmucheli will keep you posted. thanks for the help

@pluehne
Copy link
Contributor

pluehne commented Apr 9, 2018

@talktopiyush, @rajivmucheli: All right, and thanks for helping us debug the issue 🙂!

@rajivmucheli
Copy link

@pluehne

I am not sure if the latest updated fixed the issue, i initially executed update-stats.py manually but had no luck. As suggested by you, (i gave chmod +x tokenless-auth.sh) to the script, o/p is:

[scripts]# ./tokenless-auth.sh
user repository tokenless authentications
cat: /etc/github/enterprise-release: No such file or directory
gzip: /var/log/github/gitauth.log.1*.gz: No such file or directory

Prior to the upgrade it worked well, hence would creating the above directories help?

@pluehne
Copy link
Contributor

pluehne commented Apr 9, 2018

@rajivmucheli: Just to be sure, did you execute tokenless-auth.sh on the GitHub Enterprise appliance? It won’t work on your local machine 🙂.

@rajivmucheli
Copy link

@pluehne hope there wont be any impact? to confirm i copy the script & execute?

@pluehne
Copy link
Contributor

pluehne commented Apr 9, 2018

I generally recommend you review whatevery you intend to execute on a GitHub Enterprise appliance. As you will see, tokenless-auth.sh only performs a few file processing commands.

From my experience, the script doesn’t take long to complete (less than a minute, I would expect), and it is executed with each call of update-stats.py anyway. That’s why I would say that it is safe to copy and execute on your GitHub Enterprise instance 🙂.

@rajivmucheli
Copy link

the scrip executes successfully, gives me tons of user info (like it initially worked):

./token.sh
user repository tokenless authentications
**confidential info

@pluehne
Copy link
Contributor

pluehne commented Apr 9, 2018

@rajivmucheli: Good, that means that the script itself is working as expected. Hence, I would think that the tokenless authentications are correctly collected by Hubble’s updater.

Out of curiosity, can you confirm that the (confidential) output you got is indeed different from the tokenless-authentication-detailed.tsv that’s in your hubble-data repository?

Also, can you once again look at whether update-stats.py produces any warning or error message concerning the tokenless authentications report? For your convenience, you may temporarily comment out all the reports in update-stats.py except the ReportTokenlessAuth line, just for testing. In this way, only this single report will be updated, saving you some time.

@rajivmucheli
Copy link

@pluehne

Yes, output is indeed different from the tokenless-authentication-detailed.tsv.

I uncommented all the other reports & the script went well:

python3 update-stats.py
Preparing update of GitHub usage statistics

Started update of tokenless-authentication.tsv

/tmp/hubble-data/tokenless-authentication.tsv
/tmp/hubble-data/tokenless-authentication-detailed.tsv
Finished update of tokenless-authentication.tsv (runtime: 7.619 s)

Initially, tokenless-authentication-detailed.tsv would not show in the list when update-stats.py is executed, but post a executing the shell script on GHE yesterday may have done the trick.

python3 update-stats.py
Preparing update of GitHub usage statistics

Started update of tokenless-authentication.tsv

/tmp/hubble-data/tokenless-authentication.tsv
/tmp/hubble-data/tokenless-authentication-detailed.tsv
Finished update of tokenless-authentication.tsv (runtime: 7.619 s)

To git@github.wdf.sap.corp:github/hubble-data.git
d899c00..a6524f9 master -> master

Finished update of GitHub usage statistics
[root@mo-9f6653b76 updater]# vi update-stats.py
[root@mo-9f6653b76 updater]# python3 update-stats.py
Preparing update of GitHub usage statistics

Started update of api-requests.tsv
c

/tmp/hubble-data/api-requests.tsv
/tmp/hubble-data/api-requests-detailed.tsv
Finished update of api-requests.tsv (runtime: 77.547 s)
Started update of contributors-by-organization.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/contributors-by-organization.tsv
Finished update of contributors-by-organization.tsv (runtime: 2.105 s)
Started update of contributors-by-repository.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/contributors-by-repository.tsv
Finished update of contributors-by-repository.tsv (runtime: 1.893 s)
Started update of forks-to-organizations.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/forks-to-organizations.tsv
/tmp/hubble-data/forks-to-organizations-detailed.tsv
Finished update of forks-to-organizations.tsv (runtime: 1.181 s)
Started update of git-download.tsv

/tmp/hubble-data/git-download.tsv
/tmp/hubble-data/git-download-detailed.tsv
Finished update of git-download.tsv (runtime: 34.141 s)
Started update of git-requests.tsv

/tmp/hubble-data/git-requests.tsv
/tmp/hubble-data/git-requests-detailed.tsv
Finished update of git-requests.tsv (runtime: 32.188 s)
Started update of git-versions.tsv

/tmp/hubble-data/git-versions.tsv
Finished update of git-versions.tsv (runtime: 26.679 s)
Started update of organization-activity.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/organization-activity.tsv
Finished update of organization-activity.tsv (runtime: 11.869 s)
Started update of org-collaboration.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/org-collaboration.tsv
Finished update of org-collaboration.tsv (runtime: 62.293 s)
Started update of org-owners.tsv

/tmp/hubble-data/org-owners.tsv
Finished update of org-owners.tsv (runtime: 64.906 s)
Started update of organizations-abandoned.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/organizations-abandoned.tsv
/tmp/hubble-data/organizations-abandoned-detailed.tsv
Finished update of organizations-abandoned.tsv (runtime: 7.005 s)
Started update of orgs-total.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/orgs-total.tsv
Finished update of orgs-total.tsv (runtime: 1.209 s)
Started update of pull-requests-by-organization.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/pull-requests-by-organization.tsv
Finished update of pull-requests-by-organization.tsv (runtime: 5.273 s)
Started update of pull-requests-by-repository.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/pull-requests-by-repository.tsv
Finished update of pull-requests-by-repository.tsv (runtime: 5.507 s)
Started update of pull-request-history.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/pull-request-history.tsv
Finished update of pull-request-history.tsv (runtime: 2.182 s)
Started update of pull-request-usage.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/pull-request-usage.tsv
Finished update of pull-request-usage.tsv (runtime: 16.829 s)
Started update of repository-activity.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/repository-activity.tsv
/tmp/hubble-data/repository-activity-detailed.tsv
Finished update of repository-activity.tsv (runtime: 38.664 s)
Started update of repository-history.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/repository-history.tsv
Finished update of repository-history.tsv (runtime: 1.550 s)
Started update of repositories-personal-nonowner-pushes.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/repositories-personal-nonowner-pushes.tsv
/tmp/hubble-data/repositories-personal-nonowner-pushes-detailed.tsv
Finished update of repositories-personal-nonowner-pushes.tsv (runtime: 2.531 s)
Started update of repository-usage.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/repository-usage.tsv
Finished update of repository-usage.tsv (runtime: 5.841 s)
Started update of teams-legacy.tsv

/tmp/hubble-data/teams-legacy.tsv
/tmp/hubble-data/teams-legacy-detailed.tsv
Finished update of teams-legacy.tsv (runtime: 51.180 s)
Started update of teams-total.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/teams-total.tsv
Finished update of teams-total.tsv (runtime: 1.068 s)
Started update of tokenless-authentication.tsv
/tmp/hubble-data/tokenless-authentication.tsv
Finished update of tokenless-authentication.tsv (runtime: 0.001 s)
Started update of users.tsv
mysql: [Warning] Using a password on the command line interface can be insecure.

mysql: [Warning] Using a password on the command line interface can be insecure.

/tmp/hubble-data/users.tsv
Finished update of users.tsv (runtime: 13.749 s)

Have a good one 👍

@pluehne
Copy link
Contributor

pluehne commented Apr 10, 2018

@rajivmucheli: Happy to hear that you got updated data now. However, I don’t see a reason why it didn’t work before but it does now.

Let’s give it a few days. Could you tell me by the end of the week whether you got updates with the detailed tokenless authentications report every day without trouble?

@pluehne
Copy link
Contributor

pluehne commented Apr 16, 2018

@rajivmucheli, @talktopiyush: Is everything still working fine on your end? I’d just like to know whether we can close this issue 🙂.

@talktopiyush
Copy link
Author

Yes it works again.

thanks

Hubble Enterprise 0.3.0 automation moved this from To Do to Done Apr 16, 2018
@pluehne
Copy link
Contributor

pluehne commented Apr 16, 2018

@talktopiyush: Thanks for the update!

@talktopiyush
Copy link
Author

@pluehne maybe you could confirm this, graph are updated only once in a day regardless of how many times we execute the python script?

@pluehne
Copy link
Contributor

pluehne commented Apr 16, 2018

@talktopiyush: Yes. If Hubble detects that there already is data from today for a given chart, it will not update the chart again. That’s to avoid recording duplicate values in the data files.

@talktopiyush
Copy link
Author

@rajivmucheli this confirms why we did not have any data in the graphs even after update to the latest release on that day but it populated the next day.

@talktopiyush
Copy link
Author

@pluehne thanks again

@pluehne
Copy link
Contributor

pluehne commented Apr 16, 2018

@talktopiyush: Yep, I should have thought about this. In these cases, it’s necessary to remove the most recent Hubble commit, at least for testing 🙂.

I’m happy to help. Feel free to stay in touch with us should you have suggestions or other comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

No branches or pull requests

3 participants