Skip to content

Commit

Permalink
FOPTS-2261 Azure Long Running Instances - add OS incident field (#1537)
Browse files Browse the repository at this point in the history
* FOPTS-2261 Added

* FOPTS-2261 Added normalized platfrom incident field

* tweak

* meta

---------

Co-authored-by: Jose Roberto Camacho Christy <[email protected]>
Co-authored-by: Shawn Huckabay <[email protected]>
  • Loading branch information
3 people authored Oct 11, 2023
1 parent 440fb16 commit e34063b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
5 changes: 5 additions & 0 deletions operational/azure/azure_long_running_instances/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v4.1

- Added `Operating System` incident field.
- Renamed field from `osType` to `platform`

## v4.0

- Several parameters altered to be more descriptive and human-readable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ category "Operational"
severity "low"
default_frequency "weekly"
info(
version: "4.0",
version: "4.1",
provider: "Azure",
service: "Compute",
policy_set: "Long Running Instances"
Expand Down Expand Up @@ -300,7 +300,7 @@ datasource "ds_azure_instances" do
field "name", jmes_path(col_item, "name")
field "region", jmes_path(col_item, "location")
field "timeCreated", jmes_path(col_item, "properties.timeCreated")
field "osType", jmes_path(col_item, "properties.storageProfile.osDisk.osType")
field "platform", jmes_path(col_item, "properties.storageProfile.osDisk.osType")
field "resourceType", jmes_path(col_item, "properties.hardwareProfile.vmSize")
field "tags", jmes_path(col_item, "tags")
field "subscriptionId",val(iter_item, "id")
Expand Down Expand Up @@ -398,7 +398,7 @@ script "js_long_running_instances", type: "javascript" do
name: vm['name'],
region: vm['region'],
statuses: vm['statuses'],
osType: vm['osType'],
platform: vm['platform'],
resourceType: vm['resourceType'],
subscriptionId: vm['subscriptionId'],
subscriptionName: vm['subscriptionName'],
Expand Down Expand Up @@ -564,7 +564,7 @@ script "js_long_running_instances_incident", type: "javascript" do
resourceName: vm['name'],
region: vm['region'],
statuses: vm['statuses'],
osType: vm['osType'],
platform: vm['platform'],
resourceType: vm['resourceType'],
accountID: vm['subscriptionId'],
accountName: vm['subscriptionName'],
Expand Down Expand Up @@ -623,7 +623,7 @@ script "js_long_running_instances_incident", type: "javascript" do
result.push({
id: "", resourceGroup: "", resourceKind: "",
resourceName: "", region: "", statuses: "",
osType: "", resourceType: "", accountID: "",
platform: "", resourceType: "", accountID: "",
accountName: "", tags: "", age: "",
status: "", launchTime: "", lookbackPeriod: "",
policy_name: "", costCurrency: "", cost: "",
Expand Down Expand Up @@ -670,6 +670,9 @@ policy "pol_utilization" do
field "resourceType" do
label "Instance Size"
end
field "platform" do
label "Operating System"
end
field "age" do
label "Resource Age (Days)"
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ tenancy "single"
default_frequency "15 minutes"
info(
provider: "Azure",
version: "4.0", # This version of the Meta Parent Policy Template should match the version of the Child Policy Template as it appears in the Catalog for best reliability
version: "4.1", # This version of the Meta Parent Policy Template should match the version of the Child Policy Template as it appears in the Catalog for best reliability
publish: "false"
)

Expand Down Expand Up @@ -778,6 +778,9 @@ policy "policy_scheduled_report" do
field "resourceType" do
label "Instance Size"
end
field "platform" do
label "Operating System"
end
field "age" do
label "Resource Age (Days)"
end
Expand Down

0 comments on commit e34063b

Please sign in to comment.