Skip to content

Add stats server with debugging data

Tomasz Maczukin requested to merge feature/stats-server into master

What does this MR do?

This MR adds a HTTP Statistics Server with some debugging and statistic data that can be used by monitoring and performance tools.

Server can listen on a tcp or unix socket and can be configured both from the config.toml file and from the command line. Data is returned as JSON which should be a format easy to parse and use in most of present programing languages.

Example of the output:

{
    "started_at": "2016-07-01T23:26:58+02:00",
    "config_reloaded_at": "2016-07-01T23:26:58+02:00",
    "builds_count": 0,
    "runners_builds_counts": {
        "abc1234": 0,
        "def5678": 0
    },
    "uptime": 0.0517,
    "version_info": {
        "name": "gitlab-ci-multi-runner",
        "version": "1.3.0~beta.25.g9a1953d",
        "revision": "9a1953d",
        "branch": "feature/stats-server",
        "go_version": "go1.6.2",
        "built_at": "2016-07-01T23:26:43+02:00",
        "os": "linux",
        "architecture": "amd64"
    }
}

Why was this MR needed?

We need more debugging and statistic data to improve runner's monitoring mechanisms. We also need statistic data to work on performance improvements.

Does this MR meet the acceptance criteria?

  • CHANGELOG entry added
  • Documentation created/updated
  • Tests
    • Added for this feature/bug
    • Shared runners are enabled (if you are using a forked repository as a source of this MR)
    • All builds are passing
  • Branch has no merge conflicts with master (if it does - rebase it please)

/cc @ayufan

Merge request reports

Loading