Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
docker-test:
needs: [docker]
uses: ./.github/workflows/step_tests-remote-images.yml
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
if: contains(github.ref, 'refs/heads/main')
# Since workflow_dispatch inputs are only available on manual triggers
# we need to set default values to the context vars here
with:
Expand All @@ -112,7 +112,7 @@ jobs:
quay-test:
needs: [quay]
uses: ./.github/workflows/step_tests-remote-images.yml
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
if: contains(github.ref, 'refs/heads/main')
# Since workflow_dispatch inputs are only available on manual triggers
# we need to set default values to the context vars here
with:
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## 0.11.0 / 2025-*-*

### Breaking Changes

#### CEEMS Exporter

- Collector `ipmi_dcmi` has been renamed to `ipmi` as more functionality beyond DCMI has been added to the collector.
- Following metric labels have been renamed to be more consistent with Prometheus naming convention:
* `ceems_ipmi_dcmi_current_watts` -> `ceems_ipmi_dcmi_power_current_watts`
* `ceems_ipmi_dcmi_min_watts` -> `ceems_ipmi_dcmi_power_min_watts`
* `ceems_ipmi_dcmi_max_watts` -> `ceems_ipmi_dcmi_power_max_watts`
* `ceems_ipmi_dcmi_avg_watts` -> `ceems_ipmi_dcmi_power_avg_watts`
* `ceems_redfish_current_watts` -> `ceems_redfish_power_current_watts`
* `ceems_redfish_min_watts` -> `ceems_redfish_power_min_watts`
* `ceems_redfish_max_watts` -> `ceems_redfish_power_max_watts`
* `ceems_redfish_avg_watts` -> `ceems_redfish_power_avg_watts`

## 0.10.2 / 2025-08-07

- [BUGFIX] Fix bpf code to work with LLVM 20 [#393](https://github.com/mahendrapaipuri/ceems/pull/393) ([@mahendrapaipuri](https://github.com/mahendrapaipuri))
Expand Down
2 changes: 1 addition & 1 deletion cmd/ceems_exporter/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestFileDescriptorLeak(t *testing.T) {
"--web.listen-address", address,
"--path.cgroupfs", sysfsPath,
"--path.procfs", procfsPath,
"--collector.ipmi_dcmi.cmd", "pkg/collector/testdata/ipmi/freeipmi/ipmi-dcmi",
"--collector.ipmi.dcmi.cmd", "pkg/collector/testdata/ipmi/freeipmi/ipmi-dcmi",
// "--no-security.drop-privileges",
)
test := func(pid int) error {
Expand Down
34 changes: 20 additions & 14 deletions cmd/ceems_tool/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,21 @@ import (
//go:embed rules
var rulesFS embed.FS

const (
ipmiPowerMetric = "ceems_ipmi_dcmi_power_current_watts"
redfishPowerMetric = "ceems_redfish_power_current_watts"
crayPowerMetric = "ceems_cray_pm_counters_power_watts"
)

var (
seriesNames = []string{
"ceems_compute_unit_cpu_user_seconds_total",
"ceems_compute_unit_memory_used_bytes",
"ceems_rapl_package_joules_total",
"ceems_rapl_dram_joules_total",
"ceems_ipmi_dcmi_current_watts",
"ceems_redfish_current_watts",
"ceems_cray_pm_counters_power_watts",
ipmiPowerMetric,
redfishPowerMetric,
crayPowerMetric,
"ceems_emissions_gCo2_kWh",
"DCGM_FI_DEV_POWER_USAGE_INSTANT",
"amd_gpu_power",
Expand Down Expand Up @@ -241,15 +247,15 @@ func CreatePromRecordingRules(
var hostPowerSeries string

switch {
case slices.Contains(jobSeries[job], "ceems_cray_pm_counters_power_watts"):
case slices.Contains(jobSeries[job], crayPowerMetric):
tmplFile = "cpu-cray.rules"
hostPowerSeries = "ceems_cray_pm_counters_power_watts"
case slices.Contains(jobSeries[job], "ceems_redfish_current_watts"):
hostPowerSeries = crayPowerMetric
case slices.Contains(jobSeries[job], redfishPowerMetric):
tmplFile = "cpu-ipmi-redfish.rules"
hostPowerSeries = "ceems_redfish_current_watts"
case slices.Contains(jobSeries[job], "ceems_ipmi_dcmi_current_watts"):
hostPowerSeries = redfishPowerMetric
case slices.Contains(jobSeries[job], ipmiPowerMetric):
tmplFile = "cpu-ipmi-redfish.rules"
hostPowerSeries = "ceems_ipmi_dcmi_current_watts"
hostPowerSeries = ipmiPowerMetric
case slices.Contains(jobSeries[job], "ceems_rapl_package_joules_total"):
tmplFile = "cpu-rapl.rules"
hostPowerSeries = "ceems_rapl_package_joules_total"
Expand All @@ -264,8 +270,8 @@ func CreatePromRecordingRules(

var hostPowerLabel string

if hostPowerSeries == "ceems_redfish_current_watts" {
matcher := fmt.Sprintf(`ceems_redfish_current_watts{job="%s"}`, job)
if hostPowerSeries == redfishPowerMetric {
matcher := fmt.Sprintf(`%s{job="%s"}`, redfishPowerMetric, job)

chassis, _, err := api.LabelValues(ctx, "chassis", []string{matcher}, stime, etime) // Ignoring warnings for now.
if err != nil {
Expand All @@ -277,7 +283,7 @@ func CreatePromRecordingRules(
// If there are more than 1 chassis, emit log for operators to tell them to
// choose appropriate chassis to get CPU power usage
if len(chassis) > 1 {
fmt.Fprintln(os.Stderr, "Multiple chassis found for ceems_redfish_current_watts for job", job)
fmt.Fprintln(os.Stderr, "Multiple chassis found for", redfishPowerMetric, "for job", job)
fmt.Fprintln(os.Stderr, "Choose the chassis that reports host power usage")

for ichas, chas := range chassis {
Expand Down Expand Up @@ -315,9 +321,9 @@ func CreatePromRecordingRules(
} else if len(chassis) == 1 {
targetChassis = chassis[0]
} else {
fmt.Fprintln(os.Stderr, "no chassis found for ceems_redfish_current_watts for job", job)
fmt.Fprintln(os.Stderr, "no chassis found for", redfishPowerMetric, "for job", job)

return errors.New("no chassis found for ceems_redfish_current_watts")
return fmt.Errorf("no chassis found for %s", redfishPowerMetric)
}

// If targetChassis is found, set up label
Expand Down
Loading