Skip to content

Commit f75713d

Browse files
author
Borislav Ivanov
committed
- fix wrong array index access causing NPE
1 parent feaa1d8 commit f75713d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/compuscene/metrics/prometheus/PrometheusMetricsCollector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ private void updateOsMetrics(OsStats os) {
426426
catalog.setGauge("os_cpu_percent", os.getCpu().getPercent(), node);
427427
catalog.setGauge("os_load_average_one_minute", os.getCpu().getLoadAverage()[0], node);
428428
catalog.setGauge("os_load_average_five_minutes", os.getCpu().getLoadAverage()[1], node);
429-
catalog.setGauge("os_load_average_fifteen_minutes", os.getCpu().getLoadAverage()[3], node);
429+
catalog.setGauge("os_load_average_fifteen_minutes", os.getCpu().getLoadAverage()[2], node);
430430
catalog.setGauge("os_mem_free_bytes", os.getMem().getFree().getBytes(), node);
431431
catalog.setGauge("os_mem_free_percent", os.getMem().getFreePercent(), node);
432432
catalog.setGauge("os_mem_used_bytes", os.getMem().getUsed().getBytes(), node);

0 commit comments

Comments
 (0)