Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
f34eda7
docs: add README.md
steven-freed Oct 8, 2025
3bbc421
chore: add Makefile
steven-freed Oct 8, 2025
7332fe2
feat: add metadata metrics and their docs
steven-freed Oct 8, 2025
b8a748d
feat: add generated metric and config code
steven-freed Oct 8, 2025
848c528
feat: add generated component and package go tests
steven-freed Oct 8, 2025
479717d
chore: add go.mod and go.sum
steven-freed Oct 8, 2025
0a79d9e
feat: add receiver config and factory go
steven-freed Oct 8, 2025
a9df032
chore: add redfishreceiver to versions.yaml
steven-freed Oct 8, 2025
de88aa6
chore: updated README.md
steven-freed Oct 8, 2025
e55212a
fix: add license header comments to go files
steven-freed Oct 8, 2025
4552680
feat: add resource type
steven-freed Oct 8, 2025
d6608ed
chore: add github issue templates
steven-freed Oct 8, 2025
ecc62ac
fix: scraper import error
steven-freed Oct 8, 2025
d352625
fix: add license to resources.go
steven-freed Oct 8, 2025
ddcdfaa
fix: linting
steven-freed Oct 8, 2025
5e64419
fix: factory type for go tests
steven-freed Oct 8, 2025
6d65147
feat: add redfishreceiver to builder-config.yaml
steven-freed Oct 8, 2025
90eb0c2
fix: add myself to cmd/githubgen/allowlist.txt
steven-freed Oct 9, 2025
cf1c2b0
fix: conflicts with main
steven-freed Oct 9, 2025
324f0af
fix: add myself as .github/CODEOWNERS for redfishreceiver
steven-freed Oct 9, 2025
11fbf16
Merge branch 'main' into add-receiver-for-redfish
steven-freed Oct 9, 2025
c89b3b1
Update receiver/redfishreceiver/go.mod
atoulme Oct 9, 2025
6f5c8d1
fix: tidy up go.mod
steven-freed Oct 10, 2025
a22beca
Merge branch 'main' into add-receiver-for-redfish
atoulme Oct 10, 2025
62ac00c
fix: tidy list
steven-freed Oct 10, 2025
938c24c
chore: add chlog
steven-freed Oct 10, 2025
6333a5c
fix: receiver deps
steven-freed Oct 10, 2025
37677d2
chore: update chlog
steven-freed Oct 10, 2025
d6eba3b
chore: add receiver to chlog config.yaml
steven-freed Oct 10, 2025
59e045f
fix: docs linting
steven-freed Oct 10, 2025
eceb57f
chore: add comp labels
steven-freed Oct 10, 2025
6f7f79c
fix: add codecov
steven-freed Oct 14, 2025
73ea9e0
fix: chlog
steven-freed Oct 14, 2025
0b6385a
Merge branch 'main' into add-receiver-for-redfish
steven-freed Oct 14, 2025
9815a33
fix: chlog for redfish receiver
steven-freed Oct 14, 2025
95eb826
Merge branch 'main' into add-receiver-for-redfish
steven-freed Oct 14, 2025
3bcefae
Merge branch 'main' into add-receiver-for-redfish
steven-freed Oct 14, 2025
e4afbaf
Merge branch 'main' into add-receiver-for-redfish
steven-freed Oct 14, 2025
9a0997d
Merge branch 'main' into add-receiver-for-redfish
steven-freed Oct 15, 2025
3435fb0
fix(receiver): redfish go.mod collector module version
steven-freed Oct 15, 2025
e7891b2
fix(receiver): tidy redfish go mod
steven-freed Oct 15, 2025
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
27 changes: 27 additions & 0 deletions .chloggen/add-receiver-for-redfish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: "new_component"

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: "receiver/redfish"

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "adds a redfish receiver"

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [33724]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: []
1 change: 1 addition & 0 deletions .chloggen/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ components:
- receiver/purefb
- receiver/rabbitmq
- receiver/receiver_creator
- receiver/redfish
- receiver/redis
- receiver/riak
- receiver/saphana
Expand Down
4 changes: 4 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,10 @@ component_management:
name: receiver_receivercreator
paths:
- receiver/receivercreator/**
- component_id: receiver_redfish
name: receiver_redfish
paths:
- receiver/redfishreceiver/**
- component_id: receiver_redis
name: receiver_redis
paths:
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ receiver/purefareceiver/ @open-telemetry
receiver/purefbreceiver/ @open-telemetry/collector-contrib-approvers @dgoscn @chrroberts-pure
receiver/rabbitmqreceiver/ @open-telemetry/collector-contrib-approvers @VenuEmmadi
receiver/receivercreator/ @open-telemetry/collector-contrib-approvers @dmitryax @ChrsMark
receiver/redfishreceiver/ @open-telemetry/collector-contrib-approvers @steven-freed
receiver/redisreceiver/ @open-telemetry/collector-contrib-approvers @dmitryax @hughesjj
receiver/riakreceiver/ @open-telemetry/collector-contrib-approvers @armstrmi
receiver/saphanareceiver/ @open-telemetry/collector-contrib-approvers @dehaansa
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/beta_stability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ body:
- receiver/purefb
- receiver/rabbitmq
- receiver/receivercreator
- receiver/redfish
- receiver/redis
- receiver/riak
- receiver/saphana
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ body:
- receiver/purefb
- receiver/rabbitmq
- receiver/receivercreator
- receiver/redfish
- receiver/redis
- receiver/riak
- receiver/saphana
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ body:
- receiver/purefb
- receiver/rabbitmq
- receiver/receivercreator
- receiver/redfish
- receiver/redis
- receiver/riak
- receiver/saphana
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/other.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ body:
- receiver/purefb
- receiver/rabbitmq
- receiver/receivercreator
- receiver/redfish
- receiver/redis
- receiver/riak
- receiver/saphana
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/unmaintained.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ body:
- receiver/purefb
- receiver/rabbitmq
- receiver/receivercreator
- receiver/redfish
- receiver/redis
- receiver/riak
- receiver/saphana
Expand Down
1 change: 1 addition & 0 deletions .github/component_labels.txt
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ receiver/purefareceiver receiver/purefa
receiver/purefbreceiver receiver/purefb
receiver/rabbitmqreceiver receiver/rabbitmq
receiver/receivercreator receiver/receivercreator
receiver/redfishreceiver receiver/redfish
receiver/redisreceiver receiver/redis
receiver/riakreceiver receiver/riak
receiver/saphanareceiver receiver/saphana
Expand Down
3 changes: 2 additions & 1 deletion cmd/githubgen/allowlist.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
KiranmayiB
jkoronaAtCisco
steven-freed
jkoronaAtCisco
1 change: 1 addition & 0 deletions cmd/otelcontribcol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ receivers:
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/purefbreceiver v0.137.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/rabbitmqreceiver v0.137.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/receivercreator v0.137.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redfishreceiver v0.137.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redisreceiver v0.137.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/riakreceiver v0.137.0
- gomod: github.com/open-telemetry/opentelemetry-collector-contrib/receiver/saphanareceiver v0.137.0
Expand Down
1 change: 1 addition & 0 deletions internal/tidylist/tidylist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ receiver/purefareceiver
receiver/purefbreceiver
receiver/rabbitmqreceiver
receiver/receivercreator
receiver/redfishreceiver
receiver/redisreceiver
receiver/riakreceiver
receiver/saphanareceiver
Expand Down
1 change: 1 addition & 0 deletions receiver/redfishreceiver/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include ../../Makefile.Common
79 changes: 79 additions & 0 deletions receiver/redfishreceiver/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Redfish Receiver

<!-- status autogenerated section -->
| Status | |
| ------------- |-----------|
| Stability | [development]: metrics |
| Distributions | [] |
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fredfish%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fredfish) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fredfish%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fredfish) |
| Code coverage | [![codecov](https://codecov.io/github/open-telemetry/opentelemetry-collector-contrib/graph/main/badge.svg?component=receiver_redfish)](https://app.codecov.io/gh/open-telemetry/opentelemetry-collector-contrib/tree/main/?components%5B0%5D=receiver_redfish&displayType=list) |
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@steven-freed](https://www.github.com/steven-freed) |

[development]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#development
<!-- end autogenerated section -->

This receiver fetches metrics for a server running a Redfish API.

## Purpose

The purpose of this component is to monitor devices running a Redfish API which is quite often a BMC (Baseboard Management Controller) such as; Dell iDRAC, HPE iLO, etc.

## Prerequisites

This receiver supports Redfish versions:

- v1

## Configuration

These configuration options are for connecting to Redfish API servers.

The following settings are optional:

- `collection_interval`: (default = `60s`): This receiver collects metrics on an interval. This value must be a string readable by Golang's [time.ParseDuration](https://pkg.go.dev/time#ParseDuration). Valid time units are `ns`, `us` (or `µs`), `ms`, `s`, `m`, `h`.
- `initial_delay` (default = `0s`): defines how long this receiver waits before starting.
- `servers`: The list of redfish servers to be monitored.

Each server has the following properties:
- `host` (required): Host name to monitor in the form [https][://][host]:[port].
- `username` (required): Redfish username.
- `password` (required): Redfish password.
- `insecure` (optional, default: `false`): Sets the protocol security.
- `timeout` (optional, default: `60s`): Sets the Redfish client timeout.
- `redfish` (optional): Redfish configuration.
- `computer_system_id` (required): Redfish computer system id to monitor.
- `resources` (required): The list of Redfish resources to monitor.

The redfish configuration has the following properties:
- `version` (optional, default: `v1`): Redfish API version.

The redfish resource options include the below:
- ComputerSystem
- Chassis
- Fans
- Temperatures

### Example Configuration

```yaml
receivers:
collection_interval: 60s
redfish:
servers:
- host: https://16.1.15.1
username: "${BMC_USER}"
password: "${BMC_PASSWORD}"
insecure: true
computer_system_id: "1"
redfish:
version: v1
resources:
- ComputerSystem
- Fans
```

The full list of settings exposed for this receiver are documented in [config.go](./config.go).

## Metrics

Details about the metrics produced by this receiver can be found in [metadata.yaml](./metadata.yaml)
57 changes: 57 additions & 0 deletions receiver/redfishreceiver/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package redfishreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redfishreceiver"

import (
"errors"
"time"

"go.opentelemetry.io/collector/config/configopaque"
"go.opentelemetry.io/collector/scraper/scraperhelper"

"github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redfishreceiver/internal/metadata"
)

type redfishConfig struct {
Version string `mapstructure:"version"`
}

type Server struct {
Host string `mapstructure:"host"`
User string `mapstructure:"username"`
Pwd configopaque.String `mapstructure:"password"`
Insecure bool `mapstructure:"insecure"`
Timeout string `mapstructure:"timeout"`
Redfish redfishConfig `mapstructure:"redfish"`
ComputerSystemID string `mapstructure:"computer_system_id"`
Resources []Resource `mapstructure:"resources"`
}

type Config struct {
scraperhelper.ControllerConfig `mapstructure:",squash"`
metadata.MetricsBuilderConfig `mapstructure:",squash"`
Servers []Server `mapstructure:"servers"`

// prevent unkeyed literal initialization
_ struct{}
}

func (cfg *Config) Validate() error {
if len(cfg.Servers) == 0 {
return errors.New("servers must not be empty")
}

for i := range cfg.Servers {
if cfg.Servers[i].Redfish.Version != "v1" {
return errors.New("redfish version must be once of the following values: 'v1'")
}
if len(cfg.Servers[i].Resources) == 0 {
return errors.New("resources must not be empty")
}
if _, err := time.ParseDuration(cfg.Servers[i].Timeout); err != nil && cfg.Servers[i].Timeout != "" {
return errors.New("invalid server timeout")
}
}
return nil
}
6 changes: 6 additions & 0 deletions receiver/redfishreceiver/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

//go:generate mdatagen metadata.yaml

package redfishreceiver // import "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/redfishreceiver"
Loading