peimanja / artifactory_exporter

JFrog Artifactory Prometheus Exporter written in Go
Apache License 2.0
141 stars 37 forks source link

Add version output for artifactory_exporter binary #76

Closed alosenkov-infobip closed 2 years ago

alosenkov-infobip commented 2 years ago

Feature Description

It would be very nice to have an opportunity to request the version from artifactory_exporter binary with some flags like

artifactory_exporter -v
artifactory_exporter --version

or at least add the version to output of existing help

artifactory_exporter --help

Use Case(s)

When I want to check what is the current version of artifactory_exporter do I have (for bug reporting, changelog reading, upgrading), I cannot do this.

What I've tried

$ /usr/bin/artifactory_exporter -v
artifactory_exporter: error: unknown short flag '-v', try --help

$ /usr/bin/artifactory_exporter -V
artifactory_exporter: error: unknown short flag '-V', try --help

$ /usr/bin/artifactory_exporter --version
artifactory_exporter: error: unknown long flag '--version', try --help

$ /usr/bin/artifactory_exporter version
artifactory_exporter: error: unexpected version, try --help
$ /usr/bin/artifactory_exporter --help
usage: artifactory_exporter [<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]
github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.