Skip to content

Commit

Permalink
Merge pull request #91 from claranet/k8s_exclude_jobs_from_pod_phase
Browse files Browse the repository at this point in the history
exclude jobs and cronjobs from pod phase status
  • Loading branch information
xp-1000 committed Sep 28, 2020
2 parents 98ee322 + 6f247c5 commit 7ed5bee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion container/kubernetes/common/detectors-kubernetes-common.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ resource "signalfx_detector" "pod_phase_status" {
name = "${join("", formatlist("[%s]", var.prefixes))}[${var.environment}] Kubernetes pod status phase"

program_text = <<-EOF
signal = data('kubernetes.pod_phase', filter=${module.filter-tags.filter_custom})${var.pod_phase_status_aggregation_function}${var.pod_phase_status_transformation_function}.fill(2).publish('signal')
signal = data('kubernetes.pod_phase', filter=(not filter('job', '*')) and (not filter('cronjob', '*')) and ${module.filter-tags.filter_custom})${var.pod_phase_status_aggregation_function}${var.pod_phase_status_transformation_function}.fill(2).publish('signal')
detect(when(signal < threshold(2), lasting='${var.pod_phase_status_lasting_duration_seconds}s') or when(signal > threshold(3), lasting='${var.pod_phase_status_lasting_duration_seconds}s')).publish('WARN')
EOF

Expand Down

0 comments on commit 7ed5bee

Please sign in to comment.