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

Need date and time of workflow build run information. #281

Closed
ChandrasekharDevops opened this issue Nov 10, 2023 · 7 comments · Fixed by #282
Closed

Need date and time of workflow build run information. #281

ChandrasekharDevops opened this issue Nov 10, 2023 · 7 comments · Fixed by #282
Labels
enhancement New feature or request
Milestone

Comments

@ChandrasekharDevops
Copy link

Currently the exporter supports workflows status like success and failures (owner, repo, workflow, event, workflow name, status, branch, workflow id number, run number, run number id.).

But this exporter doesn’t support when the workflow is triggered like date and time. It is helpful to add workflow trigger date and time feature on this exporter. Could you pls help on this.

@tboerger
Copy link
Member

If you want to have that as another metric this should be quite easy.

@tboerger
Copy link
Member

I have just merged a PR to add metrics for timestamps of created, updated and started workflows. You should see this within the latest container tag in a few minutes.

@ChandrasekharDevops
Copy link
Author

Thanks for added new enhancement(workflow trigger date and time), I have configured below details in my docker-compose.yml file and added latest docker image as per your comments.
But unable to see these metrics(github_workflow_started_timestamp,
github_workflow_updated_timestamp) on latest docker image. Even workflow related metrics also not visible.
If I use promhippie/github-exporter:2.4.0 docker image I'm able to get workflow metrics but recent added metrics not getting.

Could you please help me on this. Below are the environment variables which I'm using latest docker image.

image: promhippie/github-exporter:latest
environment:
  - GITHUB_EXPORTER_TOKEN=github token
  - GITHUB_EXPORTER_REQUEST_TIMEOUT=5m
  - GITHUB_EXPORTER_PER_PAGE=5000
  - GITHUB_EXPORTER_LOG_LEVEL=debug
  - GITHUB_EXPORTER_LOG_PRETTY=true
  - GITHUB_EXPORTER_REPO= organization/repo name
  - GITHUB_EXPORTER_COLLECTOR_WORKFLOWS=true
  - GITHUB_EXPORTER_WORKFLOWS_WINDOW=24h0m0s

@tboerger
Copy link
Member

As stated within the docs the workflow metrics require a github webhook which got to access the exporter on a single endpoint. This have been introduced with 3.0.0 to avoid all the issues that came up with the pull approach used prior 3.0.0. For local testing you could use a tool like ngrok as a target of the github webhook.

After enabling the webhook you should receive data from GitHub for every build.

@ChandrasekharDevops
Copy link
Author

Thank you @tboerger, As you suggested above comments, I have tried that like docker image 3.0.0 version but still unable to get new enhancement changes. even tried ngrok and github webhook approach also but no luck.

I have referred this article: https://promhippie.github.io/github_exporter

Could you pls help me on this issue.

@tboerger
Copy link
Member

Please share the information what you are doing now. What has changed? You created the webhook and you are sending it via ngrok to the exporter. What else have you done, how have you configured the exporter?

@tboerger
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants