Skip to content

Commit

Permalink
Skip logging prometheus query
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Oct 16, 2024
1 parent 0e910e5 commit e1a84dc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ require (
kmodules.xyz/client-go v0.30.27
kmodules.xyz/custom-resources v0.30.0
kmodules.xyz/go-containerregistry v0.0.12
kmodules.xyz/monitoring-agent-api v0.30.2-0.20241001043315-b98120efea48
kmodules.xyz/monitoring-agent-api v0.30.2-0.20241016103618-f8be56efa23b
kmodules.xyz/offshoot-api v0.30.1
kmodules.xyz/resource-metadata v0.19.1-0.20241016102627-335f7dd822c4
kmodules.xyz/resource-metrics v0.30.4
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -930,8 +930,8 @@ kmodules.xyz/custom-resources v0.30.0 h1:vR3CbseHMLwR4GvtcJJuRuwIV8voKqFqNii27rM
kmodules.xyz/custom-resources v0.30.0/go.mod h1:ZsTuI2mLG2s3byre7bHmpxJ9w0HDqAkRTL1+izGFI24=
kmodules.xyz/go-containerregistry v0.0.12 h1:Tl32QGmSqRVm9PUEb/f3dgDeu9zW5fVzt3qmAFIE37I=
kmodules.xyz/go-containerregistry v0.0.12/go.mod h1:KgeNg0hDsgeda+qc0NzWk0iVRdF0+ZIg/oRzGoYh78I=
kmodules.xyz/monitoring-agent-api v0.30.2-0.20241001043315-b98120efea48 h1:kJdO71ku1oU+IckB9myBvUi55PL5fcQ6vQXyZb9ljKk=
kmodules.xyz/monitoring-agent-api v0.30.2-0.20241001043315-b98120efea48/go.mod h1:oR3tk5O4koYar4cD9N3AjbBFr9XTwBU3sw9qD2NdNQc=
kmodules.xyz/monitoring-agent-api v0.30.2-0.20241016103618-f8be56efa23b h1:q7g/9AbOv6jIUB4KN9ya6rSYYGLJMRHTYZwEJuVAZuo=
kmodules.xyz/monitoring-agent-api v0.30.2-0.20241016103618-f8be56efa23b/go.mod h1:RFA3m9xmgUDT/yzTC5OMVkvKHl5FbpJbgLoHYYwzLVI=
kmodules.xyz/offshoot-api v0.30.1 h1:TrulAYO+oBsXe9sZZGTmNWIuI8qD2izMpgcTSPvgAmI=
kmodules.xyz/offshoot-api v0.30.1/go.mod h1:T3mpjR6fui0QzOcmQvIuANytW48fe9ytmy/1cgx6D4g=
kmodules.xyz/resource-metadata v0.19.1-0.20241016102627-335f7dd822c4 h1:NoV0dPAvU1/eTPNlj6Oi6AhU+oUzUi9pMQjntMzLVMk=
Expand Down
6 changes: 3 additions & 3 deletions vendor/kmodules.xyz/monitoring-agent-api/client/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func GetPodResourceUsage(pc promv1.API, obj metav1.ObjectMeta) core.ResourceList
}
resUsage[core.ResourceCPU] = cpuQuantity
} else {
klog.ErrorS(err, "failed to get prometheus cpu query result")
klog.Infoln("failed to execute prometheus cpu query")
}

if res, err := getPromQueryResult(pc, promMemoryQuery); err == nil {
Expand All @@ -77,7 +77,7 @@ func GetPodResourceUsage(pc promv1.API, obj metav1.ObjectMeta) core.ResourceList
}
resUsage[core.ResourceMemory] = memQuantity
} else {
klog.ErrorS(err, "failed to get prometheus memory query result")
klog.Infoln("failed to execute prometheus memory query")
}

if res, err := getPromQueryResult(pc, promStorageQuery); err == nil {
Expand All @@ -92,7 +92,7 @@ func GetPodResourceUsage(pc promv1.API, obj metav1.ObjectMeta) core.ResourceList
}
resUsage[core.ResourceStorage] = storageQuantity
} else {
klog.ErrorS(err, "failed to get prometheus storage query result")
klog.Infoln("failed to execute prometheus storage query")
}

return resUsage
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2033,7 +2033,7 @@ kmodules.xyz/custom-resources/crds
# kmodules.xyz/go-containerregistry v0.0.12
## explicit; go 1.21.5
kmodules.xyz/go-containerregistry/name
# kmodules.xyz/monitoring-agent-api v0.30.2-0.20241001043315-b98120efea48
# kmodules.xyz/monitoring-agent-api v0.30.2-0.20241016103618-f8be56efa23b
## explicit; go 1.22.0
kmodules.xyz/monitoring-agent-api/api/v1
kmodules.xyz/monitoring-agent-api/client
Expand Down

0 comments on commit e1a84dc

Please sign in to comment.