Skip to main content

⭐ Repository β†’ πŸ“ Compliance Engine β†’ πŸ“ CloudAware β†’ πŸ“ Azure β†’ πŸ“ PostgreSQL Database β†’ πŸ›‘οΈ Server is underutilized🟒

🧠 Azure PostgreSQL Server is underutilized - prod.logic.yaml🟒

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-10-01T12:46:55.565346148Z Open

ResultIdCondition IndexCondition TextRuntime 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​

FileMD5
Open/ce/ca/azure/postgresql-database/server-underutilized/policy.yamlBAEBE48A00BA0BAAACD3F856776915BB
Open/ce/ca/azure/postgresql-database/server-underutilized/prod.logic.yamlA17B10D7AD0B121EA9E8652C0F5CAF21
Open/ce/ca/azure/postgresql-database/server-underutilized/test-data.json5982F4642492CED352DEF1DB0D3E2137
Open/types/CA10Z1__CaAzurePostgreSqlServer__c/object.extracts.yaml57EE11B2A1C370B47B2D4FE4AF22C8D0

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​

Open File

---
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."