-
Notifications
You must be signed in to change notification settings - Fork 79
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
Add new floorplan with new queries for weekly data collection #1955
base: master
Are you sure you want to change the base?
Add new floorplan with new queries for weekly data collection #1955
Conversation
rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thearifismail This is much much better. I've left some final comments.
Thank you.
deploy/clowdapp.yml
Outdated
- apiVersion: metrics.console.redhat.com/v1alpha1 | ||
kind: FloorPlan | ||
metadata: | ||
name: host-inventory-success-metrics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please shorten this? This name is used to build names of child resources.
I'd suggest host-inventory-hms
, to keep it consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done as suggested.
deploy/clowdapp.yml
Outdated
database: | ||
secretName: ${FLOORIST_DB_SECRET_NAME} | ||
objectStore: | ||
secretName: ${FLOORIST_BUCKET_SECRET_NAME} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please define a separate template variable. Suggested name FLOORIST_HMS_BUCKET_SECRET_NAME
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done as suggested.
deploy/clowdapp.yml
Outdated
suspend: ${{FLOORIST_SUSPEND}} | ||
logLevel: ${FLOORIST_LOGLEVEL} | ||
queries: | ||
- prefix: insights/inventory/hosts_success_metrics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can shorten these as well insights/inventory/hosts
would do. Using the same name/prefix is okay, as this would be in a different S3 bucket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done as suggested.
deploy/clowdapp.yml
Outdated
query: >- | ||
SELECT | ||
"id", | ||
"account" AS "account_number", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As account can be NULL
, and the exporting tool has issues to figure out the type if it occurs on the first record, I recommend to convert this to text account::TEXT
or use COALESCE(account, 0)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about the exact syntax, but this is what I changed it:
COALESCE("account", 0) AS "account_number",
rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED
@vkrizan, can you help with S3 bucket setup? I checked #sd-app-sre channel for S3 and found how to install aws_s3 extension but we don't have direct access to RDS. Since a floorplan is already setup in Host-Inventory, I am assuming that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the small thing, this looks good!
Before merging, ensure that the secret is properly mapped in the deployments.
deploy/clowdapp.yml
Outdated
"created_on" AS "created_at", | ||
"modified_on" AS "updated_at", | ||
FROM "hosts" | ||
- prefix: insights/inventory/groups_success_metrics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also can be shorter: insights/inventory/groups
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed!!!
@thearifismail The bucket exists. I've messaged you directly more information with examples. |
…1956) Bumps [certifi](https://github.com/certifi/python-certifi) from 2024.7.4 to 2024.8.30. - [Commits](certifi/python-certifi@2024.07.04...2024.08.30) --- updated-dependencies: - dependency-name: certifi dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ghts#1952) Bumps [prometheus-client](https://github.com/prometheus/client_python) from 0.20.0 to 0.21.0. - [Release notes](https://github.com/prometheus/client_python/releases) - [Commits](prometheus/client_python@v0.20.0...v0.21.0) --- updated-dependencies: - dependency-name: prometheus-client dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
rh-pre-commit.version: 2.3.1 rh-pre-commit.check-secrets: ENABLED
rh-pre-commit.version: 2.2.0 rh-pre-commit.check-secrets: ENABLED
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
rh-pre-commit.version: 2.2.0
rh-pre-commit.check-secrets: ENABLED
Overview
This PR is being created to address RHINENG-12228.
@vkrizan, here is the new PR for collecting weekly numbers for new and updated hosts and groups. Since these metrics will use a new S3 bucket, these new queries may have their own floorplan. So I have add a new one named "host-inventory-success-metrics".
For getting a new S3 bucket, I looked into app-interface but did not find much except
hccm
usings3-buckets
and it did not show how to create or deploy an S3 using app-interface. This means I need your help. For now, I am using the other floorplan's parameter as space fillers.PR Checklist
Secure Coding Practices Documentation Reference
You can find documentation on this checklist here.
Secure Coding Checklist