MCPcopy Create free account
hub / github.com/deepflowio/deepflow / prometheusClear

Function prometheusClear

cli/ctl/prometheus.go:115–125  ·  view source on GitHub ↗
(cmd *cobra.Command, expiredAt string)

Source from the content-addressed store, hash-verified

113}
114
115func prometheusClear(cmd *cobra.Command, expiredAt string) {
116 server := common.GetServerInfo(cmd)
117 url := fmt.Sprintf("http://%s:%d/v1/prometheus-cleaner-tasks/", server.IP, server.Port)
118 resp, err := common.CURLPerform(http.MethodPost, url, map[string]interface{}{"EXPIRED_AT": expiredAt}, "", []common.HTTPOption{common.WithTimeout(common.GetTimeout(cmd)), common.WithORGID(common.GetORGID(cmd))}...)
119 if err != nil {
120 fmt.Fprintln(os.Stderr, err)
121 return
122 }
123 fmt.Println(resp)
124 return
125}

Callers 1

Calls 1

GetORGIDMethod · 0.45

Tested by

no test coverage detected