Giter VIP home page Giter VIP logo

artifactory_exporter's Introduction

JFrog Artifactory Exporter

GitHub Workflow Status Docker Build Go Report Card

A Prometheus exporter for JFrog Artifactory stats.

Note

This exporter is under development and more metrics will be added later. Tested on Artifactory Enterprise and OSS version 6.16.0.

Authentication

The Artifactory exporter requires admin user and it supports multiple means of authentication. The following methods are supported:

  • Basic Auth
  • Bearer Token

Basic Auth

Basic auth may be used by setting ARTI_USERNAME and ARTI_PASSWORD environment variables.

Bearer Token

Artifactory access tokens may be used via the Authorization header by setting ARTI_ACCESS_TOKEN environment variable.

Usage

Binary

Download the binary for your operation system from release page and run it:

$ ./artifactory_exporter <flags>

Docker

Set the credentials in env_file_name and you can deploy this exporter using the peimanja/artifactory_exporter Docker image: :

$ docker run --env-file=env_file_name -p 9531:9531 peimanja/artifactory_exporter:latest <flags>

Flags

$  docker run peimanja/artifactory_exporter:latest -h
usage: main --artifactory.user=ARTIFACTORY.USER [<flags>]

Flags:
  -h, --help                    Show context-sensitive help (also try --help-long and --help-man).
      --web.listen-address=":9531"
                                Address to listen on for web interface and telemetry.
      --web.telemetry-path="/metrics"
                                Path under which to expose metrics.
      --artifactory.scrape-uri="http://localhost:8081/artifactory"
                                URI on which to scrape JFrog Artifactory.
      --artifactory.ssl-verify  Flag that enables SSL certificate verification for the scrape URI
      --artifactory.timeout=5s  Timeout for trying to get stats from JFrog Artifactory.
      --log.level=info          Only log messages with the given severity or above. One of: [debug, info, warn, error]
      --log.format=logfmt       Output format of log messages. One of: [logfmt, json]
Flag / Environment Variable Required Default Description
web.listen-address
WEB_LISTEN_ADDR
No :9531 Address to listen on for web interface and telemetry.
web.telemetry-path
WEB_TELEMETRY_PATH
No /metrics Path under which to expose metrics.
artifactory.scrape-uri
ARTI_SCRAPE_URI
No http://localhost:8081/artifactory URI on which to scrape JFrog Artifactory.
artifactory.ssl-verify
ARTI_SSL_VERIFY
No true Flag that enables SSL certificate verification for the scrape URI.
artifactory.timeout
ARTI_TIMEOUT
No 5s Timeout for trying to get stats from JFrog Artifactory.
log.level No info Only log messages with the given severity or above. One of: [debug, info, warn, error].
log.format No logfmt Output format of log messages. One of: [logfmt, json].
ARTI_USERNAME *No User to access Artifactory
ARTI_PASSWORD *No Password of the user accessing the Artifactory
ARTI_ACCESS_TOKEN *No Access token for accessing the Artifactory
  • Either ARTI_USERNAME and ARTI_PASSWORD or ARTI_ACCESS_TOKEN environment variables has to be set.

Metrics

Some metrics are not available with Artifactory OSS license. The exporter returns the following metrics:

Metric Description Labels OSS support
artifactory_up Was the last scrape of Artifactory successful.
artifactory_exporter_build_info Exporter build information. version, revision, branch, goversion
artifactory_exporter_total_scrapes Current total artifactory scrapes.
artifactory_exporter_total_api_errors Current total Artifactory API errors when scraping for stats.
artifactory_exporter_json_parse_failures Number of errors while parsing Json.
artifactory_replication_enabled Replication status for an Artifactory repository (1 = enabled). name, type, cron_exp
artifactory_security_groups Number of Artifactory groups.
artifactory_security_users Number of Artifactory users for each realm. realm
artifactory_storage_artifacts Total artifacts count stored in Artifactory.
artifactory_storage_artifacts_size_bytes Total artifacts Size stored in Artifactory in bytes.
artifactory_storage_binaries Total binaries count stored in Artifactory.
artifactory_storage_binaries_size_bytes Total binaries Size stored in Artifactory in bytes.
artifactory_storage_filestore_bytes Total space in the file store in bytes. storage_dir, storage_type
artifactory_storage_filestore_used_bytes Space used in the file store in bytes. storage_dir, storage_type
artifactory_storage_filestore_free_bytes Space free in the file store in bytes. storage_dir, storage_type
artifactory_storage_repo_used_bytes Space used by an Artifactory repository in bytes. name, package_type, type
artifactory_storage_repo_folders Number of folders in an Artifactory repository. name, package_type, type
artifactory_storage_repo_files Number files in an Artifactory repository. name, package_type, type
artifactory_storage_repo_items Number Items in an Artifactory repository. name, package_type, type
artifactory_artifacts_created_1m Number of artifacts created in the repo (last 1 minute). name, package_type, type
artifactory_artifacts_created_5m Number of artifacts created in the repo (last 5 minutes). name, package_type, type
artifactory_artifacts_created_15m Number of artifacts created in the repo (last 15 minutes). name, package_type, type
artifactory_artifacts_downloaded_1m Number of artifacts downloaded from the repository (last 1 minute). name, package_type, type
artifactory_artifacts_downloaded_5m Number of artifacts downloaded from the repository (last 5 minutes). name, package_type, type
artifactory_artifacts_downloaded_15m Number of artifacts downloaded from the repository (last 15 minute). name, package_type, type
artifactory_system_healthy Is Artifactory working properly (1 = healthy).
artifactory_system_license License type and expiry as labels, seconds to expiration as value type, licensed_to, expires
artifactory_system_version Version and revision of Artifactory as labels. version, revision

Grafana Dashboard

Dashboard can be found here.

Grafana dDashboard Grafana dDashboard

artifactory_exporter's People

Contributors

mstansberry avatar peimanja avatar rohitggarg avatar rohitggarg-qb avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.