β Repository β π Compliance Engine β π CloudAware β π Azure β π PostgreSQL Database β π‘οΈ Server is underutilizedπ’
π§ Azure PostgreSQL Server is underutilized - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/azure/postgresql-database/server-underutilized/prod.logic.yaml
- Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
- π Azure PostgreSQL Server
- π Azure PostgreSQL Server - object.extracts.yaml
- π§ͺ test-data.json
Test Results π’β
Generated at: 2025-10-01T12:46:55.565346148Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | 001 | βοΈ 99 | βοΈ isDisappeared(CA10Z1__disappearanceTime__c) | βοΈ null |
π’ | 002 | βοΈ 199 | βοΈ extract('CA10Z1__state__c') != 'Ready' | βοΈ null |
π’ | 003 | βοΈ 299 | βοΈ extract('CA10Z1__monitorCpuPercentAvg30Day__c').isEmpty() || extract('CA10Z1__monitorMemoryPercentAvg30Day__c').isEmpty() || extract('CA10Z1__monitorIoConsumptionPercentAvg30Day__c').isEmpty() | βοΈ null |
π’ | 004 | βοΈ 399 | βοΈ extract('CA10Z1__monitorCpuPercentAvg30Day__c') < number(5.0) && extract('CA10Z1__monitorIoConsumptionPercentAvg30Day__c') == number(0.0) | βοΈ null |
π’ | 005 | βοΈ 499 | βοΈ extract('CA10Z1__monitorCpuPercentAvg30Day__c') < number(20.0) && extract('CA10Z1__monitorMemoryPercentAvg30Day__c') < number(40.0) && extract('CA10Z1__monitorIoConsumptionPercentAvg30Day__c') < number(20.0) | βοΈ null |
π’ | 006 | βοΈ 500 | βοΈ otherwise | βοΈ null |
π’ | 007 | βοΈ 500 | βοΈ otherwise | βοΈ null |
Generation Bundleβ
File | MD5 | |
---|---|---|
Open | /ce/ca/azure/postgresql-database/server-underutilized/policy.yaml | BAEBE48A00BA0BAAACD3F856776915BB |
Open | /ce/ca/azure/postgresql-database/server-underutilized/prod.logic.yaml | A17B10D7AD0B121EA9E8652C0F5CAF21 |
Open | /ce/ca/azure/postgresql-database/server-underutilized/test-data.json | 5982F4642492CED352DEF1DB0D3E2137 |
Open | /types/CA10Z1__CaAzurePostgreSqlServer__c/object.extracts.yaml | 57EE11B2A1C370B47B2D4FE4AF22C8D0 |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/azure/postgresql-database/server-underutilized/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/azure/postgresql-database/server-underutilized/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/azure/postgresql-database/server-underutilized/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/azure/postgresql-database/server-underutilized/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/azure/postgresql-database/server-underutilized/prod.logic.yaml
Contentβ
---
inputType: "CA10Z1__CaAzurePostgreSqlServer__c"
importExtracts:
- file: "/types/CA10Z1__CaAzurePostgreSqlServer__c/object.extracts.yaml"
testData:
- file: 'test-data.json'
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "The server is not ready."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10Z1__state__c"
right:
TEXT: "Ready"
- status: UNDETERMINED
currentStateMessage: "There is not enough data in the CMDB to identify if the server is underutilized."
check:
OR:
args:
- IS_EMPTY:
arg:
EXTRACT: "CA10Z1__monitorCpuPercentAvg30Day__c"
- IS_EMPTY:
arg:
EXTRACT: "CA10Z1__monitorMemoryPercentAvg30Day__c"
- IS_EMPTY:
arg:
EXTRACT: "CA10Z1__monitorIoConsumptionPercentAvg30Day__c"
- status: INAPPLICABLE
currentStateMessage: "The server is idle and considered by the 'Azure PostgreSQL Server is Idle' policy."
check:
AND:
args:
- LESS_THAN:
left:
EXTRACT: "CA10Z1__monitorCpuPercentAvg30Day__c"
right:
NUMBER: 5.0
- IS_EQUAL:
left:
EXTRACT: "CA10Z1__monitorIoConsumptionPercentAvg30Day__c"
right:
NUMBER: 0.0
- status: "INCOMPLIANT"
currentStateMessage: "The server is underutilized with Average CPU and IO < 20%, and Memory < 40%."
remediationMessage: "Consider rightsizing, the server."
check:
AND:
args:
- LESS_THAN:
left:
EXTRACT: "CA10Z1__monitorCpuPercentAvg30Day__c"
right:
NUMBER: 20.0
- LESS_THAN:
left:
EXTRACT: "CA10Z1__monitorMemoryPercentAvg30Day__c"
right:
NUMBER: 40.0
- LESS_THAN:
left:
EXTRACT: "CA10Z1__monitorIoConsumptionPercentAvg30Day__c"
right:
NUMBER: 20.0
otherwise:
status: "COMPLIANT"
currentStateMessage: "The server is not underutilized."