Versions in this module Expand all Collapse all v1 v1.2.5 Sep 23, 2024 Changes in this version + const PromQAppLabelsWrapperFmt + const PromQAutoScaleCpuTotalU + const PromQAutoScaleMemTotalU + const PromQCloudletCpuTotal + const PromQCloudletDiskTotal + const PromQCloudletDiskUse + const PromQCloudletMemTotal + const PromQCloudletMemUse + const PromQConnections + const PromQCpuClust + const PromQCpuPod + const PromQDiskClust + const PromQDiskPercentPod + const PromQDiskPod + const PromQMemClust + const PromQMemPercentPod + const PromQMemPod + const PromQNetRecvRate + const PromQNetSentRate + const PromQRecvBytesRateClust + const PromQSentBytesRateClust + const PromQTcpConnClust + const PromQTcpRetransClust + const PromQUdpRecvErr + const PromQUdpRecvPktsClust + const PromQUdpSentPktsClust + var ClusterPrometheusAppInstLabel = "label_" + cloudcommon.MexAppInstNameLabel + var ClusterPrometheusAppInstOrgLabel = "label_" + cloudcommon.MexAppInstOrgLabel + var ClusterPrometheusAppLabel = "label_" + cloudcommon.MexAppNameLabel + var ClusterPrometheusAppVersionLabel = "label_" + cloudcommon.MexAppVersionLabel + var PromLabelsAllMobiledgeXApps = `{` + ClusterPrometheusAppLabel + `!=""}` + var PromQAutoScaleCpuTotalUUrlEncoded = url.QueryEscape(PromQAutoScaleCpuTotalU) + var PromQAutoScaleMemTotalUUrlEncoded = url.QueryEscape(PromQAutoScaleMemTotalU) + var PromQCloudletCpuTotalEncoded = url.QueryEscape(PromQCloudletCpuTotal) + var PromQCloudletDiskTotalEncoded = url.QueryEscape(PromQCloudletDiskTotal) + var PromQCloudletDiskUseEncoded = url.QueryEscape(PromQCloudletDiskUse) + var PromQCloudletMemTotalEncoded = url.QueryEscape(PromQCloudletMemTotal) + var PromQCloudletMemUseEncoded = url.QueryEscape(PromQCloudletMemUse) + var PromQCpuClustUrlEncoded = url.QueryEscape(PromQCpuClust) + var PromQCpuPodUrlEncoded = url.QueryEscape(GetPromQueryWithK8sLabels(PromLabelsAllMobiledgeXApps, PromQCpuPod)) + var PromQDiskClustUrlEncoded = url.QueryEscape(PromQDiskClust) + var PromQDiskPercentPodUrlEncoded = url.QueryEscape(GetPromQueryWithK8sLabels(PromLabelsAllMobiledgeXApps, PromQDiskPercentPod)) + var PromQDiskPodUrlEncoded = url.QueryEscape(GetPromQueryWithK8sLabels(PromLabelsAllMobiledgeXApps, PromQDiskPod)) + var PromQMemClustUrlEncoded = url.QueryEscape(PromQMemClust) + var PromQMemPercentPodUrlEncoded = url.QueryEscape(GetPromQueryWithK8sLabels(PromLabelsAllMobiledgeXApps, PromQMemPercentPod)) + var PromQMemPodUrlEncoded = url.QueryEscape(GetPromQueryWithK8sLabels(PromLabelsAllMobiledgeXApps, PromQMemPod)) + var PromQNetRecvRateUrlEncoded = url.QueryEscape(GetPromQueryWithK8sLabels(PromLabelsAllMobiledgeXApps, PromQNetRecvRate)) + var PromQNetSentRateUrlEncoded = url.QueryEscape(GetPromQueryWithK8sLabels(PromLabelsAllMobiledgeXApps, PromQNetSentRate)) + var PromQRecvBytesRateClustUrlEncoded = url.QueryEscape(PromQRecvBytesRateClust) + var PromQSentBytesRateClustUrlEncoded = url.QueryEscape(PromQSentBytesRateClust) + var PromQTcpConnClustUrlEncoded = url.QueryEscape(PromQTcpConnClust) + var PromQTcpRetransClustUrlEncoded = url.QueryEscape(PromQTcpRetransClust) + var PromQUdpRecvErrUrlEncoded = url.QueryEscape(PromQUdpRecvErr) + var PromQUdpRecvPktsClustUrlEncoded = url.QueryEscape(PromQUdpRecvPktsClust) + var PromQUdpSentPktsClustUrlEncoded = url.QueryEscape(PromQUdpSentPktsClust) + func GetPromQueryWithK8sLabels(labelFilter, podQuery string) string + func ParseTime(timeFloat float64) *types.Timestamp + type PromAlert struct + ActiveAt *time.Time + Annotations map[string]string + Labels map[string]string + State string + Value PromAlertValue + type PromAlertValue float64 + func (s *PromAlertValue) UnmarshalJSON(b []byte) error + func (s PromAlertValue) MarshalJSON() ([]byte, error) + type PromData struct + ResType string + Result []PromMetric + type PromLabels struct + AppInstName string + AppInstOrg string + AppName string + AppVersion string + PodName string + type PromMetric struct + Labels PromLabels + Values []interface{} + type PromResp struct + Data PromData + Status string + func GetPromMetrics(ctx context.Context, addr string, query string, client ssh.Client) (*PromResp, error)