diff --git a/f5teem/f5teem.go b/f5teem/f5teem.go index 85ba040..c56ba21 100644 --- a/f5teem/f5teem.go +++ b/f5teem/f5teem.go @@ -86,6 +86,10 @@ func (b *TeemObject) Report(telemetry map[string]interface{}, telemetryType, tel telemetryData, _ := json.Marshal(telemetry) telemetryDatalist := []string{string(telemetryData[:])} log.Printf("[DEBUG] telemetryDatalist:%+v", telemetryDatalist) + + telemetrynew := []map[string]interface{}{} + telemetrynew = append(telemetrynew, telemetry) + bodyData := map[string]interface{}{ "documentType": b.TelemetryType, "documentVersion": b.TelemetryTypeVersion, @@ -95,7 +99,7 @@ func (b *TeemObject) Report(telemetry map[string]interface{}, telemetryType, tel "observationStartTime": time.Now().UTC().Format(time.RFC3339Nano), "observationEndTime": time.Now().UTC().Format(time.RFC3339Nano), "epochTime": time.Now().Unix(), - "telemetryRecords": telemetryDatalist, + "telemetryRecords": telemetrynew, } bodyInfo, _ := json.Marshal(bodyData) body := bytes.NewReader([]byte(bodyInfo)) diff --git a/ltm.go b/ltm.go index 85b85ff..4679d6f 100644 --- a/ltm.go +++ b/ltm.go @@ -2810,7 +2810,7 @@ func (b *BigIP) DeleteFastl4(name string) error { // ModifyFastl4 updates the given Fastl4 profile with any changed values. func (b *BigIP) ModifyFastl4(name string, fastl4 *Fastl4) error { fastl4.Name = name - return b.put(fastl4, uriLtm, uriProfile, uriFastl4, name) + return b.patch(fastl4, uriLtm, uriProfile, uriFastl4, name) } func (b *BigIP) GetFastl4(name string) (*Fastl4, error) {