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

Pipelines export seems to not poll for pipleines #34

Closed
ghost opened this issue Nov 7, 2019 · 6 comments
Closed

Pipelines export seems to not poll for pipleines #34

ghost opened this issue Nov 7, 2019 · 6 comments

Comments

@ghost
Copy link

ghost commented Nov 7, 2019

Hi.

I've installed the exporter with a simple configuration.

In logs i see that he found projects, but i get no info about pipelines, and in the logs there is no information about the problem.

Teh token configuration must be right because i've used it with timoschwazer gitlab-monitor, and it worked.

Confgiuration:

# URL and Token with sufficient permissions to access your GitLab's projects
# pipelines informations
gitlab:
  url: [omitted]
  token: [omitted]
  health_url: https://gitlab.mag-news.it/-/health  # Alternative URL for determining health of GitLab API (readiness probe)
  skip_tls_verify: false                           # disable TLS verification

# Custom waiting time between polls for projects, their refs and pipelines (in seconds, optional)
projects_polling_interval_seconds: 1800 # only used for wildcards
refs_polling_interval_seconds: 300
pipelines_polling_interval_seconds: 60
pipelines_max_polling_interval_seconds: 1800 # when no pipeline exists for a given ref, the exporter will exponentially backoff up to this value

# Default regexp for parsing the refs (branches and tags) to monitor (optional, default to master)
# default_refs: "^master$"

# The list of the projects you want to monitor

# Dynamically fetch projects to monitor using a wildcard
wildcards:
  # Fetch projects belonging to a group and potentially its subgroups
  - owner:
      name: dms
      kind: group
      include_subgroups: true # optional (default: false)
    refs: "^master$"
    search: '' # optional (defaults to '')
@mvisonneau
Copy link
Owner

👋 @cobra1978, have you tried to run it with --log-level debug ? Are you not seeing any metrics either ? 🤔

@ghost
Copy link
Author

ghost commented Nov 7, 2019

I'm running the docker image, and even with log level debug.

The prometheus configuration is right because it sees the target and give me scrape duration with no errors.

In the exporter logs i see only lines about projects, about some projects without master branch ore pipleines, butt this is ok, not all of our project had pipelines, but nothing about founded pipelines and no error.

@ghost
Copy link
Author

ghost commented Nov 7, 2019

Can you tell me what privileges the user used to retrieve data need to have, i think the problem is here.

@mvisonneau
Copy link
Owner

mvisonneau commented Nov 7, 2019

You need the read_repository scope with at least guest or reporter permissions on the project. If you are using a wilcard, you probably need at least guest or reporter on the group your are pointing to as well. I believe that for user wildcards, you need to have a token issued by this user.

@ghost
Copy link
Author

ghost commented Nov 7, 2019

Ok, created a new user with right privileges and it seems to work, but in the grafana dasboard there is an error:

some metrics are gitlab_ci_pipeline_status bu they should be gitlab_ci_pipeline_last_run_status

You can close the issue.

@mvisonneau
Copy link
Owner

indeed, the dashboard in the repo is up to date but not the one on grafana.com

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

No branches or pull requests

1 participant