Skip to content

Commit

Permalink
add new test cases for Exporter creation and Drive metrics, reworked … (
Browse files Browse the repository at this point in the history
#37)

* add new test cases for Exporter creation and Drive metrics, reworked logic for NewExporter() function

* fix bug with drive status json unmarshalling, add test coverage flag

* fix ilo 4 drives scrapes

* fix modules that need lowercase links json unmarshalling
  • Loading branch information
derrick-dacosta authored Mar 12, 2024
1 parent 3f9cc56 commit 0727f85
Show file tree
Hide file tree
Showing 41 changed files with 4,348 additions and 712 deletions.
39 changes: 37 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,21 @@ log is based on the [Keep a CHANGELOG](http://keepachangelog.com/) project.
## Unreleased

## Added
- Add ability to reference different vault paths for credential retrieval [#25](https://github.com/Comcast/fishymetrics/issues/25)

- Add ability to reference different vault paths for credential retrieval [#25](https://github.com/Comcast/fishymetrics/issues/25)
- Added HPE DL380 Gen10 support [#17](https://github.com/Comcast/fishymetrics/issues/17)
- Enhanced drive metrics collection for DL380 model servers to include NVME, Storage Disk Drives, and Logical Drives [#17](https://github.com/Comcast/fishymetrics/issues/17)
- Add ability to send logs directly to elasticsearch endpoints [#10](https://github.com/Comcast/fishymetrics/issues/10)
- Add HPE Proliant DL560 Gen9 support [#23](https://github.com/Comcast/fishymetrics/issues/23)
- Add HPE Proliant XL420 Support [#33](https://github.com/Comcast/fishymetrics/issues/33)

## Fixed

- Cisco UCS C220 - add additional edge cases when collecting memory metrics [#2](https://github.com/Comcast/fishymetrics/issues/2)
- null pointer derefence errors when using incorrect credentials [#36](https://github.com/Comcast/fishymetrics/issues/36)

## Updated

- Enhanced drive metrics collection for HPE DL360 model servers to include NVME, Storage Disk Drives, and Logical Drives. [#31](https://github.com/Comcast/fishymetrics/issues/31)
- Removed references to internal URLs/FQDNs to opensource the project
- Cisco S3260M5 module to support FW Ver 4.2(xx) [#18](https://github.com/Comcast/fishymetrics/issues/18)
Expand All @@ -26,33 +30,41 @@ log is based on the [Keep a CHANGELOG](http://keepachangelog.com/) project.
## [0.7.1]

## Added

- added a mux prometheus middleware to collect and export metrics for every http request

## Fixed

- fix route issue from the /ignored html template

## [0.7.0]

## Fixed

- fixed Horizontal Pod Autoscaling k8s resource in helm chart

## Updated

- move buildinfo package to inside the fishymetrics repo
- update all go dependencies in project to remove any potential security bugs

## [0.6.16]

## Added

- add Horizontal Pod Autoscaling capabilities
- add ability to customize container resource limits/requests

## Fixed

- route prefix for metrics and info API paths

## Removed

- remove route prefix configuration

## Updated

- rename app container port name to exporter from metrics
- improve README documentation
- Add build info to the root home page
Expand All @@ -61,112 +73,135 @@ log is based on the [Keep a CHANGELOG](http://keepachangelog.com/) project.
## [0.6.15]

## Changed

- Modified vector config in the helm chart to fix structured json log messages to elastic

## [0.6.14]

## Added

- added trace_id to all logging messages

## Changed

- fixed for loop logic for a targets scrape
- updated vector config to include a json remap transform

## [0.6.13]

## Added

- added ability to forward logs to an elastic cluster using vector

## Changed

- changed logging from oyez to zap package

## [0.6.12]

## Added

- add BIOS version to device_info metric
- add more labels to cisco device metrics to help with RMA automation

## Changed

- incease scrape timeout to 90 seconds for c220 devices
- update helm chart to reflect updated env vars

## Fixed

- fix CI bug with Dockerfile
- add DISABLED state for power and drive metric scrapes
- add DISABLED state for memory and processor metric scrapes

## [0.6.3]

## Added

- Added metrics for C220 storage/raid controllers and drives when applicable

## [0.6.2]

## Changed
- Change *url* label to be *name* and use the url path base for *name* label value

- Change _url_ label to be _name_ and use the url path base for _name_ label value

## [0.6.1]

## Added

- Added storage controller status metric for all cisco modules
- Added overall temperature status metric for all cisco modules

## Fixed

- Fix s3260m4 exporter module scrape endpoints
- Fix retry logic for certain cisco redfish API calls

## [0.6.0]

## Added

- Add vault integration for chassis credentials
- Add graceful shutdown of newly added go routines

## [0.5.1]

## Changed

- Temporarily removed drive scrapes from Cisco devices until we figure out the best plan forward

## [0.5.0]

## Added

- Create new prometheus exporters for Cisco UCS C220, S3260 M4, and S3260 M5 devices

## [0.4.1]

## Added

- Added support for DL20 devices

## Fixed

- Fix nil pointer reference for when module name in scrape request does not exist

## [0.4.0]

## Added

- Add support for scrapes to HP DL360s w/ iLO 5

## [0.3.1]

## Fixed

- Metrics are not reseting the way it used to
- Web UI not routing correctly when app is behind nginx-ingress

## [0.3.0]

## Changed

- Centralize fishymetrics exporter to handle more than 1 scrape endpoints

## [0.2.0]

## Added

- Add moonshot switch metrics collection for status, thermal, and power

## [0.1.1]

## Added

- Created Helm chart for deployment
- Add limiter and route-prefix flags/env variables

## [0.1.0]

## Added

- Initial commit of fishymetrics exporter
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ docker:
.

test:
go test -v -p 1 -race ${FLAGS} ${TEST_PKGS}
go test -v -cover -p 1 -race ${FLAGS} ${TEST_PKGS}

clean:
rm -rf build/
Expand Down
8 changes: 2 additions & 6 deletions cisco/c220/drive_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 Comcast Cable Communications Management, LLC
* Copyright 2024 Comcast Cable Communications Management, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -116,11 +116,7 @@ func Test_C220_Drive_Metrics(t *testing.T) {
host: "fishymetrics.com",
biosVersion: "C220M5.4.0.4i.0.zzzzzzzzz",
chassisSerialNumber: "SN78901",
up: prometheus.NewGauge(prometheus.GaugeOpts{
Name: "up",
Help: "Was the last scrape of chassis monitor successful.",
}),
deviceMetrics: metrx,
deviceMetrics: metrx,
}

prometheus.MustRegister(exporter)
Expand Down
Loading

0 comments on commit 0727f85

Please sign in to comment.