Skip to content

Commit

Permalink
[fix]: [SRM-16226]: Adding health source deseralizr (#788)
Browse files Browse the repository at this point in the history
* [fix]: [SRM-16226]: Adding health source deseralizr

* [fix]: [SRM-16226]: Adding health source deseralizr

* [fix]: [SRM-16226]: Adding health source deseralizr

* [fix]: [SRM-16226]: Adding health source deseralizr
  • Loading branch information
deepak-harness committed Nov 28, 2023
1 parent e3ee0b5 commit 0c636b6
Show file tree
Hide file tree
Showing 2 changed files with 291 additions and 2 deletions.
174 changes: 174 additions & 0 deletions examples/resources/harness_platform_monitored_service/resource.tf
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,39 @@ resource "harness_platform_monitored_service" "example1" {
liveMonitoringEnabled = "true"
continuousVerificationEnabled = "true"
sliEnabled = "false"
metricThresholds: [
{
type: "IgnoreThreshold",
spec: {
action: "Ignore"
},
criteria: {
type: "Absolute",
spec: {
greaterThan: 100
}
},
metricType: "Custom",
metricName: "metric_cpu"
},
{
"type": "FailImmediately",
"spec": {
"action": "FailAfterOccurrence",
"spec": {
"count": 2
}
},
"criteria": {
"type": "Absolute",
"spec": {
"greaterThan": 100
}
},
"metricType": "Custom",
"metricName": "metric_cpu"
}
]
},
{
name = "name2"
Expand Down Expand Up @@ -225,6 +258,39 @@ resource "harness_platform_monitored_service" "example3" {
liveMonitoringEnabled = "true"
continuousVerificationEnabled = "false"
sliEnabled = "false"
metricThresholds: [
{
type: "IgnoreThreshold",
spec: {
action: "Ignore"
},
criteria: {
type: "Absolute",
spec: {
greaterThan: 100
}
},
metricType: "Custom",
metricName: "identifier2"
},
{
"type": "FailImmediately",
"spec": {
"action": "FailAfterOccurrence",
"spec": {
"count": 2
}
},
"criteria": {
"type": "Absolute",
"spec": {
"greaterThan": 100
}
},
"metricType": "Custom",
"metricName": "identifier2"
}
]
}
]
})
Expand Down Expand Up @@ -324,6 +390,38 @@ resource "harness_platform_monitored_service" "example5" {
liveMonitoringEnabled = "true"
continuousVerificationEnabled = "true"
sliEnabled = "false"
metricThresholds: [
{
type: "IgnoreThreshold",
spec: {
action: "Ignore"
},
criteria: {
type: "Absolute",
spec: {
greaterThan: 100
}
},
metricType: "Custom",
metricName: "metric"
},
{
"type": "FailImmediately",
"spec": {
"action": "FailAfterOccurrence",
"spec": {
"count": 2
}
},
"criteria": {
"type": "Absolute",
"spec": {
"greaterThan": 100
}
},
"metricType": "Custom",
"metricName": "metric"
}]
},
{
name = "name2"
Expand Down Expand Up @@ -439,6 +537,44 @@ resource "harness_platform_monitored_service" "example7" {
isManualQuery = true
}
]
metricPacks: [
{
identifier: "Custom",
metricThresholds: [
{
type: "IgnoreThreshold",
spec: {
action: "Ignore"
},
criteria: {
type: "Absolute",
spec: {
greaterThan: 100
}
},
metricType: "Custom",
metricName: "Prometheus Metric"
},
{
"type": "FailImmediately",
"spec": {
"action": "FailAfterOccurrence",
"spec": {
"count": 2
}
},
"criteria": {
"type": "Absolute",
"spec": {
"greaterThan": 100
}
},
"metricType": "Custom",
"metricName": "Prometheus Metric"
}
]
}
]
})
}
template_ref = "template_ref"
Expand Down Expand Up @@ -522,6 +658,44 @@ resource "harness_platform_monitored_service" "example8" {
}
}
]
metricPacks: [
{
identifier: "Custom",
metricThresholds: [
{
type: "IgnoreThreshold",
spec: {
action: "Ignore"
},
criteria: {
type: "Absolute",
spec: {
greaterThan: 100
}
},
metricType: "Custom",
metricName: "metric"
},
{
"type": "FailImmediately",
"spec": {
"action": "FailAfterOccurrence",
"spec": {
"count": 2
}
},
"criteria": {
"type": "Absolute",
"spec": {
"greaterThan": 100
}
},
"metricType": "Custom",
"metricName": "metric"
}
]
}
]
})
}
template_ref = "template_ref"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,38 @@ func testAccSplunkSignalFXDataSourceMonitoredService(id string, name string) str
liveMonitoringEnabled = "true"
continuousVerificationEnabled = "false"
sliEnabled = "false"
metricThresholds: [
{
type: "IgnoreThreshold",
spec: {
action: "Ignore"
},
criteria: {
type: "Absolute",
spec: {
greaterThan: 100
}
},
metricType: "Custom",
metricName: "identifier2"
},
{
"type": "FailImmediately",
"spec": {
"action": "FailAfterOccurrence",
"spec": {
"count": 2
}
},
"criteria": {
"type": "Absolute",
"spec": {
"greaterThan": 100
}
},
"metricType": "Custom",
"metricName": "identifier2"
}]
}
]})
}
Expand Down Expand Up @@ -561,6 +593,22 @@ func testAccGrafanaLokiLogsDataSourceMonitoredService(id string, name string) st
liveMonitoringEnabled = "false"
continuousVerificationEnabled = "false"
sliEnabled = "false"
metricThresholds: [
{
type: "IgnoreThreshold",
spec: {
action: "Ignore"
},
criteria: {
type: "Absolute",
spec: {
greaterThan: 100
}
},
metricType: "Custom",
metricName: "identifier2"
}
]
}
]})
}
Expand Down Expand Up @@ -632,6 +680,39 @@ func testAccAzureMetricsDataSourceMonitoredService(id string, name string) strin
liveMonitoringEnabled = "true"
continuousVerificationEnabled = "true"
sliEnabled = "false"
metricThresholds: [
{
type: "IgnoreThreshold",
spec: {
action: "Ignore"
},
criteria: {
type: "Absolute",
spec: {
greaterThan: 100
}
},
metricType: "Custom",
metricName: "metric"
},
{
"type": "FailImmediately",
"spec": {
"action": "FailAfterOccurrence",
"spec": {
"count": 2
}
},
"criteria": {
"type": "Absolute",
"spec": {
"greaterThan": 100
}
},
"metricType": "Custom",
"metricName": "metric"
}
]
},
{
name = "name2"
Expand Down Expand Up @@ -826,6 +907,23 @@ resource "harness_platform_monitored_service" "test" {
},
metricType: "Custom",
metricName: "Prometheus Metric"
},
{
"type": "FailImmediately",
"spec": {
"action": "FailAfterOccurrence",
"spec": {
"count": 2
}
},
"criteria": {
"type": "Absolute",
"spec": {
"greaterThan": 100
}
},
"metricType": "Custom",
"metricName": "Prometheus Metric"
}
]
}
Expand Down Expand Up @@ -882,7 +980,7 @@ resource "harness_platform_monitored_service" "test" {
{
identifier: "Custom",
metricThresholds: [
{
{
type: "IgnoreThreshold",
spec: {
action: "Ignore"
Expand All @@ -895,7 +993,24 @@ resource "harness_platform_monitored_service" "test" {
},
metricType: "Custom",
metricName: "metric"
}
},
{
"type": "FailImmediately",
"spec": {
"action": "FailAfterOccurrence",
"spec": {
"count": 2
}
},
"criteria": {
"type": "Absolute",
"spec": {
"greaterThan": 100
}
},
"metricType": "Custom",
"metricName": "metric"
}
]
}
]
Expand Down

0 comments on commit 0c636b6

Please sign in to comment.