Skip to content

Conversation

@vkuma17
Copy link
Contributor

@vkuma17 vkuma17 commented Jul 29, 2025

Description

added support for prometheus metrics scraping
Issue

Release required?

  • No release
  • Patch release (x.x.X)
  • Minor release (x.X.x)
  • Major release (X.x.x)
Release notes content

Run the pipeline

If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.

Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:

/run pipeline

Checklist for reviewers

  • If relevant, a test for the change is included or updated with this PR.
  • If relevant, documentation for the change is included or updated with this PR.

For mergers

  • Use a conventional commit message to set the release level. Follow the guidelines.
  • Include information that users need to know about the PR in the commit message. The commit message becomes part of the GitHub release notes.
  • Use the Squash and merge option.

@vkuma17 vkuma17 requested review from Aashiq-J and jor2 as code owners July 29, 2025 22:27
@vkuma17 vkuma17 marked this pull request as draft July 29, 2025 22:32
@vkuma17 vkuma17 marked this pull request as ready for review July 30, 2025 07:02
@vkuma17
Copy link
Contributor Author

vkuma17 commented Jul 30, 2025

/run pipeline

Copy link
Contributor

@ocofaigh ocofaigh left a comment

Choose a reason for hiding this comment

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

I left a few comments - I think this approach needs to be revised to make it easier for consumers to consume

variables.tf Outdated
description = "Prometheus configuration for the agent. If you want to enable Prometheus configuration, set `file` to true and provide the prometheus.yaml file content in `yaml`. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-monitoring-agent/blob/main/solutions/fully-configurable/DA-types.md#prometheus)."
type = object({
file = bool
yaml = map(any)
Copy link
Contributor

Choose a reason for hiding this comment

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

This is going to cause confusion. The attribute is called yaml but the consumers is actually going to have to pass HPC map syntax right? Is there a schema we could define for the config, or is it too large?

@vkuma17
Copy link
Contributor Author

vkuma17 commented Jul 30, 2025

/run pipeline

@vkuma17 vkuma17 marked this pull request as draft July 30, 2025 14:37
@vkuma17
Copy link
Contributor Author

vkuma17 commented Jul 30, 2025

/run pipeline

**Tip:**
Use `metrics_filter` to optimize your monitoring setup by collecting only the metrics that matter most to your use case. This can help reduce costs and improve performance.

## `prometheus`
Copy link
Contributor

Choose a reason for hiding this comment

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

prometheus -> prometheus_config

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ocofaigh since we are not exposing variable in DA, should I remove this variable from DA-types.md or we can keep it for future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Module is also pointing to same place so I guess we can keep it.

@vkuma17 vkuma17 marked this pull request as ready for review July 31, 2025 07:00
vkuma17 added 2 commits July 31, 2025 14:09
…modules/terraform-ibm-monitoring-agent into prometheus-metrics-scrape
variables.tf Outdated
}

variable "prometheus_config" {
description = "Prometheus configuration for the agent. If you want to enable Prometheus configuration provide the prometheus.yaml file content in `hcl` format. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-monitoring-agent/blob/main/solutions/fully-configurable/DA-types.md#prometheus)."
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this URL still valid after changing the title in the markdown?

default = "syd01"
}

variable "prometheus_config" {
Copy link
Contributor

Choose a reason for hiding this comment

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

Its probably better to hard code a sample value in the example itself instead of exposing a variable. That way people can see a sample value that can be passed. We don't usually expose variables like this in examples as we don't want the example to become flexible solution thats people will use. they are just for reference

}

variable "prometheus_config" {
description = "Prometheus configuration for the agent. If you want to enable Prometheus configuration provide the prometheus.yaml file content in `hcl` format. [Learn more](https://github.com/terraform-ibm-modules/terraform-ibm-monitoring-agent/blob/main/solutions/fully-configurable/DA-types.md#prometheus)."
Copy link
Contributor

Choose a reason for hiding this comment

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

same comment as below - url need to be updated due to title change in markdown?

Copy link
Contributor

@ocofaigh ocofaigh left a comment

Choose a reason for hiding this comment

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

see latest comments

ocofaigh
ocofaigh previously approved these changes Jul 31, 2025
@ocofaigh
Copy link
Contributor

/run pipeline

@vkuma17 vkuma17 marked this pull request as draft July 31, 2025 10:07
@vkuma17
Copy link
Contributor Author

vkuma17 commented Jul 31, 2025

/run pipeline

@vkuma17 vkuma17 marked this pull request as ready for review July 31, 2025 10:18
ocofaigh
ocofaigh previously approved these changes Jul 31, 2025
@vkuma17
Copy link
Contributor Author

vkuma17 commented Jul 31, 2025

/run pipeline

@ocofaigh ocofaigh merged commit 215d598 into main Jul 31, 2025
2 checks passed
@ocofaigh ocofaigh deleted the prometheus-metrics-scrape branch July 31, 2025 13:43
@terraform-ibm-modules-ops
Copy link
Contributor

🎉 This PR is included in version 1.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants