Skip to content

Commit

Permalink
[Server] fix PrometheusHttpAPIAddresses nil pointer
Browse files Browse the repository at this point in the history
  • Loading branch information
roryye authored and SongZhen0704 committed Aug 21, 2023
1 parent 5a68a0b commit 18d1214
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/controller/http/service/vtap_group_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ func convertDBToYaml(sData *mysql.VTapGroupConfiguration, tData *model.VTapGroup
}
}
}
tData.PrometheusHttpAPIAddresses = strings.Split(*sData.PrometheusHttpAPIAddresses, ",")
if sData.PrometheusHttpAPIAddresses != nil {
tData.PrometheusHttpAPIAddresses = strings.Split(*sData.PrometheusHttpAPIAddresses, ",")
}
if sData.MaxCollectPps != nil {
cMaxCollectPps := *sData.MaxCollectPps / 1000
tData.MaxCollectPps = &cMaxCollectPps
Expand Down

0 comments on commit 18d1214

Please sign in to comment.