Document and add support to input plugins for logging alias (#6357)

This commit is contained in:
Greg
2019-09-23 16:39:50 -06:00
committed by Daniel Nelson
parent e42d2e39c6
commit 817c9a69a9
111 changed files with 961 additions and 659 deletions

View File

@@ -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 {