Skip to content

Instantly share code, notes, and snippets.

@mateobur
Created February 19, 2018 19:45
Show Gist options
  • Save mateobur/6dae6485464d4502df4c9f0f7e18ed39 to your computer and use it in GitHub Desktop.
Save mateobur/6dae6485464d4502df4c9f0f7e18ed39 to your computer and use it in GitHub Desktop.
Metric Value Kubernetes Sysdig
&custom_metrics.MetricValue{
DescribedObject: custom_metrics.ObjectReference{
APIVersion: info.GroupResource.Group + "/" + runtime.APIVersionInternal,
Kind: kind.Kind,
Name: name,
Namespace: namespace,
},
MetricName: info.Metric,
Timestamp: metav1.Time{time.Now()},
Value: *resource.NewMilliQuantity(int64(metricdatapoint*1000.0), resource.DecimalSI),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment