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

Added support for HTTPS and mutual TLS (mTLS) #361

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

andy-maier
Copy link
Member

@andy-maier andy-maier commented Jul 31, 2023

For details, see the commit message, or invoke with --help-creds.

This PR currently uses the prometheus-client package from its master branch.

@andy-maier andy-maier self-assigned this Jul 31, 2023
@andy-maier andy-maier added this to the 1.5.0 milestone Jul 31, 2023
@andy-maier andy-maier linked an issue Jul 31, 2023 that may be closed by this pull request
@andy-maier andy-maier force-pushed the andy/https-support branch 2 times, most recently from 216075b to 3e175c8 Compare July 31, 2023 18:34
@Charles1000Chen
Copy link
Contributor

@andy-maier In our use case, we wanna configure the mTLS related parameters in zhmc exporter's credential yaml. Could you implement loading the mTLS parameters from credential yaml like below:

tls_server_config:
    ca_cert: ca.crt
    server_cert: server.crt
    server_key: server.key

This way/configuration is our other exporters are using. Thanks.

@andy-maier
Copy link
Member Author

andy-maier commented Aug 1, 2023

@Charles1000Chen I agree this is the better solution. DONE.

@andy-maier andy-maier force-pushed the andy/https-support branch 7 times, most recently from 1015aa6 to ab840e2 Compare August 1, 2023 06:02
docs/usage.rst Outdated Show resolved Hide resolved
docs/usage.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@Charles1000Chen Charles1000Chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@andy-maier andy-maier force-pushed the andy/https-support branch 3 times, most recently from b8abe46 to c77f867 Compare August 28, 2023 11:13
@andy-maier andy-maier force-pushed the andy/https-support branch 2 times, most recently from 02f8ee0 to 1f64287 Compare November 9, 2023 09:15
@andy-maier
Copy link
Member Author

I updated the PR to use the prometheus-client package from its master branch, now that PR prometheus/client_python#946 has been merged.

@coveralls
Copy link

coveralls commented Nov 9, 2023

Coverage Status

coverage: 37.671% (-1.4%) from 39.074%
when pulling 4f6d936 on andy/https-support
into 722fc15 on master.

Details:

* Added support for communicating with Prometheus using HTTPS by adding a
  new section 'prometheus' to the HMC credentials file, that can specify
  server certificate and key files, CA credentials file for validating
  client certificates (mTLS), and a flag for disabling client vertificate
  validation.

* Since it makes sense to also specify the port for exporting in the new
  'prometheus' section, that was also added. The -p command line option
  overrides the port specified in the HMC credentials file, which
  defaults to 9291, so this is backwards compatible.

* For now, the prometheus-client package is installed from its master branch.
  Once its new version has been released, it will need to be installed
  again from Pypi (search for TODO-PYPI in whole repo).

Signed-off-by: Andreas Maier <maiera@de.ibm.com>
@andy-maier andy-maier merged commit c60a183 into master Nov 9, 2023
13 checks passed
@andy-maier andy-maier deleted the andy/https-support branch November 9, 2023 09:57
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

Successfully merging this pull request may close these issues.

Support HTTPS to Prometheus
4 participants