diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100755 index 09100dd..0000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: build redfish exporter package - -on: - issue_comment: - types: - - edited - - created - pull_request: - branches: - - master - -jobs: - centos-7: - name: on centos 7 - runs-on: ubuntu-20.04 - if: github.event.comment.body == 'build on centos 7' || github.event.pull_request.opened || github.event.pull_request.reopened - steps: - - name: Checkout source code - uses: actions/checkout@v2 -# - name: scan codeql -# uses: github/codeql-action/init@v1 -# with: -# languages: go - - name: Update apt repository - run: sudo apt-get update -y - - name: Install dependencies - run: sudo apt-get install -y make curl podman - - name: build package - run: make docker-build-centos7 - centos-8: - name: on centos 8 - runs-on: ubuntu-20.04 - if: github.event.comment.body == 'build on centos 8' || github.event.pull_request.opened || github.event.pull_request.reopened - steps: - - name: Checkout source code - uses: actions/checkout@v2 -# - name: scan codeql -# uses: github/codeql-action/init@v1 -# with: -# languages: go - - name: Update apt repository - run: sudo apt-get update -y - - name: Install dependencies - run: sudo apt-get install -y make curl podman - - name: build package - run: make docker-build-centos8 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index a551a54..9182d41 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -14,13 +14,10 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.20' + go-version: '1.24' - name: Check style run: make style - - name: Check that we can compile the exporter - run: make build - - - name: Check that we can build the docker container + - name: Build Docker container run: make docker-build diff --git a/Dockerfile b/Dockerfile index a4a6232..d141216 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,16 @@ FROM golang:1.24.2 AS builder -LABEL maintainer="Jennings Liu " - ARG ARCH=amd64 -ENV GOROOT /usr/local/go -ENV GOPATH /go -ENV PATH "$GOROOT/bin:$GOPATH/bin:$PATH" -ENV GO_VERSION 1.15.2 -ENV GO111MODULE=on - - -# Build dependencies +# Build binary RUN mkdir -p /go/src/github.com/ && \ - git clone https://github.com/jenningsloy318/redfish_exporter /go/src/github.com/jenningsloy318/redfish_exporter && \ - cd /go/src/github.com/jenningsloy318/redfish_exporter && \ + git clone https://github.com/stackhpc/redfish_exporter /go/src/github.com/stackhpc/redfish_exporter && \ + cd /go/src/github.com/stackhpc/redfish_exporter && \ make build FROM golang:1.24.2 -COPY --from=builder /go/src/github.com/jenningsloy318/redfish_exporter/build/redfish_exporter /usr/local/bin/redfish_exporter +COPY --from=builder /go/src/github.com/stackhpc/redfish_exporter/build/redfish_exporter /usr/local/bin/redfish_exporter RUN mkdir /etc/prometheus -COPY config.yml.example /etc/prometheus/redfish_exporter.yml +COPY --from=builder /go/src/github.com/stackhpc/redfish_exporter/config.yml.example /etc/prometheus/redfish_exporter.yml CMD ["/usr/local/bin/redfish_exporter","--config.file","/etc/prometheus/redfish_exporter.yml"] diff --git a/Dockerfile.Alpine-builder b/Dockerfile.Alpine-builder deleted file mode 100644 index 9e53485..0000000 --- a/Dockerfile.Alpine-builder +++ /dev/null @@ -1,26 +0,0 @@ -FROM golang:1.18.1-alpine3.15 AS builder - -LABEL maintainer="Jennings Liu " - -ARG ARCH=amd64 - -ENV GOROOT /usr/local/go -ENV GOPATH /go -ENV PATH "$GOROOT/bin:$GOPATH/bin:$PATH" -ENV GO_VERSION 1.18.1 -ENV GO111MODULE=on -ENV CGO_ENABLED=0 - -# Build dependencies -WORKDIR /go/src/ -COPY . . -RUN apk update && apk add make git -RUN make build - -# Second stage -FROM alpine:3.15 - -COPY --from=builder /go/src/build/redfish_exporter /usr/local/bin/redfish_exporter -RUN mkdir /etc/prometheus -COPY config.yml.example /etc/prometheus/redfish_exporter.yml -CMD ["/usr/local/bin/redfish_exporter","--config.file","/etc/prometheus/redfish_exporter.yml"] diff --git a/Dockerfile.Centos7-builder b/Dockerfile.Centos7-builder deleted file mode 100644 index d319538..0000000 --- a/Dockerfile.Centos7-builder +++ /dev/null @@ -1,19 +0,0 @@ -FROM docker.io/library/centos:7 - -LABEL maintainer="Jennings Liu " - -ARG ARCH=amd64 - -ENV GOROOT /usr/local/go -ENV GOPATH /go -ENV PATH "$GOROOT/bin:$GOPATH/bin:$PATH" -ENV GO_VERSION 1.15.2 -ENV GO111MODULE=on -ENV GOPROXY=https://goproxy.cn - - -# Build dependencies - -RUN yum update -y && \ - yum install -y rpm-build make git && \ - curl -SL https://dl.google.com/go/go${GO_VERSION}.linux-${ARCH}.tar.gz | tar -xzC /usr/local diff --git a/Dockerfile.Centos8-builder b/Dockerfile.Centos8-builder deleted file mode 100644 index 20ea37e..0000000 --- a/Dockerfile.Centos8-builder +++ /dev/null @@ -1,19 +0,0 @@ -FROM docker.io/library/centos:8 - -LABEL maintainer="Jennings Liu " - -ARG ARCH=amd64 - -ENV GOROOT /usr/local/go -ENV GOPATH /go -ENV PATH "$GOROOT/bin:$GOPATH/bin:$PATH" -ENV GO_VERSION 1.15.2 -ENV GO111MODULE=on -ENV GOPROXY=https://goproxy.cn - - -# Build dependencies - -RUN yum update -y && \ - yum install -y rpm-build make git && \ - curl -SL https://dl.google.com/go/go${GO_VERSION}.linux-${ARCH}.tar.gz | tar -xzC /usr/local diff --git a/Makefile b/Makefile index d045591..3f2a09e 100755 --- a/Makefile +++ b/Makefile @@ -8,17 +8,16 @@ pkgs = ./... BIN_DIR ?= $(shell pwd)/build VERSION ?= $(shell cat VERSION) -REVERSION ?=$(shell git log -1 --pretty="%H") +REVISION ?=$(shell git log -1 --pretty="%H") BRANCH ?=$(shell git rev-parse --abbrev-ref HEAD) TIME ?=$(shell date --rfc-3339=seconds) DOCKER := $(shell { command -v podman || command -v docker; } 2>/dev/null) - -all: fmt style build docker-build docker-rpm +all: fmt style build docker-build style: @echo ">> checking code style" - ! $(GOFMT) -d $$(find . -path ./vendor -prune -o -name '*.go' -print) | grep '^' + ! $(GOFMT) -d $$(find . -path '*.go' -print) | grep '^' check_license: @echo ">> checking license header" @@ -32,38 +31,16 @@ check_license: build: | @echo ">> building binaries" - $(GO) build -o build/redfish_exporter -ldflags '-X "main.Version=$(VERSION)" -X "main.BuildRevision=$(REVERSION)" -X "main.BuildBranch=$(BRANCH)" -X "main.BuildTime=$(TIME)"' - -docker-build-centos7: - $(DOCKER) run -v `pwd`:/go/src/github.com/jenningsloy318/redfish_exporter -w /go/src/github.com/jenningsloy318/redfish_exporter docker.io/jenningsloy318/prom-builder:centos7 /bin/bash -c "yum update -y && make build" - - -docker-build-centos8: - $(DOCKER) run -v `pwd`:/go/src/github.com/jenningsloy318/redfish_exporter -w /go/src/github.com/jenningsloy318/redfish_exporter docker.io/jenningsloy318/prom-builder:centos8 /bin/bash -c "yum update -y && make build" + $(GO) build -o build/redfish_exporter -ldflags '-X "main.Version=$(VERSION)" -X "main.BuildRevision=$(REVISION)" -X "main.BuildBranch=$(BRANCH)" -X "main.BuildTime=$(TIME)"' docker-build: - make docker-build-centos7 - make docker-build-centos8 - -rpm: | build - @echo ">> building binaries" - $(RPM) - -docker-rpm-centos7: - $(DOCKER) run -v `pwd`:/go/src/github.com/jenningsloy318/redfish_exporter -w /go/src/github.com/jenningsloy318/redfish_exporter docker.io/jenningsloy318/prom-builder:centos7 /bin/bash -c "yum update -y && make rpm" - -docker-rpm-centos8: - $(DOCKER) run -v `pwd`:/go/src/github.com/jenningsloy318/redfish_exporter -w /go/src/github.com/jenningsloy318/redfish_exporter docker.io/jenningsloy318/prom-builder:centos8 /bin/bash -c "yum update -y && make rpm" - -docker-rpm: - make docker-rpm-centos7 - make docker-rpm-centos8 + $(DOCKER) build -t stackhpc/redfish_exporter --network=host . fmt: @echo ">> format code style" - $(GOFMT) -w $$(find . -path ./vendor -prune -o -name '*.go' -print) + $(GOFMT) -w $$(find . -path '*.go' -print) clean: rm -rf $(BIN_DIR) -.PHONY: all style check_license fmt build fmt build rpm docker-build docker-rpm \ No newline at end of file +.PHONY: all style check_license fmt build fmt build rpm docker-build diff --git a/README.md b/README.md index cf1d98b..2f9a794 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # redfish_exporter -A prometheus exporter to get metrics from redfish based servers such as lenovo/dell/Supermicro servers. +A prometheus exporter to get metrics from redfish based servers. + +This is a fork of the original project from https://github.com/jenningsloy318/redfish_exporter ## Configuration @@ -154,17 +156,6 @@ To build the redfish_exporter executable run the command: make build ``` -or build in centos 7 docker image -```sh -make docker-build-centos7 -``` - -or build in centos 8 docker image -```sh -make docker-build-centos8 -``` -or we can also build a docker image using [Dockerfile](./Dockerfile) - ## Running - running directly on linux ```sh diff --git a/REST_API_user_manual.pdf b/REST_API_user_manual.pdf deleted file mode 100755 index 03be530..0000000 Binary files a/REST_API_user_manual.pdf and /dev/null differ diff --git a/collector/chassis_collector.go b/collector/chassis_collector.go index cb6f633..c5f899a 100755 --- a/collector/chassis_collector.go +++ b/collector/chassis_collector.go @@ -7,8 +7,8 @@ import ( "sync" "github.com/apex/log" - "github.com/jenningsloy318/redfish_exporter/common" "github.com/prometheus/client_golang/prometheus" + "github.com/stackhpc/redfish_exporter/common" "github.com/stmcginnis/gofish/redfish" ) diff --git a/collector/common_collector.go b/collector/common_collector.go index 7f56383..31b9c53 100644 --- a/collector/common_collector.go +++ b/collector/common_collector.go @@ -5,8 +5,8 @@ import ( "sync" "github.com/apex/log" - redfish_common "github.com/jenningsloy318/redfish_exporter/common" "github.com/prometheus/client_golang/prometheus" + redfish_common "github.com/stackhpc/redfish_exporter/common" "github.com/stmcginnis/gofish/common" "github.com/stmcginnis/gofish/redfish" ) diff --git a/collector/manager_collector.go b/collector/manager_collector.go index 7e40fc7..ed41b2a 100755 --- a/collector/manager_collector.go +++ b/collector/manager_collector.go @@ -5,8 +5,8 @@ import ( "sync" "github.com/apex/log" - "github.com/jenningsloy318/redfish_exporter/common" "github.com/prometheus/client_golang/prometheus" + "github.com/stackhpc/redfish_exporter/common" ) // ManagerSubmanager is the manager subsystem diff --git a/collector/redfish_collector.go b/collector/redfish_collector.go index 30da33d..b127855 100755 --- a/collector/redfish_collector.go +++ b/collector/redfish_collector.go @@ -6,8 +6,8 @@ import ( "time" alog "github.com/apex/log" - "github.com/jenningsloy318/redfish_exporter/common" "github.com/prometheus/client_golang/prometheus" + "github.com/stackhpc/redfish_exporter/common" gofish "github.com/stmcginnis/gofish" gofishcommon "github.com/stmcginnis/gofish/common" redfish "github.com/stmcginnis/gofish/redfish" diff --git a/collector/system_collector.go b/collector/system_collector.go index 542a023..75457ef 100755 --- a/collector/system_collector.go +++ b/collector/system_collector.go @@ -6,8 +6,8 @@ import ( "sync" "github.com/apex/log" - "github.com/jenningsloy318/redfish_exporter/common" "github.com/prometheus/client_golang/prometheus" + "github.com/stackhpc/redfish_exporter/common" "github.com/stmcginnis/gofish/redfish" ) diff --git a/go.mod b/go.mod index eff7e26..f6485d1 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/jenningsloy318/redfish_exporter +module github.com/stackhpc/redfish_exporter go 1.21 diff --git a/helm/.helmignore b/helm/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/helm/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/helm/Chart.yaml b/helm/Chart.yaml deleted file mode 100644 index 3184df2..0000000 --- a/helm/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v2 -name: redfish-exporter -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.1 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "0.11.0" diff --git a/helm/templates/NOTES.txt b/helm/templates/NOTES.txt deleted file mode 100644 index 87da71b..0000000 --- a/helm/templates/NOTES.txt +++ /dev/null @@ -1,22 +0,0 @@ -1. Get the application URL by running these commands: -{{- if .Values.ingress.enabled }} -{{- range $host := .Values.ingress.hosts }} - {{- range .paths }} - http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} - {{- end }} -{{- end }} -{{- else if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "redfish_exporter.fullname" . }}) - export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") - echo http://$NODE_IP:$NODE_PORT -{{- else if contains "LoadBalancer" .Values.service.type }} - NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "redfish_exporter.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "redfish_exporter.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo http://$SERVICE_IP:{{ .Values.service.port }} -{{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "redfish_exporter.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") - export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") - echo "Visit http://127.0.0.1:8080 to use your application" - kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT -{{- end }} diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl deleted file mode 100644 index 35050d6..0000000 --- a/helm/templates/_helpers.tpl +++ /dev/null @@ -1,65 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "redfish_exporter.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "redfish_exporter.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "redfish_exporter.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "redfish_exporter.labels" -}} -helm.sh/chart: {{ include "redfish_exporter.chart" . }} -{{ include "redfish_exporter.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- range $k, $v := .Values.extraLabels }} -{{ $k }}: {{ $v }} -{{- end }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "redfish_exporter.selectorLabels" -}} -app.kubernetes.io/name: {{ include "redfish_exporter.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "redfish_exporter.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "redfish_exporter.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/helm/templates/deployment.yaml b/helm/templates/deployment.yaml deleted file mode 100644 index fac5bff..0000000 --- a/helm/templates/deployment.yaml +++ /dev/null @@ -1,73 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ include "redfish_exporter.fullname" . }} - labels: - {{- include "redfish_exporter.labels" . | nindent 4 }} -spec: - {{- if not .Values.autoscaling.enabled }} - replicas: {{ .Values.replicaCount }} - {{- end }} - selector: - matchLabels: - {{- include "redfish_exporter.selectorLabels" . | nindent 6 }} - template: - metadata: - annotations: - secret/checksum: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} - {{- with .Values.podAnnotations }} - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "redfish_exporter.selectorLabels" . | nindent 8 }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - serviceAccountName: {{ include "redfish_exporter.serviceAccountName" . }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - volumes: - - name: config - secret: - secretName: {{ include "redfish_exporter.fullname" . }} - containers: - - name: {{ .Chart.Name }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} - command: - - "/usr/local/bin/redfish_exporter" - - "--config.file=/etc/prometheus/redfish_exporter.yml" - - "--log.level={{ .Values.logLevel }}" - ports: - - name: http - containerPort: 9610 - protocol: TCP - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: / - port: http - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumeMounts: - - name: config - mountPath: /etc/prometheus/ - {{- with .Values.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/helm/templates/hpa.yaml b/helm/templates/hpa.yaml deleted file mode 100644 index 06aa0e8..0000000 --- a/helm/templates/hpa.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "redfish_exporter.fullname" . }} - labels: - {{- include "redfish_exporter.labels" . | nindent 4 }} -spec: - scaleTargetRef: - apiVersion: apps/v1 - kind: Deployment - name: {{ include "redfish_exporter.fullname" . }} - minReplicas: {{ .Values.autoscaling.minReplicas }} - maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} -{{- end }} diff --git a/helm/templates/ingress.yaml b/helm/templates/ingress.yaml deleted file mode 100644 index 3a60df7..0000000 --- a/helm/templates/ingress.yaml +++ /dev/null @@ -1,61 +0,0 @@ -{{- if .Values.ingress.enabled -}} -{{- $fullName := include "redfish_exporter.fullname" . -}} -{{- $svcPort := .Values.service.port -}} -{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} - {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} - {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} - {{- end }} -{{- end }} -{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1 -{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} -apiVersion: networking.k8s.io/v1beta1 -{{- else -}} -apiVersion: extensions/v1beta1 -{{- end }} -kind: Ingress -metadata: - name: {{ $fullName }} - labels: - {{- include "redfish_exporter.labels" . | nindent 4 }} - {{- with .Values.ingress.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} - ingressClassName: {{ .Values.ingress.className }} - {{- end }} - {{- if .Values.ingress.tls }} - tls: - {{- range .Values.ingress.tls }} - - hosts: - {{- range .hosts }} - - {{ . | quote }} - {{- end }} - secretName: {{ .secretName }} - {{- end }} - {{- end }} - rules: - {{- range .Values.ingress.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ .path }} - {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} - pathType: {{ .pathType }} - {{- end }} - backend: - {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} - service: - name: {{ $fullName }} - port: - number: {{ $svcPort }} - {{- else }} - serviceName: {{ $fullName }} - servicePort: {{ $svcPort }} - {{- end }} - {{- end }} - {{- end }} -{{- end }} diff --git a/helm/templates/secret.yaml b/helm/templates/secret.yaml deleted file mode 100644 index d9dff81..0000000 --- a/helm/templates/secret.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v1 -kind: Secret -metadata: - name: {{ include "redfish_exporter.fullname" . }} - labels: - {{- include "redfish_exporter.labels" . | nindent 4 }} -stringData: - redfish_exporter.yml: | - {{- .Values.exporterConfig | toYaml | nindent 4 }} \ No newline at end of file diff --git a/helm/templates/service.yaml b/helm/templates/service.yaml deleted file mode 100644 index f1aeea7..0000000 --- a/helm/templates/service.yaml +++ /dev/null @@ -1,15 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ include "redfish_exporter.fullname" . }} - labels: - {{- include "redfish_exporter.labels" . | nindent 4 }} -spec: - type: {{ .Values.service.type }} - ports: - - port: {{ .Values.service.port }} - targetPort: http - protocol: TCP - name: http - selector: - {{- include "redfish_exporter.selectorLabels" . | nindent 4 }} diff --git a/helm/templates/serviceaccount.yaml b/helm/templates/serviceaccount.yaml deleted file mode 100644 index 26f6779..0000000 --- a/helm/templates/serviceaccount.yaml +++ /dev/null @@ -1,12 +0,0 @@ -{{- if .Values.serviceAccount.create -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "redfish_exporter.serviceAccountName" . }} - labels: - {{- include "redfish_exporter.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/helm/templates/servicemonitors.yaml b/helm/templates/servicemonitors.yaml deleted file mode 100644 index 8ae864e..0000000 --- a/helm/templates/servicemonitors.yaml +++ /dev/null @@ -1,70 +0,0 @@ -{{- if .Values.serviceMonitor.enabled }} ---- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "redfish_exporter.fullname" . }}-self - labels: - {{- include "redfish_exporter.labels" . | nindent 4 }} -spec: - endpoints: - - port: http - interval: {{ .Values.serviceMonitor.interval }} - path: /metrics - scrapeTimeout: {{ .Values.serviceMonitor.scrapeTimeout }} - targetLabels: - - "app.kubernetes.io/instance" - {{- if $.Values.extraLabels }} - {{- range $key, $val := $.Values.extraLabels }} - - {{ $key | quote }} - {{ end -}} - {{- end }} - selector: - matchLabels: - {{- include "redfish_exporter.selectorLabels" . | nindent 6 }} ---- -{{- range $host, $hostConfig := .Values.exporterConfig.hosts }} -{{- if ne $host "default" }} ---- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "redfish_exporter.fullname" $ }}-{{ regexReplaceAll ":" $host "-" | trimAll "[]" }} - labels: - {{- include "redfish_exporter.labels" $ | nindent 4 }} - redfish-exporter/host: {{ regexReplaceAll ":" $host "_" | trimAll "[]" }} -spec: - endpoints: - - port: http - interval: {{ $.Values.serviceMonitor.interval }} - params: - target: - - "{{ $host }}" - {{- if $hostConfig.group }} - group: - - {{ $hostConfig.group }} - {{- end }} - {{- /* Path */}} - path: /redfish - metricRelabelings: - - targetLabel: instance - replacement: {{ trimAll "[]" $host }} - # (optional) when using group config add this to have group=my_group_name - {{- if $hostConfig.group }} - - targetLabel: instance_group - replacement: {{ $hostConfig.group }} - {{- end }} - scrapeTimeout: {{ $.Values.serviceMonitor.scrapeTimeout }} - targetLabels: - - "app.kubernetes.io/instance" - {{- if $.Values.extraLabels }} - {{- range $key, $val := $.Values.extraLabels }} - - {{ $key | quote }} - {{ end -}} - {{- end }} - selector: - matchLabels: - {{- include "redfish_exporter.selectorLabels" $ | nindent 6 }} -{{- end }} -{{- end }} -{{- end }} diff --git a/helm/values.yaml b/helm/values.yaml deleted file mode 100644 index e051141..0000000 --- a/helm/values.yaml +++ /dev/null @@ -1,111 +0,0 @@ -# Default values for redfish_exporter. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -replicaCount: 1 - -extraLabels: - {} - # key1: value1 - -image: - repository: harbor.maxiv.lu.se/monitoring/redfish-exporter - pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. - tag: "" - -imagePullSecrets: [] -nameOverride: "" -fullnameOverride: "" - -serviceAccount: - # Specifies whether a service account should be created - create: true - # Annotations to add to the service account - annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template - name: "" - -podAnnotations: {} - -podSecurityContext: - {} - # fsGroup: 2000 - -securityContext: - {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 - -service: - type: ClusterIP - port: 9610 - -ingress: - enabled: false - className: "" - annotations: - {} - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" - hosts: - - host: chart-example.local - paths: - - path: / - pathType: ImplementationSpecific - tls: [] - # - secretName: chart-example-tls - # hosts: - # - chart-example.local - -resources: - {} - # We usually recommend not to specify default resources and to leave this as a conscious - # choice for the user. This also increases chances charts run on environments with little - # resources, such as Minikube. If you do want to specify resources, uncomment the following - # lines, adjust them as necessary, and remove the curly braces after 'resources:'. - # limits: - # cpu: 100m - # memory: 128Mi - # requests: - # cpu: 100m - # memory: 128Mi - -autoscaling: - enabled: false - minReplicas: 1 - maxReplicas: 10 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 - -nodeSelector: {} - -tolerations: [] - -affinity: {} - -serviceMonitor: - enabled: true - interval: 120s - scrapeTimeout: 30s - -logLevel: error - -exporterConfig: - {} - # hosts: - # 10.36.48.24: - # username: admin - # password: pass - # default: - # username: admin - # password: pass - # groups: - # group1: - # username: group1_user - # password: group1_pass diff --git a/main.go b/main.go index 2d4eab8..625fa24 100755 --- a/main.go +++ b/main.go @@ -9,13 +9,13 @@ import ( alog "github.com/apex/log" kitlog "github.com/go-kit/log" - "github.com/jenningsloy318/redfish_exporter/collector" - "github.com/jenningsloy318/redfish_exporter/common" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/log" "github.com/prometheus/exporter-toolkit/web" webflag "github.com/prometheus/exporter-toolkit/web/kingpinflag" + "github.com/stackhpc/redfish_exporter/collector" + "github.com/stackhpc/redfish_exporter/common" kingpin "gopkg.in/alecthomas/kingpin.v2" ) @@ -48,7 +48,7 @@ func init() { }) hostname, _ := os.Hostname() - rootLoggerCtx.Infof("version %s, build reversion %s, build branch %s, build at %s on host %s", Version, BuildRevision, BuildBranch, BuildTime, hostname) + rootLoggerCtx.Infof("version %s, build revision %s, build branch %s, built at %s on host %s", Version, BuildRevision, BuildBranch, BuildTime, hostname) } func reloadHandler(configLoggerCtx *alog.Entry) http.HandlerFunc { diff --git a/sampleOut/ServiceRoot.json b/sampleOut/ServiceRoot.json deleted file mode 100755 index 360b315..0000000 --- a/sampleOut/ServiceRoot.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "Tasks": { - "@odata.id": "/redfish/v1/Tasks/" - }, - "Chassis": { - "@odata.id": "/redfish/v1/Chassis/" - }, - "Id": "RootService", - "Links": { - "Sessions": { - "@odata.id": "/redfish/v1/SessionService/Sessions/" - } - }, - "Managers": { - "@odata.id": "/redfish/v1/Managers/" - }, - "EventService": { - "@odata.id": "/redfish/v1/EventService/" - }, - "JsonSchemas": { - "@odata.id": "/redfish/v1/JsonSchemas/" - }, - "Systems": { - "@odata.id": "/redfish/v1/Systems/" - }, - "Description": "This resource is used to represent a service root for a Redfish implementation.", - "Registries": { - "@odata.id": "/redfish/v1/Registries/" - }, - "UUID": "F9753D74-6E44-11E9-81BA-0A94EF7A633B", - "Name": "Root Service", - "RedfishVersion": "1.0.2", - "@odata.context": "/redfish/v1/$metadata#ServiceRoot.ServiceRoot", - "Oem": { - "Lenovo": { - "FirmwareServices": { - "@odata.id": "/redfish/v1/Oem/Lenovo/FirmwareServices/" - } - } - }, - "@odata.type": "#ServiceRoot.v1_2_0.ServiceRoot", - "SessionService": { - "@odata.id": "/redfish/v1/SessionService/" - }, - "@odata.id": "/redfish/v1/", - "@odata.etag": "W/\"da50f40581e794a95d7a0579a4227b8f\"", - "AccountService": { - "@odata.id": "/redfish/v1/AccountService/" - }, - "UpdateService": { - "@odata.id": "/redfish/v1/UpdateService/" - } -} \ No newline at end of file diff --git a/sampleOut/chassis.json b/sampleOut/chassis.json deleted file mode 100755 index 6e28b87..0000000 --- a/sampleOut/chassis.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "SerialNumber": "J300Z21M", - "Id": "1", - "Links": { - "Drives": [ - { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Drives/Disk.0" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Drives/Disk.1" - } - ], - "CooledBy": [ - { - "@odata.id": "/redfish/v1/Chassis/1/Thermal/#/Fans/0" - }, - { - "@odata.id": "/redfish/v1/Chassis/1/Thermal/#/Fans/1" - }, - { - "@odata.id": "/redfish/v1/Chassis/1/Thermal/#/Fans/2" - }, - { - "@odata.id": "/redfish/v1/Chassis/1/Thermal/#/Fans/3" - }, - { - "@odata.id": "/redfish/v1/Chassis/1/Thermal/#/Fans/4" - }, - { - "@odata.id": "/redfish/v1/Chassis/1/Thermal/#/Fans/5" - } - ], - "ComputerSystems": [ - { - "@odata.id": "/redfish/v1/Systems/1/" - } - ], - "PCIeDevices": [ - { - "@odata.id": "/redfish/v1/Systems/1/PCIeDevices/ob_1" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeDevices/slot_2" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeDevices/slot_7" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeDevices/slot_8" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeDevices/slot_9" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeDevices/slot_10" - } - ], - "PoweredBy": [ - { - "@odata.id": "/redfish/v1/Chassis/1/Power/#/PowerSupplies/0" - }, - { - "@odata.id": "/redfish/v1/Chassis/1/Power/#/PowerSupplies/1" - } - ], - "Storage": [ - { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/" - } - ], - "ManagedBy": [ - { - "@odata.id": "/redfish/v1/Managers/1/" - } - ], - "ManagersInChassis": [ - { - "@odata.id": "/redfish/v1/Managers/1/" - } - ] - }, - "PowerState": "On", - "@odata.context": "/redfish/v1/$metadata#Chassis.Chassis", - "ChassisType": "RackMount", - "PartNumber": "SB27A41378", - "Description": "This resource is used to represent a chassis or other physical enclosure for a Redfish implementation.", - "Thermal": { - "@odata.id": "/redfish/v1/Chassis/1/Thermal/" - }, - "Model": "7X19CTO1WW", - "@odata.id": "/redfish/v1/Chassis/1/", - "@odata.type": "#Chassis.v1_5_0.Chassis", - "Status": { - "State": "Enabled", - "Health": "OK" - }, - "IndicatorLED": "Off", - "Name": "Chassis", - "HeightMm": 88.9, - "Power": { - "@odata.id": "/redfish/v1/Chassis/1/Power/" - }, - "Oem": { - "Lenovo": { - "LocatedIn": { - "ContactPerson": "jennings.liu@sap.com", - "FullPostalAddress": "Beijing City", - "Rack": "", - "DescriptiveName": "dc1-bm-esx-inb-prod05-console", - "Room": "room 207", - "Height": 2, - "Location": "Jiuxianqiao Chaoyang Beijing" - }, - "Sensors": { - "@odata.id": "/redfish/v1/Chassis/1/Oem/Lenovo/Sensors/" - }, - "ProductName": "ThinkSystem SR850", - "Slots": { - "@odata.id": "/redfish/v1/Chassis/1/Oem/Lenovo/Slots/" - }, - "LEDs": { - "@odata.id": "/redfish/v1/Chassis/1/Oem/Lenovo/LEDs/" - } - } - }, - "NetworkAdapters": { - "@odata.id": "/redfish/v1/Chassis/1/NetworkAdapters/" - }, - "AssetTag": "", - "Manufacturer": "Lenovo", - "@odata.etag": "W/\"b631e80644af53cf1bd85de5c7375234\"", - "LogServices": { - "@odata.id": "/redfish/v1/Systems/1/LogServices/" - }, - "SKU": "7X19CTO1WW" -} \ No newline at end of file diff --git a/sampleOut/manager.json b/sampleOut/manager.json deleted file mode 100755 index 0837d3c..0000000 --- a/sampleOut/manager.json +++ /dev/null @@ -1,124 +0,0 @@ -{ - "DateTimeLocalOffset": "+08:00", - "Id": "1", - "NetworkProtocol": { - "@odata.id": "/redfish/v1/Managers/1/NetworkProtocol/" - }, - "PowerState": "On", - "@odata.context": "/redfish/v1/$metadata#Manager.Manager", - "@odata.etag": "W/\"1bd53f68d16d4510910df94943c16a52\"", - "@odata.id": "/redfish/v1/Managers/1/", - "LogServices": { - "@odata.id": "/redfish/v1/Systems/1/LogServices/" - }, - "ManagerType": "BMC", - "Description": "This resource is used to represent a management subsystem for a Redfish implementation.", - "VirtualMedia": { - "@odata.id": "/redfish/v1/Managers/1/VirtualMedia/" - }, - "SerialInterfaces": { - "@odata.id": "/redfish/v1/Managers/1/SerialInterfaces/" - }, - "Links": { - "ManagerForChassis": [ - { - "@odata.id": "/redfish/v1/Chassis/1/" - } - ], - "ManagerForServers": [ - { - "@odata.id": "/redfish/v1/Systems/1/" - } - ] - }, - "Model": "Lenovo XClarity Controller", - "CommandShell": { - "MaxConcurrentSessions": 4, - "ConnectTypesSupported": [ - "SSH" - ], - "ServiceEnabled": true - }, - "UUID": "F9753D74-6E44-11E9-81BA-0A94EF7A633B", - "Status": { - "State": "Enabled" - }, - "HostInterfaces": { - "@odata.id": "/redfish/v1/Managers/1/HostInterfaces/" - }, - "Name": "Manager", - "FirmwareVersion": "TEI334L 2.10 2018-09-12", - "ServiceEntryPointUUID": "F9753D74-6E44-11E9-81BA-0A94EF7A633B", - "Oem": { - "Lenovo": { - "Configuration": { - "@odata.id": "/redfish/v1/Managers/1/Oem/Lenovo/Configuration" - }, - "FoD": { - "@odata.id": "/redfish/v1/Managers/1/Oem/Lenovo/FoD/" - }, - "ServiceData": { - "@odata.id": "/redfish/v1/Managers/1/Oem/Lenovo/ServiceData" - }, - "DateTimeService": { - "@odata.id": "/redfish/v1/Managers/1/Oem/Lenovo/DateTimeService" - }, - "Watchdogs": { - "@odata.id": "/redfish/v1/Managers/1/Oem/Lenovo/Watchdogs/" - }, - "RemoteControl": { - "@odata.id": "/redfish/v1/Managers/1/Oem/Lenovo/RemoteControl/" - }, - "ServerProfile": { - "@odata.id": "/redfish/v1/Managers/1/Oem/Lenovo/ServerProfile" - }, - "Security": { - "@odata.id": "/redfish/v1/Managers/1/Oem/Lenovo/Security" - }, - "RemoteMap": { - "@odata.id": "/redfish/v1/Managers/1/Oem/Lenovo/RemoteMap/" - }, - "Recipients": { - "@odata.id": "/redfish/v1/Managers/1/Oem/Lenovo/Recipients/" - } - } - }, - "@odata.type": "#Manager.v1_3_1.Manager", - "GraphicalConsole": { - "MaxConcurrentSessions": 6, - "ConnectTypesSupported": [ - "KVMIP" - ], - "ServiceEnabled": true - }, - "DateTime": "2019-07-25 11:00:03+08:00", - "SerialConsole": { - "MaxConcurrentSessions": 2, - "ConnectTypesSupported": [ - "IPMI", - "SSH" - ], - "ServiceEnabled": true - }, - "Actions": { - "Oem": { - "Lenovo": { - "#LenovoManagerActions.GetIPMIProperty": { - "title": "GetIPMIProperty", - "target": "/redfish/v1/Managers/1/Actions/Oem/Lenovo/LenovoManagerActions.GetIPMIProperty" - } - } - }, - "#Manager.Reset": { - "target": "/redfish/v1/Managers/1/Actions/Manager.Reset", - "title": "Reset", - "ResetType@Redfish.AllowableValues": [ - "GracefulRestart", - "ForceRestart" - ] - } - }, - "EthernetInterfaces": { - "@odata.id": "/redfish/v1/Managers/1/EthernetInterfaces/" - } -} \ No newline at end of file diff --git a/sampleOut/memories.json b/sampleOut/memories.json deleted file mode 100755 index 654d97c..0000000 --- a/sampleOut/memories.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "@odata.id": "/redfish/v1/Systems/1/Memory/", - "Members@odata.count": 48, - "@odata.context": "/redfish/v1/$metadata#MemoryCollection.MemoryCollection", - "Members": [ - { - "@odata.id": "/redfish/v1/Systems/1/Memory/1" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/2" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/3" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/4" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/5" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/6" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/7" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/8" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/9" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/10" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/11" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/12" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/13" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/14" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/15" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/16" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/17" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/18" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/19" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/20" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/21" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/22" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/23" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/24" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/25" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/26" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/27" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/28" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/29" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/30" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/31" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/32" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/33" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/34" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/35" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/36" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/37" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/38" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/39" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/40" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/41" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/42" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/43" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/44" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/45" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/46" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/47" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Memory/48" - } - ], - "Oem": { - "Lenovo": { - "HistoryMemMetric": { - "@odata.id": "/redfish/v1/Systems/1/Memory/Oem/Lenovo/HistoryMemMetric" - } - } - }, - "@odata.type": "#MemoryCollection.MemoryCollection", - "Members@odata.navigationLink": "/redfish/v1/Systems/1/Memory/Members", - "@odata.etag": "W/\"306ef20aa78dc43daed1a41109134714\"", - "Name": "Memory Collection", - "Description": "A Collection of memory resource instances." -} \ No newline at end of file diff --git a/sampleOut/memory_1.json b/sampleOut/memory_1.json deleted file mode 100755 index 93037b5..0000000 --- a/sampleOut/memory_1.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "SerialNumber": "3144A7CC", - "@odata.etag": "W/\"f6f6de5d1655b67c9ad45014cd9070e9\"", - "BusWidthBits": 72, - "Id": "1", - "@odata.id": "/redfish/v1/Systems/1/Memory/1", - "Links": { - "Chassis": { - "@odata.id": "/redfish/v1/Chassis/1/" - } - }, - "MemoryMedia": [ - "DRAM" - ], - "@odata.context": "/redfish/v1/$metadata#Memory.Memory", - "BaseModuleType": "LRDIMM", - "Name": "DIMM 1", - "OperatingSpeedMhz": 2666, - "PartNumber": "M386A8K40CM2-CTD", - "MemoryDeviceType": "DDR4", - "CapacityMiB": 65536, - "MemoryLocation": { - "Channel": 5, - "MemoryController": 1, - "Slot": 1, - "Socket": 1 - }, - "Description": "This resource is used to represent a memory for a Redfish implementation.", - "MemoryType": "DRAM", - "SubsystemDeviceID": "0x0000", - "OperatingMemoryModes": [ - "Volatile" - ], - "Status": { - "State": "Enabled", - "Health": "OK" - }, - "Oem": { - "Lenovo": { - "PN": "01DE975" - } - }, - "DataWidthBits": 64, - "AllowedSpeedsMHz": [ - 2666 - ], - "FunctionClasses": [ - "Volatile" - ], - "SubsystemVendorID": "0x0000", - "@odata.type": "#Memory.v1_2_0.Memory", - "RankCount": 3, - "Manufacturer": "Samsung", - "DeviceID": "DIMM_1", - "DeviceLocator": "DIMM 1", - "VendorID": "Samsung" -} \ No newline at end of file diff --git a/sampleOut/pcei-device.json b/sampleOut/pcei-device.json deleted file mode 100755 index 77cbc65..0000000 --- a/sampleOut/pcei-device.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "SerialNumber": "SP83707812", - "@odata.id": "/redfish/v1/Systems/1/PCIeDevices/slot_10", - "Links": { - "Chassis": [ - { - "@odata.id": "/redfish/v1/Chassis/1/" - } - ], - "PCIeFunctions": [ - { - "@odata.id": "/redfish/v1/Systems/1/PCIeFunctions/slot_10.00" - } - ] - }, - "@odata.context": "/redfish/v1/$metadata#PCIeDevice.PCIeDevice", - "PartNumber": "SR17A04503", - "Description": "This resource represents the properties of a PCIeDevice attached to a System.", - "FirmwareVersion": "50.7.0-2054", - "Status": { - "State": "Enabled", - "Health": "OK" - }, - "Name": "ThinkSystem RAID 530-8i PCIe 12Gb Adapter", - "Oem": { - "Lenovo": { - "Location": { - "InfoFormat": "Slot X", - "Info": "Slot 10" - } - } - }, - "SKU": "01KN505", - "@odata.type": "#PCIeDevice.v1_1_0.PCIeDevice", - "DeviceType": "SingleFunction", - "Manufacturer": "Lenovo", - "@odata.etag": "W/\"d2d3ce3fbe6c9894ed0a4895aaae61a7\"", - "Model": "SAS3408", - "Id": "slot_10" -} \ No newline at end of file diff --git a/sampleOut/processor_1.json b/sampleOut/processor_1.json deleted file mode 100755 index 3f74489..0000000 --- a/sampleOut/processor_1.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "ProcessorArchitecture": "x86", - "Links": { - "Chassis": { - "@odata.id": "/redfish/v1/Chassis/1/" - } - }, - "TotalThreads": 40, - "InstructionSet": "x86-64", - "Description": "This resource is used to represent a processor for a Redfish implementation.", - "@odata.etag": "W/\"d6e8c232cb9e965c716b47dd5c20a656\"", - "@odata.context": "/redfish/v1/$metadata#Processor.Processor", - "@odata.id": "/redfish/v1/Systems/1/Processors/1", - "Status": { - "State": "Enabled", - "Health": "OK" - }, - "ProcessorType": "CPU", - "Name": "Processor 1", - "ProcessorId": { - "Step": "0x04", - "VendorId": "GenuineIntel", - "EffectiveModel": "0x55", - "EffectiveFamily": "0x06", - "IdentificationRegisters": "0x00050654bfebfbff", - "MicrocodeInfo": null - }, - "Id": "1", - "Oem": { - "Lenovo": { - "ProcessorFamily": 179, - "CacheInfo": [ - { - "MaxCacheSizeKByte": 1280, - "InstalledSizeKByte": 1280, - "CacheLevel": "L1" - }, - { - "MaxCacheSizeKByte": 20480, - "InstalledSizeKByte": 20480, - "CacheLevel": "L2" - }, - { - "MaxCacheSizeKByte": 28160, - "InstalledSizeKByte": 28160, - "CacheLevel": "L3" - } - ], - "NumberOfEnabledCores": 20, - "ExternalBusClockSpeedMHz": 100, - "CurrentClockSpeedMHz": 2000 - } - }, - "@odata.type": "#Processor.v1_1_0.Processor", - "TotalCores": 20, - "Manufacturer": "Intel(R) Corporation", - "MaxSpeedMHz": 3700, - "Model": "Intel(R) Xeon(R) Gold 6138 CPU @ 2.00GHz", - "Socket": "CPU 1" -} \ No newline at end of file diff --git a/sampleOut/processors.json b/sampleOut/processors.json deleted file mode 100755 index a3e129c..0000000 --- a/sampleOut/processors.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "@odata.id": "/redfish/v1/Systems/1/Processors/", - "Members@odata.count": 4, - "@odata.context": "/redfish/v1/$metadata#ProcessorCollection.ProcessorCollection", - "Members": [ - { - "@odata.id": "/redfish/v1/Systems/1/Processors/1" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Processors/2" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Processors/3" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Processors/4" - } - ], - "Oem": { - "Lenovo": { - "HistoryCPUMetric": { - "@odata.id": "/redfish/v1/Systems/1/Processors/Oem/Lenovo/HistoryCPUMetric" - } - } - }, - "@odata.type": "#ProcessorCollection.ProcessorCollection", - "Members@odata.navigationLink": "/redfish/v1/Systems/1/Processors/Members", - "@odata.etag": "W/\"fef1e69e0075244bc90fce8da8e4c87f\"", - "Name": "ProcessorCollection", - "Description": "A Collection of Processor resource instances." -} \ No newline at end of file diff --git a/sampleOut/simple_storage_1.json b/sampleOut/simple_storage_1.json deleted file mode 100644 index 5e92b11..0000000 --- a/sampleOut/simple_storage_1.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "@odata.context": "/redfish/v1/$metadata#SimpleStorage.SimpleStorage", - "@odata.type": "#SimpleStorage.v1_2_0.SimpleStorage", - "@odata.id": "/redfish/v1/Systems/1/SimpleStorage/1", - "Id": "1", - "Name": "Simple Storage", - "Description": "LSI HDD", - "Status": { - "State": "Enabled", - "Health": "OK" - }, - "Devices": [ - { - "@odata.type": "#SimpleStorage.1.1.0.Device", - "Name": "Physical Drive 0 (LSI Device0)", - "Manufacturer": "ATA", - "Model": "ST16000NM001G-2K", - "Status": { - "State": "Enabled", - "Health": "OK" - } - }, - { - "@odata.type": "#SimpleStorage.1.1.0.Device", - "Name": "Physical Drive 1 (LSI Device0)", - "Manufacturer": "ATA", - "Model": "ST16000NM001G-2K", - "Status": { - "State": "Enabled", - "Health": "OK" - } - } - ], - "Links": { - "Chassis": {} - } -} \ No newline at end of file diff --git a/sampleOut/simple_storages.json b/sampleOut/simple_storages.json deleted file mode 100644 index de84549..0000000 --- a/sampleOut/simple_storages.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "@odata.context": "/redfish/v1/$metadata#SimpleStorageCollection.SimpleStorageCollection", - "@odata.type": "#SimpleStorageCollection.SimpleStorageCollection", - "@odata.id": "/redfish/v1/Systems/1/SimpleStorage", - "Name": "Simple Storage Collection", - "Description": "Simple Storage Collection", - "Members@odata.count": 1, - "Members": [ - { - "@odata.id": "/redfish/v1/Systems/1/SimpleStorage/1" - } - ] -} \ No newline at end of file diff --git a/sampleOut/storage.json b/sampleOut/storage.json deleted file mode 100755 index 336c5e4..0000000 --- a/sampleOut/storage.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "@odata.id": "/redfish/v1/Systems/1/Storage/", - "Members@odata.navigationLink": "/redfish/v1/Systems/1/Storage/Members", - "@odata.context": "/redfish/v1/$metadata#StorageCollection.StorageCollection", - "Members": [ - { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/" - } - ], - "@odata.type": "#StorageCollection.StorageCollection", - "Members@odata.count": 1, - "@odata.etag": "W/\"9ff513824283b6bcb4aad5cf8ad510ab\"", - "Name": "StorageCollection", - "Description": "A Collection of Storage resource instances." -} \ No newline at end of file diff --git a/sampleOut/storage_drives.json b/sampleOut/storage_drives.json deleted file mode 100755 index 6a861bd..0000000 --- a/sampleOut/storage_drives.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "Drives": [ - { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Drives/Disk.0" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Drives/Disk.1" - } - ], - "Volumes": { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Volumes/" - }, - "Drives@odata.count": 2, - "Id": "RAID_Slot10", - "Status": { - "State": "Enabled", - "Health": "OK", - "HealthRollup": "OK" - }, - "Links": { - "Enclosures": [ - { - "@odata.id": "/redfish/v1/Chassis/1/" - } - ] - }, - "Name": "RAID Storage", - "@odata.context": "/redfish/v1/$metadata#Storage.Storage", - "Drives@odata.navigationLink": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Drives", - "StorageControllers@odata.count": 1, - "@odata.type": "#Storage.v1_2_0.Storage", - "StorageControllers@odata.navigationLink": "/redfish/v1/Systems/1/Storage/RAID_Slot10/StorageControllers", - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/", - "@odata.etag": "W/\"1f509c780761990768838f8414e57bce\"", - "StorageControllers": [ - { - "SerialNumber": "SP83707812", - "FirmwareVersion": "50.7.0-2054", - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/#/StorageControllers/0", - "Status": { - "State": "Enabled", - "Health": "OK" - }, - "Identifiers": [ - { - "DurableName": "0000000000000000500605B00E79A2A0", - "DurableNameFormat": "UUID" - } - ], - "@odata.type": "#Storage.v1_2_0.StorageController", - "PartNumber": "SR17A04503", - "Manufacturer": "Lenovo", - "Model": "SAS3408", - "Oem": { - "Lenovo": { - "Location": { - "InfoFormat": "Slot X", - "Info": "Slot 10" - } - } - } - } - ], - "Description": "This resource is used to represent a storage for a Redfish implementation." -} \ No newline at end of file diff --git a/sampleOut/storage_raid.json b/sampleOut/storage_raid.json deleted file mode 100755 index 6a861bd..0000000 --- a/sampleOut/storage_raid.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "Drives": [ - { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Drives/Disk.0" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Drives/Disk.1" - } - ], - "Volumes": { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Volumes/" - }, - "Drives@odata.count": 2, - "Id": "RAID_Slot10", - "Status": { - "State": "Enabled", - "Health": "OK", - "HealthRollup": "OK" - }, - "Links": { - "Enclosures": [ - { - "@odata.id": "/redfish/v1/Chassis/1/" - } - ] - }, - "Name": "RAID Storage", - "@odata.context": "/redfish/v1/$metadata#Storage.Storage", - "Drives@odata.navigationLink": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Drives", - "StorageControllers@odata.count": 1, - "@odata.type": "#Storage.v1_2_0.Storage", - "StorageControllers@odata.navigationLink": "/redfish/v1/Systems/1/Storage/RAID_Slot10/StorageControllers", - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/", - "@odata.etag": "W/\"1f509c780761990768838f8414e57bce\"", - "StorageControllers": [ - { - "SerialNumber": "SP83707812", - "FirmwareVersion": "50.7.0-2054", - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/#/StorageControllers/0", - "Status": { - "State": "Enabled", - "Health": "OK" - }, - "Identifiers": [ - { - "DurableName": "0000000000000000500605B00E79A2A0", - "DurableNameFormat": "UUID" - } - ], - "@odata.type": "#Storage.v1_2_0.StorageController", - "PartNumber": "SR17A04503", - "Manufacturer": "Lenovo", - "Model": "SAS3408", - "Oem": { - "Lenovo": { - "Location": { - "InfoFormat": "Slot X", - "Info": "Slot 10" - } - } - } - } - ], - "Description": "This resource is used to represent a storage for a Redfish implementation." -} \ No newline at end of file diff --git a/sampleOut/storage_raid_drive1.json b/sampleOut/storage_raid_drive1.json deleted file mode 100755 index 5532111..0000000 --- a/sampleOut/storage_raid_drive1.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "SerialNumber": "WFJ1MERK", - "Id": "Disk.0", - "Links": { - "Volumes": [ - { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Volumes/1" - } - ], - "Chassis": { - "@odata.id": "/redfish/v1/Chassis/1/" - } - }, - "@odata.context": "/redfish/v1/$metadata#Drive.Drive", - "CapableSpeedGbs": 12, - "PartNumber": "D7A01863", - "MediaType": "HDD", - "Description": "This resource is used to represent a drive for a Redfish implementation.", - "RotationSpeedRPM": 10500, - "Status": { - "State": "Enabled", - "Health": "OK" - }, - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Drives/Disk.0", - "FailurePredicted": false, - "BlockSizeBytes": 512, - "Name": "ST600MM0009", - "@odata.type": "#Drive.v1_2_0.Drive", - "Protocol": "SAS", - "Identifiers": [ - { - "DurableName": "", - "DurableNameFormat": "UUID" - } - ], - "CapacityBytes": 600127266816, - "Location": [ - { - "InfoFormat": "Slot Number", - "Info": "Slot 0" - } - ], - "Manufacturer": "LENOVO", - "@odata.etag": "W/\"9fa5cebe671080800d6cf9644fa39e13\"", - "Model": "", - "Revision": "L1B6" -} \ No newline at end of file diff --git a/sampleOut/storage_raid_volume_1.json b/sampleOut/storage_raid_volume_1.json deleted file mode 100755 index b9c26b8..0000000 --- a/sampleOut/storage_raid_volume_1.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "Id": "1", - "Status": { - "State": "Enabled", - "Health": "OK" - }, - "Links": { - "Drives": [ - { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Drives/Disk.0" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Drives/Disk.1" - } - ] - }, - "Name": "", - "@odata.context": "/redfish/v1/$metadata#Volume.Volume", - "CapacityBytes": 598999040000, - "@odata.type": "#Volume.v1_0_3.Volume", - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Volumes/1", - "@odata.etag": "W/\"74d483e168d2ac06484716bb2a643a3d\"", - "BlockSizeBytes": 512, - "Description": "This resource is used to represent a volume for a Redfish implementation." -} \ No newline at end of file diff --git a/sampleOut/storage_storagecontroller.json b/sampleOut/storage_storagecontroller.json deleted file mode 100755 index 6a861bd..0000000 --- a/sampleOut/storage_storagecontroller.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "Drives": [ - { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Drives/Disk.0" - }, - { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Drives/Disk.1" - } - ], - "Volumes": { - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Volumes/" - }, - "Drives@odata.count": 2, - "Id": "RAID_Slot10", - "Status": { - "State": "Enabled", - "Health": "OK", - "HealthRollup": "OK" - }, - "Links": { - "Enclosures": [ - { - "@odata.id": "/redfish/v1/Chassis/1/" - } - ] - }, - "Name": "RAID Storage", - "@odata.context": "/redfish/v1/$metadata#Storage.Storage", - "Drives@odata.navigationLink": "/redfish/v1/Systems/1/Storage/RAID_Slot10/Drives", - "StorageControllers@odata.count": 1, - "@odata.type": "#Storage.v1_2_0.Storage", - "StorageControllers@odata.navigationLink": "/redfish/v1/Systems/1/Storage/RAID_Slot10/StorageControllers", - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/", - "@odata.etag": "W/\"1f509c780761990768838f8414e57bce\"", - "StorageControllers": [ - { - "SerialNumber": "SP83707812", - "FirmwareVersion": "50.7.0-2054", - "@odata.id": "/redfish/v1/Systems/1/Storage/RAID_Slot10/#/StorageControllers/0", - "Status": { - "State": "Enabled", - "Health": "OK" - }, - "Identifiers": [ - { - "DurableName": "0000000000000000500605B00E79A2A0", - "DurableNameFormat": "UUID" - } - ], - "@odata.type": "#Storage.v1_2_0.StorageController", - "PartNumber": "SR17A04503", - "Manufacturer": "Lenovo", - "Model": "SAS3408", - "Oem": { - "Lenovo": { - "Location": { - "InfoFormat": "Slot X", - "Info": "Slot 10" - } - } - } - } - ], - "Description": "This resource is used to represent a storage for a Redfish implementation." -} \ No newline at end of file diff --git a/sampleOut/system.json b/sampleOut/system.json deleted file mode 100755 index 2b8ab1f..0000000 --- a/sampleOut/system.json +++ /dev/null @@ -1,240 +0,0 @@ -{ - "SerialNumber": "J300Z21M", - "Id": "1", - "IndicatorLED": "Off", - "PowerState": "On", - "ProcessorSummary": { - "Status": { - "State": "Enabled", - "Health": "OK", - "HealthRollup": "OK" - }, - "Count": 4, - "Model": "Intel(R) Xeon(R) Gold 6138 CPU @ 2.00GHz" - }, - "NetworkInterfaces": { - "@odata.id": "/redfish/v1/Systems/1/NetworkInterfaces/" - }, - "Storage": { - "@odata.id": "/redfish/v1/Systems/1/Storage/" - }, - "PartNumber": null, - "Bios": { - "@odata.id": "/redfish/v1/Systems/1/Bios/" - }, - "UUID": "f9753d74-6e44-11e9-81ba-0a94ef7a633b", - "Name": "ComputerSystem", - "Oem": { - "Lenovo": { - "ScheduledPowerActions": { - "@odata.id": "/redfish/v1/Systems/1/Oem/Lenovo/ScheduledPowerActions/" - }, - "FrontPanelUSB": { - "IDButton": "On", - "PortSwitchingTo": "Server", - "InactivityTimeoutMins": 5, - "FPMode": "Shared" - }, - "Metrics": { - "@odata.id": "/redfish/v1/Systems/1/Oem/Lenovo/Metrics/" - }, - "SystemStatus": "BootingOSOrInUndetectedOS", - "NumberOfReboots": 52, - "HistorySysPerf": { - "@odata.id": "/redfish/v1/Systems/1/Oem/Lenovo/HistorySysPerf" - }, - "BootSettings": { - "@odata.id": "/redfish/v1/Systems/1/Oem/Lenovo/BootSettings/" - }, - "TPMSettings": { - "EnableRPP": true, - "AssertRPP": false, - "AssertDurationMins": 30 - }, - "TotalPowerOnHours": 1492, - "Sensors": "/redfish/v1/Chassis/1/Oem/Lenovo/Sensors/" - } - }, - "@odata.type": "#ComputerSystem.v1_4_0.ComputerSystem", - "Manufacturer": "Lenovo", - "@odata.etag": "W/\"24110875f9b6f083f35ac1ed99ce590e\"", - "Actions": { - "#ComputerSystem.Reset": { - "target": "/redfish/v1/Systems/1/Actions/ComputerSystem.Reset", - "title": "Reset", - "ResetType@Redfish.AllowableValues": [ - "On", - "Nmi", - "GracefulShutdown", - "GracefulRestart", - "ForceOn", - "ForceOff", - "ForceRestart" - ] - }, - "Oem": { - "Lenovo": { - "#ComputerSystem.CustomizedReset": { - "target": "/redfish/v1/Systems/1/Actions/Oem/Lenovo/ComputerSystem.CustomizedReset", - "title": "CustomizedReset", - "ResetType@Redfish.AllowableValues": [ - "On" - ] - }, - "#ComputerSystem.BootToBIOSSetup": { - "target": "/redfish/v1/Systems/1/Actions/Oem/Lenovo/ComputerSystem.BootToBIOSSetup", - "title": "BootToBIOSSetup" - } - } - } - }, - "EthernetInterfaces": { - "@odata.id": "/redfish/v1/Systems/1/EthernetInterfaces/" - }, - "Boot": { - "BootSourceOverrideEnabled": "Disabled", - "BootSourceOverrideMode": "Legacy", - "BootSourceOverrideTarget": "None", - "BootSourceOverrideTarget@Redfish.AllowableValues": [ - "None", - "Pxe", - "Cd", - "Usb", - "Hdd", - "BiosSetup", - "Diags", - "UefiTarget" - ], - "UefiTargetBootSourceOverride": null - }, - "@odata.id": "/redfish/v1/Systems/1/", - "AssetTag": "", - "PCIeFunctions": [ - { - "@odata.id": "/redfish/v1/Systems/1/PCIeFunctions/ob_1.00" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeFunctions/slot_2.00" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeFunctions/slot_2.01" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeFunctions/slot_7.00" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeFunctions/slot_7.01" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeFunctions/slot_8.00" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeFunctions/slot_8.01" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeFunctions/slot_9.00" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeFunctions/slot_9.01" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeFunctions/slot_10.00" - } - ], - "SystemType": "Physical", - "BiosVersion": "TEE128P", - "HostName": "dc1-bm-esx-inb-prod05-console", - "MemorySummary": { - "Status": { - "State": "Enabled", - "Health": "OK", - "HealthRollup": "OK" - }, - "TotalSystemMemoryGiB": 3072 - }, - "Processors": { - "@odata.id": "/redfish/v1/Systems/1/Processors/" - }, - "PCIeFunctions@odata.count": 10, - "SecureBoot": { - "@odata.id": "/redfish/v1/Systems/1/SecureBoot" - }, - "PCIeDevices": [ - { - "@odata.id": "/redfish/v1/Systems/1/PCIeDevices/ob_1" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeDevices/slot_2" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeDevices/slot_7" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeDevices/slot_8" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeDevices/slot_9" - }, - { - "@odata.id": "/redfish/v1/Systems/1/PCIeDevices/slot_10" - } - ], - "Status": { - "State": "Enabled", - "Health": "OK", - "HealthRollup": "OK" - }, - "PCIeDevices@odata.navigationLink": "/redfish/v1/Systems/1/PCIeDevices", - "PCIeDevices@odata.count": 6, - "PCIeFunctions@odata.navigationLink": "/redfish/v1/Systems/1/PCIeFunctions", - "SKU": "7X19CTO1WW", - "@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem", - "LogServices": { - "@odata.id": "/redfish/v1/Systems/1/LogServices/" - }, - "Links": { - "Chassis": [ - { - "@odata.id": "/redfish/v1/Chassis/1/" - } - ], - "CooledBy": [ - { - "@odata.id": "/redfish/v1/Chassis/1/Thermal/#/Fans/0" - }, - { - "@odata.id": "/redfish/v1/Chassis/1/Thermal/#/Fans/1" - }, - { - "@odata.id": "/redfish/v1/Chassis/1/Thermal/#/Fans/2" - }, - { - "@odata.id": "/redfish/v1/Chassis/1/Thermal/#/Fans/3" - }, - { - "@odata.id": "/redfish/v1/Chassis/1/Thermal/#/Fans/4" - }, - { - "@odata.id": "/redfish/v1/Chassis/1/Thermal/#/Fans/5" - } - ], - "PoweredBy": [ - { - "@odata.id": "/redfish/v1/Chassis/1/Power/#/PowerSupplies/0" - }, - { - "@odata.id": "/redfish/v1/Chassis/1/Power/#/PowerSupplies/1" - } - ], - "ManagedBy": [ - { - "@odata.id": "/redfish/v1/Managers/1/" - } - ] - }, - "Description": "This resource is used to represent a computing system for a Redfish implementation.", - "Model": "ThinkSystem SR850", - "Memory": { - "@odata.id": "/redfish/v1/Systems/1/Memory/" - } -} \ No newline at end of file diff --git a/sampleOut/system_duplicated_devices.json b/sampleOut/system_duplicated_devices.json deleted file mode 100644 index a07fbae..0000000 --- a/sampleOut/system_duplicated_devices.json +++ /dev/null @@ -1,796 +0,0 @@ -{ - "@odata.context": "/redfish/v1/$metadata#ComputerSystem.ComputerSystem", - "@odata.id": "/redfish/v1/Systems/System.Embedded.1", - "@odata.type": "#ComputerSystem.v1_16_0.ComputerSystem", - "Actions": { - "#ComputerSystem.Reset": { - "target": "/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset", - "ResetType@Redfish.AllowableValues": [ - "On", - "ForceOff", - "ForceRestart", - "GracefulRestart", - "GracefulShutdown", - "PushPowerButton", - "Nmi", - "PowerCycle" - ] - } - }, - "AssetTag": "", - "Bios": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Bios" - }, - "BiosVersion": "2.8.4", - "Boot": { - "BootOptions": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/BootOptions" - }, - "Certificates": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Boot/Certificates" - }, - "BootOrder": [ - "Boot0004", - "Boot0002", - "Boot0000" - ], - "BootOrder@odata.count": 3, - "BootSourceOverrideEnabled": "Disabled", - "BootSourceOverrideMode": "UEFI", - "BootSourceOverrideTarget": "None", - "UefiTargetBootSourceOverride": null, - "BootSourceOverrideTarget@Redfish.AllowableValues": [ - "None", - "Pxe", - "Floppy", - "Cd", - "Hdd", - "BiosSetup", - "Utilities", - "UefiTarget", - "SDCard", - "UefiHttp" - ] - }, - "Description": "Computer System which represents a machine (physical or virtual) and the local resources such as memory, cpu and other devices that can be accessed from that machine.", - "EthernetInterfaces": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/EthernetInterfaces" - }, - "HostName": "", - "HostWatchdogTimer": { - "FunctionEnabled": false, - "Status": { - "State": "Disabled" - }, - "TimeoutAction": "None" - }, - "HostingRoles": [], - "HostingRoles@odata.count": 0, - "Id": "System.Embedded.1", - "IndicatorLED": "Lit", - "Links": { - "Chassis": [ - { - "@odata.id": "/redfish/v1/Chassis/System.Embedded.1" - } - ], - "Chassis@odata.count": 1, - "CooledBy": [ - { - "@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Thermal#/Fans/0" - }, - { - "@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Thermal#/Fans/1" - }, - { - "@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Thermal#/Fans/2" - }, - { - "@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Thermal#/Fans/3" - }, - { - "@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Thermal#/Fans/4" - }, - { - "@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Thermal#/Fans/5" - } - ], - "CooledBy@odata.count": 6, - "ManagedBy": [ - { - "@odata.id": "/redfish/v1/Managers/iDRAC.Embedded.1" - } - ], - "ManagedBy@odata.count": 1, - "Oem": { - "Dell": { - "@odata.type": "#DellOem.v1_2_0.DellOemLinks", - "BootOrder": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellBootSources" - }, - "DellBootSources": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellBootSources" - }, - "DellSoftwareInstallationService": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellSoftwareInstallationService" - }, - "DellVideoCollection": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellVideo" - }, - "DellChassisCollection": { - "@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Oem/Dell/DellChassis" - }, - "DellPresenceAndStatusSensorCollection": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellPresenceAndStatusSensors" - }, - "DellSensorCollection": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellSensors" - }, - "DellRollupStatusCollection": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellRollupStatus" - }, - "DellPSNumericSensorCollection": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellPSNumericSensors" - }, - "DellVideoNetworkCollection": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellVideoNetwork" - }, - "DellOSDeploymentService": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellOSDeploymentService" - }, - "DellMetricService": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellMetricService" - }, - "DellGPUSensorCollection": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellGPUSensors" - }, - "DellRaidService": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellRaidService" - }, - "DellNumericSensorCollection": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellNumericSensors" - }, - "DellBIOSService": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellBIOSService" - }, - "DellSlotCollection": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellSlots" - } - } - }, - "PoweredBy": [ - { - "@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Power#/PowerSupplies/0" - }, - { - "@odata.id": "/redfish/v1/Chassis/System.Embedded.1/Power#/PowerSupplies/1" - } - ], - "PoweredBy@odata.count": 2 - }, - "Manufacturer": "Dell Inc.", - "Memory": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Memory" - }, - "MemorySummary": { - "MemoryMirroring": "System", - "Status": { - "Health": "OK", - "HealthRollup": "OK", - "State": "Enabled" - }, - "TotalSystemMemoryGiB": 1024 - }, - "Model": "PowerEdge R7525", - "Name": "System", - "NetworkInterfaces": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/NetworkInterfaces" - }, - "Oem": { - "Dell": { - "@odata.type": "#DellOem.v1_2_0.DellOemResources", - "DellSystem": { - "BIOSReleaseDate": "06/23/2022", - "BaseBoardChassisSlot": "NA", - "BatteryRollupStatus": "OK", - "BladeGeometry": "NotApplicable", - "CMCIP": null, - "CPURollupStatus": "OK", - "ChassisModel": "", - "ChassisName": "Main System Chassis", - "ChassisServiceTag": "7J4545JT3", - "ChassisSystemHeightUnit": 2, - "CurrentRollupStatus": "OK", - "EstimatedExhaustTemperatureCelsius": 255, - "EstimatedSystemAirflowCFM": 255, - "ExpressServiceCode": "16345690727", - "FanRollupStatus": "OK", - "Id": "System.Embedded.1", - "IDSDMRollupStatus": null, - "IntrusionRollupStatus": "OK", - "IsOEMBranded": "False", - "LastSystemInventoryTime": "2024-01-17T12:45:34+00:00", - "LastUpdateTime": "2023-01-24T10:02:15+00:00", - "LicensingRollupStatus": "OK", - "ManagedSystemSize": "2 U", - "MaxCPUSockets": 2, - "MaxDIMMSlots": 32, - "MaxPCIeSlots": 8, - "MemoryOperationMode": "OptimizerMode", - "Name": "DellSystem", - "NodeID": "89D67TYT3", - "PSRollupStatus": "OK", - "PlatformGUID": "33544a4f-tryt-2222-1111-22344c4c4544", - "PopulatedDIMMSlots": 16, - "PopulatedPCIeSlots": 4, - "PowerCapEnabledState": "Disabled", - "SDCardRollupStatus": null, - "SELRollupStatus": "OK", - "ServerAllocationWatts": null, - "StorageRollupStatus": "OK", - "SysMemErrorMethodology": "Multi-bitECC", - "SysMemFailOverState": "NotInUse", - "SysMemLocation": "SystemBoardOrMotherboard", - "SysMemPrimaryStatus": "OK", - "SystemGeneration": "15G Monolithic", - "SystemID": 2303, - "SystemRevision": "I", - "TempRollupStatus": "OK", - "TempStatisticsRollupStatus": "OK", - "UUID": "1c3c6564-4450a-6720-9745-f46y4f4a5672", - "VoltRollupStatus": "OK", - "smbiosGUID": "445564c4c-410a-6635-9075-b7c84f4a2533", - "@odata.context": "/redfish/v1/$metadata#DellSystem.DellSystem", - "@odata.type": "#DellSystem.v1_3_0.DellSystem", - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellSystem/System.Embedded.1" - } - } - }, - "PCIeDevices": [ - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/129-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/129-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-4" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-2" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-3" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-3" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-2" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-4" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-3" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-2" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-4" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-3" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-2" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-4" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/161-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-3" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/225-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-2" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-4" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/35-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-3" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-2" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-4" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/65-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/65-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/1-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/98-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-4" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/195-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-2" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/225-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-3" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/3-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-8" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-20" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-3" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-7" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-20" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-2" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-4" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/33-0" - } - ], - "PCIeDevices@odata.count": 83, - "PCIeFunctions": [ - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/129-0/PCIeFunctions/129-0-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/129-0/PCIeFunctions/129-0-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-7/PCIeFunctions/128-7-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-4/PCIeFunctions/128-4-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-8/PCIeFunctions/128-8-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-7/PCIeFunctions/128-7-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-2/PCIeFunctions/128-2-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-8/PCIeFunctions/128-8-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-1/PCIeFunctions/128-1-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-3/PCIeFunctions/128-3-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/128-0/PCIeFunctions/128-0-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-8/PCIeFunctions/160-8-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-7/PCIeFunctions/160-7-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-7/PCIeFunctions/160-7-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-3/PCIeFunctions/160-3-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-8/PCIeFunctions/160-8-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-2/PCIeFunctions/160-2-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-4/PCIeFunctions/160-4-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/160-1/PCIeFunctions/160-1-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-8/PCIeFunctions/192-8-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-7/PCIeFunctions/192-7-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-7/PCIeFunctions/192-7-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-3/PCIeFunctions/192-3-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-8/PCIeFunctions/192-8-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-2/PCIeFunctions/192-2-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-4/PCIeFunctions/192-4-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-1/PCIeFunctions/192-1-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-8/PCIeFunctions/32-8-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-7/PCIeFunctions/32-7-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-7/PCIeFunctions/32-7-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-3/PCIeFunctions/32-3-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-8/PCIeFunctions/32-8-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-2/PCIeFunctions/32-2-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-4/PCIeFunctions/32-4-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/32-1/PCIeFunctions/32-1-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/161-0/PCIeFunctions/161-0-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-8/PCIeFunctions/64-8-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-7/PCIeFunctions/64-7-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-7/PCIeFunctions/64-7-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-3/PCIeFunctions/64-3-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/225-0/PCIeFunctions/225-0-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-8/PCIeFunctions/64-8-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-2/PCIeFunctions/64-2-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-4/PCIeFunctions/64-4-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/35-0/PCIeFunctions/35-0-3" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/64-1/PCIeFunctions/64-1-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-8/PCIeFunctions/224-8-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-7/PCIeFunctions/224-7-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-7/PCIeFunctions/224-7-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-3/PCIeFunctions/224-3-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-8/PCIeFunctions/224-8-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-2/PCIeFunctions/224-2-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-4/PCIeFunctions/224-4-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/224-1/PCIeFunctions/224-1-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/65-0/PCIeFunctions/65-0-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/65-0/PCIeFunctions/65-0-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/1-0/PCIeFunctions/1-0-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-7/PCIeFunctions/96-7-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/98-0/PCIeFunctions/98-0-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/192-8/PCIeFunctions/192-8-3" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-4/PCIeFunctions/96-4-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-8/PCIeFunctions/96-8-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-7/PCIeFunctions/96-7-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/195-0/PCIeFunctions/195-0-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-2/PCIeFunctions/96-2-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/225-0/PCIeFunctions/225-0-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-8/PCIeFunctions/96-8-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-1/PCIeFunctions/96-1-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-3/PCIeFunctions/96-3-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/3-0/PCIeFunctions/3-0-3" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/96-0/PCIeFunctions/96-0-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-8/PCIeFunctions/0-8-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-7/PCIeFunctions/0-7-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-8/PCIeFunctions/0-8-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-1/PCIeFunctions/0-1-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-20/PCIeFunctions/0-20-3" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-3/PCIeFunctions/0-3-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-7/PCIeFunctions/0-7-1" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-20/PCIeFunctions/0-20-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-2/PCIeFunctions/0-2-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-4/PCIeFunctions/0-4-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/0-1/PCIeFunctions/0-1-0" - }, - { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/PCIeDevices/33-0/PCIeFunctions/33-0-0" - } - ], - "PCIeFunctions@odata.count": 83, - "PartNumber": "0T4236A02", - "PowerState": "On", - "ProcessorSummary": { - "Count": 2, - "LogicalProcessorCount": 256, - "Model": "AMD EPYC 7713 64-Core Processor", - "Status": { - "Health": "OK", - "HealthRollup": "OK", - "State": "Enabled" - } - }, - "Processors": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Processors" - }, - "SKU": "7J7834T3", - "SecureBoot": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/SecureBoot" - }, - "SerialNumber": "CNIV232726780351", - "SimpleStorage": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/SimpleStorage" - }, - "Status": { - "Health": "OK", - "HealthRollup": "OK", - "State": "Enabled" - }, - "Storage": { - "@odata.id": "/redfish/v1/Systems/System.Embedded.1/Storage" - }, - "SystemType": "Physical", - "TrustedModules": [ - { - "FirmwareVersion": "7.2.2.0", - "InterfaceType": "TPM2_0", - "Status": { - "State": "Enabled" - } - } - ], - "TrustedModules@odata.count": 1, - "UUID": "4c4c4544-004a-3510-8035-b7c04f4a5433" -} diff --git a/scripts/build_rpm.sh b/scripts/build_rpm.sh deleted file mode 100755 index b159b99..0000000 --- a/scripts/build_rpm.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -x - -export TOP_DIR=$(mktemp -d) -mkdir ${TOP_DIR}/{BUILD,RPMS,SOURCES,SPECS,SRPMS} -SCRIPTPATH=$(dirname "$0") -cp ${SCRIPTPATH}/../build/redfish_exporter ${TOP_DIR}/SOURCES -cp ${SCRIPTPATH}/redfish_exporter.service ${TOP_DIR}/SOURCES -cp ${SCRIPTPATH}/redfish_exporter.yml ${TOP_DIR}/SOURCES -cp ${SCRIPTPATH}/redfish_exporter.spec ${TOP_DIR}/SPECS -newVersion=$(cat $SCRIPTPATH/../VERSION) -sed -i "s/VERSION/$newVersion/g" ${TOP_DIR}/SPECS/redfish_exporter.spec -rpmbuild --define "_topdir ${TOP_DIR}" -bb ${TOP_DIR}/SPECS/redfish_exporter.spec -cp -f ${TOP_DIR}/RPMS/x86_64/redfish_exporter*.rpm ${SCRIPTPATH}/../build - -rm -rf ${TOP_DIR} \ No newline at end of file diff --git a/scripts/redfish_exporter.service b/scripts/redfish_exporter.service deleted file mode 100755 index e1392a4..0000000 --- a/scripts/redfish_exporter.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=redfish exporter service - -[Service] -ExecStart=/usr/bin/redfish_exporter --config.file=/etc/prometheus/redfish_exporter.yml -Restart=always -RestartSec=2s -StartLimitInterval=0 -KillMode=process -[Install] -WantedBy=multi-user.target diff --git a/scripts/redfish_exporter.spec b/scripts/redfish_exporter.spec deleted file mode 100755 index 2870555..0000000 --- a/scripts/redfish_exporter.spec +++ /dev/null @@ -1,81 +0,0 @@ -%define debug_package %{nil} - -# distribution specific definitions -%if 0%{?sle_version} -%define dist .sle%{sle_version} -%endif - -Name: redfish_exporter -Version: VERSION -Release: 1%{?dist} -Summary: Prometheus redfish exporter. -License: MIT -URL: https://github.com/jenningsloy318/redfish_exporter - -Source0: %{name} -Source1: %{name}.service -Source2: %{name}.yml - - - - -%if 0%{?rhel} -Requires(pre): shadow-utils -%endif - -%if 0%{?sle_version} -Requires(pre): shadow -%endif - -%description - -This is an exporter that exposes information gathered from redfish database for use by the Prometheus monitoring system. - -%prep -%build -/bin/true - -%install -mkdir -vp %{buildroot}%{_sharedstatedir}/prometheus -mkdir -vp %{buildroot}%{_sysconfdir}/prometheus -install -D -m 755 %{SOURCE0} %{buildroot}%{_bindir}/%{name} -install -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service -install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/prometheus - -%pre -getent group prometheus >/dev/null || groupadd -r prometheus -getent passwd prometheus >/dev/null || \ - useradd -r -g prometheus -d %{_sharedstatedir}/prometheus -s /sbin/nologin \ - -c "Prometheus services" prometheus -exit 0 - -%post -if ! getent group prometheus >/dev/null ; then - groupadd -r prometheus -fi - -if ! getent passwd prometheus >/dev/null ; then - useradd -r -M -s /bin/false -d /etc/prometheus -g prometheus prometheus -fi - -chown -R prometheus:prometheus /etc/prometheus -systemctl daemon-reload || true -systemctl enable redfish_exporter || true -systemctl start redfish_exporter -exit 0 - - -%preun -%systemd_preun %{name}.service - -%postun -%systemd_postun %{name}.service -userdel prometheus || true -groupdel prometheus || true - -%files -%defattr(-,root,root,-) -%{_bindir}/%{name} -%{_unitdir}/%{name}.service -%config(noreplace) %{_sysconfdir}/prometheus/redfish_exporter.yml -%dir %attr(755, prometheus, prometheus)%{_sharedstatedir}/prometheus diff --git a/scripts/redfish_exporter.yml b/scripts/redfish_exporter.yml deleted file mode 100755 index cbceced..0000000 --- a/scripts/redfish_exporter.yml +++ /dev/null @@ -1,4 +0,0 @@ -hosts: - 10.36.48.24: - username: admin - password: pass \ No newline at end of file