Document and add support to input plugins for logging alias (#6357)
This commit is contained in:
@@ -114,11 +114,11 @@ var availableCollectors = map[string]func(ctx context.Context, acc telegraf.Accu
|
||||
"endpoints": collectEndpoints,
|
||||
"ingress": collectIngress,
|
||||
"nodes": collectNodes,
|
||||
"persistentvolumes": collectPersistentVolumes,
|
||||
"persistentvolumeclaims": collectPersistentVolumeClaims,
|
||||
"pods": collectPods,
|
||||
"services": collectServices,
|
||||
"statefulsets": collectStatefulSets,
|
||||
"persistentvolumes": collectPersistentVolumes,
|
||||
"persistentvolumeclaims": collectPersistentVolumeClaims,
|
||||
}
|
||||
|
||||
func (ki *KubernetesInventory) initClient() (*client, error) {
|
||||
@@ -144,12 +144,12 @@ func atoi(s string) int64 {
|
||||
func convertQuantity(s string, m float64) int64 {
|
||||
q, err := resource.ParseQuantity(s)
|
||||
if err != nil {
|
||||
log.Printf("E! Failed to parse quantity - %v", err)
|
||||
log.Printf("D! [inputs.kube_inventory] failed to parse quantity: %s", err.Error())
|
||||
return 0
|
||||
}
|
||||
f, err := strconv.ParseFloat(fmt.Sprint(q.AsDec()), 64)
|
||||
if err != nil {
|
||||
log.Printf("E! Failed to parse float - %v", err)
|
||||
log.Printf("D! [inputs.kube_inventory] failed to parse float: %s", err.Error())
|
||||
return 0
|
||||
}
|
||||
if m < 1 {
|
||||
|
||||
Reference in New Issue
Block a user