Sign inSign up

peimanja/test

By peimanja

•Updated over 6 years ago

Image
0

175

peimanja/test repository overview

⁠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 VariableRequiredDefaultDescription
web.listen-address
WEB_LISTEN_ADDR
No:9531Address to listen on for web interface and telemetry.
web.telemetry-path
WEB_TELEMETRY_PATH
No/metricsPath under which to expose metrics.
artifactory.scrape-uri
ARTI_SCRAPE_URI
Nohttp://localhost:8081/artifactoryURI on which to scrape JFrog Artifactory.
artifactory.ssl-verify
ARTI_SSL_VERIFY
NotrueFlag that enables SSL certificate verification for the scrape URI.
artifactory.timeout
ARTI_TIMEOUT
No5sTimeout for trying to get stats from JFrog Artifactory.
log.levelNoinfoOnly log messages with the given severity or above. One of: [debug, info, warn, error].
log.formatNologfmtOutput format of log messages. One of: [logfmt, json].
ARTI_USERNAME*NoUser to access Artifactory
ARTI_PASSWORD*NoPassword of the user accessing the Artifactory
ARTI_ACCESS_TOKEN*NoAccess 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:

MetricDescriptionLabelsOSS support
artifactory_upWas the last scrape of Artifactory successful.✅
artifactory_exporter_total_scrapesCurrent total artifactory scrapes.✅
artifactory_exporter_total_api_errorsCurrent total Artifactory API errors when scraping for stats.✅
artifactory_exporter_json_parse_failuresNumber of errors while parsing Json.✅
artifactory_replication_enabledReplication status for an Artifactory repository (1 = enabled).name, type, cron_exp
artifactory_security_groupsNumber of Artifactory groups.
artifactory_security_usersNumber of Artifactory users for each realm.realm
artifactory_storage_artifactsTotal artifacts count stored in Artifactory.✅
artifactory_storage_artifacts_size_bytesTotal artifacts Size stored in Artifactory in bytes.✅
artifactory_storage_binariesTotal binaries count stored in Artifactory.✅
artifactory_storage_binaries_size_bytesTotal binaries Size stored in Artifactory in bytes.✅
artifactory_storage_filestore_bytesTotal space in the file store in bytes.storage_dir, storage_type✅
artifactory_storage_filestore_used_bytesSpace used in the file store in bytes.storage_dir, storage_type✅
artifactory_storage_filestore_free_bytesSpace free in the file store in bytes.storage_dir, storage_type✅
artifactory_storage_repo_used_bytesSpace used by an Artifactory repository in bytes.name, package_type, type✅
artifactory_storage_repo_foldersNumber of folders in an Artifactory repository.name, package_type, type✅
artifactory_storage_repo_filesNumber files in an Artifactory repository.name, package_type, type✅
artifactory_storage_repo_itemsNumber Items in an Artifactory repository.name, package_type, type✅
artifactory_artifacts_created_1mNumber of artifacts created in the repo (last 1 minute).name, package_type, type✅
artifactory_artifacts_created_5mNumber of artifacts created in the repo (last 5 minutes).name, package_type, type✅
artifactory_artifacts_created_15mNumber of artifacts created in the repo (last 15 minutes).name, package_type, type✅
artifactory_artifacts_downloaded_1mNumber of artifacts downloaded from the repository (last 1 minute).name, package_type, type✅
artifactory_artifacts_downloaded_5mNumber of artifacts downloaded from the repository (last 5 minutes).name, package_type, type✅
artifactory_artifacts_downloaded_15mNumber of artifacts downloaded from the repository (last 15 minute).name, package_type, type✅
artifactory_system_healthyIs Artifactory working properly (1 = healthy).✅
artifactory_system_licenseLicense type and expiry as labels, seconds to expiration as valuetype, licensed_to, expires✅
artifactory_system_versionVersion and revision of Artifactory as labels.version, revision✅

Tag summary

Content type

Image

Digest

Size

14.7 MB

Last updated

over 6 years ago

docker pull peimanja/test:v1.0.6