-
Notifications
You must be signed in to change notification settings - Fork 2
Support scraping multiple controllers. #27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,21 +4,23 @@ Prometheus exporter for Areca RAID cards. Exporter depends on Areca CLI being pr | |
|
|
||
| ## Features | ||
|
|
||
| - Provides metrics for the Areca RAID card to be scraped by Prometheus. | ||
| - Provides metrics for the Areca RAID cards to be scraped by Prometheus. | ||
| - Supports the following metrics: | ||
| - `areca_up`: '0' if a scrape of the Areca CLI was successful, '1' otherwise. | ||
| - `areca_sys_info`: Constant metric with a value of 1 labeled with information about the Areca controller. | ||
| - `areca_sys_info`: Constant metric with a value of 1 labeled with information about Areca controllers. | ||
| - `areca_raid_set_state`: Areca RAID set state, where 0 represents normal and 1 represents degraded. | ||
| - `areca_disk_info`: Constant metric with value 1 labeled with info about all physical disks attached to the Areca controller. | ||
| - `areca_disk_info`: Constant metric with value 1 labeled with info about all physical disks attached to Areca controllers. | ||
| - `areca_disk_state`: Areca controller metric for disk state, 0 for normal, 1 for error | ||
| - `areca_disk_media_errors`: Metric for media errors of all physical disks attached to the Areca controller. | ||
| - `areca_disk_media_errors`: Metric for media errors of all physical disks attached to Areca controllers. | ||
| - Supports systems with multiple controllers. | ||
|
|
||
| ## Config options | ||
|
|
||
| | Option | Description | Default | | ||
| | -------------------- | --------------------------- | ------------- | | ||
| | `--collect-interval` | How often to poll Areca CLI | `5s` | | ||
| | `--cli-path` | Path to Areca CLI binary | `areca.cli64` | | ||
| | Option | Description | Default | | ||
| | -------------------- | --------------------------------- | ------------- | | ||
| | `--collect-interval` | How often to poll each controller | `5s` | | ||
| | `--cli-path` | Path to Areca CLI binary | `areca.cli64` | | ||
| | `--controllers` | How many controllers to scrape | `1` | | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe a little bit out of scope, but would it be possible to auto-detect the number of controllers? For example, by "trying" different n = 1, 2, 3, ... etc in
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure if you saw the pr description covering that? I initially implemented exactly what you suggest but I felt it was fragile for the reasons given there. I then considered the current behavior of the exporter: It is run under the implicit assumption that there is a controller at index 1, and report errors if failures are encountered (i.e., it doesn't auto-discover there are no controllers and report success, doing nothing). So, making that intent explicit and supporting more than 1, reporting on failures for controllers which aren't actually found (rather than ignoring a difference between intent and actual), seemed to both avoid that fragility and match the current spirit well. I understand it's slightly less functional, but I felt it was a good tradeoff. |
||
|
|
||
| ## Prerequisites | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Maybe we could emphasize that the exporter supports systems with multiple controllers as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done