Skip to content

Commit

Permalink
fix(blackbox-exporter): Iterate over every endpoints instead of using…
Browse files Browse the repository at this point in the history
… first element
  • Loading branch information
BapRx committed Dec 1, 2022
1 parent 1c881a4 commit 616e6d7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to this project will be documented in this file.

## [0.5.0] - 2022-11-24
## [0.5.1] - 2022-11-24

### Documentation

Expand Down
2 changes: 1 addition & 1 deletion alert_exporter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

__author__ = """Baptiste ROUX"""
__email__ = "[email protected]"
__version__ = "0.5.0"
__version__ = "0.5.1"
2 changes: 1 addition & 1 deletion alert_exporter/sources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

__author__ = """Baptiste ROUX"""
__email__ = "[email protected]"
__version__ = "0.5.0"
__version__ = "0.5.1"
4 changes: 3 additions & 1 deletion alert_exporter/sources/kubernetes.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,6 @@ def get_blackbox_exporter_targets(self) -> None:
logging.info(
f'Blackbox-exporter service monitor Rule - {sm["metadata"]["name"]}'
)
self.targets.append(sm["spec"]["endpoints"][0]["params"]["target"][0])
self.targets += [
ep["params"]["target"][0] for ep in sm["spec"]["endpoints"]
]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "alert_exporter"
version = "0.5.0"
version = "0.5.1"
keywords = ["alert_exporter", "alert", "monitoring", "prometheus", "cloudwatch"]
authors = [{ name = "Baptiste ROUX", email = "[email protected]" }]
description = "Extract alerts configured in different sources (eg: Prometheus Rules, CloudWatch Alarms, Pingdom)"
Expand Down

0 comments on commit 616e6d7

Please sign in to comment.