β Repository β π Compliance Engine β π CloudAware β π Azure β π MySQL Database β π‘οΈ Server is underutilizedπ’
π§ Azure MySQL Server is underutilized - prod.logic.yamlπ’
- Contextual name: π§ prod.logic.yamlπ’
- ID:
/ce/ca/azure/mysql-database/server-underutilized/prod.logic.yaml
- Tags:
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Usesβ
Test Results π’β
Generated at: 2025-10-01T12:46:47.966979903Z 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(20.0) && extract('CA10Z1__monitorMemoryPercentAvg30Day__c') < number(40.0) && extract('CA10Z1__monitorIoConsumptionPercentAvg30Day__c') < number(20.0) | βοΈ null |
π’ | 005 | βοΈ 400 | βοΈ otherwise | βοΈ null |
π’ | 006 | βοΈ 400 | βοΈ otherwise | βοΈ null |
Generation Bundleβ
File | MD5 | |
---|---|---|
Open | /ce/ca/azure/mysql-database/server-underutilized/policy.yaml | 6A6379E817B92DAD0C45B90ACBC983E5 |
Open | /ce/ca/azure/mysql-database/server-underutilized/prod.logic.yaml | AD1E462399289F4DCB71244639026ED4 |
Open | /ce/ca/azure/mysql-database/server-underutilized/test-data.json | 354F26613066484B452C387E85FCF6BC |
Open | /types/CA10Z1__CaAzureMySqlServer__c/object.extracts.yaml | 2B2178E89E751C1A0E34592D0E5F46C4 |
Available Commandsβ
repo-manager policies generate FULL /ce/ca/azure/mysql-database/server-underutilized/prod.logic.yaml
repo-manager policies generate DEBUG /ce/ca/azure/mysql-database/server-underutilized/prod.logic.yaml
repo-manager policies generate CAPTURE_TEST_DATA /ce/ca/azure/mysql-database/server-underutilized/prod.logic.yaml
repo-manager policies generate TESTS /ce/ca/azure/mysql-database/server-underutilized/prod.logic.yaml
# Execute tests
repo-manager policies test /ce/ca/azure/mysql-database/server-underutilized/prod.logic.yaml
Contentβ
---
inputType: "CA10Z1__CaAzureMySqlServer__c"
importExtracts:
- file: "/types/CA10Z1__CaAzureMySqlServer__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: "INCOMPLIANT"
currentStateMessage: "The server is underutilized with Average CPU and IO < 20%, and Memory Utilization < 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."