Commit 8efae39d authored by Your Name's avatar Your Name

update to monitor.dcgm:v.0.0.9

parent 3fff37f1
...@@ -87,12 +87,12 @@ func (c *ProApi) Cpus() (Cpu, error) { ...@@ -87,12 +87,12 @@ func (c *ProApi) Cpus() (Cpu, error) {
// node_cpu_seconds_total{mode="idle"} // node_cpu_seconds_total{mode="idle"}
func (c ProApi) CpuItems() (string, int, int, int, error) { func (c ProApi) CpuItems() (string, int, int, int, error) {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel() defer cancel()
queryParam := `node_cpu_info` queryParam := `node_cpu_info`
result, warnings, err := c.API.Query(ctx, queryParam, time.Now(), v1.WithTimeout(5*time.Second)) result, warnings, err := c.API.Query(ctx, queryParam, time.Now(), v1.WithTimeout(time.Second))
if err != nil { if err != nil {
return "", 0, 0, 0, err return "", 0, 0, 0, err
} }
......
...@@ -2,7 +2,7 @@ version: "3.9" ...@@ -2,7 +2,7 @@ version: "3.9"
services: services:
monitor.dcgm: monitor.dcgm:
image: docker.ai.17xuexi.com/monitorapi/monitor.dcgm:v.0.0.8 image: docker.ai.17xuexi.com/monitorapi/monitor.dcgm:v.0.0.9
ports: ports:
- 9093:9090 - 9093:9090
- 4000:4000 - 4000:4000
......
global: global:
scrape_interval: 1s scrape_interval: 300ms
evaluation_interval: 1s evaluation_interval: 300ms
scrape_configs: scrape_configs:
- job_name: prometheus - job_name: prometheus
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment