Skip to content
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

Add schleifenbauer PDU #1217

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add schleifenbauer PDU #1217

wants to merge 3 commits into from

Conversation

Wqrld
Copy link

@Wqrld Wqrld commented Jul 17, 2024

This patch adds support for Power Distribution Units from https://www.schleifenbauer.eu

I was able to successfully read out my PDU's into grafana. I hope this may be useful for others too.

Note:
This query takes about one minute to run on my device, running into timeouts. Adding

    scrape_interval: 3m
    scrape_timeout: 2m

fixes this. I think this is an issue with many SNMP devices, so it might be an idea to add statements like these (with lower limits) to the readme example.

@bastischubert
Copy link
Collaborator

Hi @Wqrld,

could you please provide the updated generator/generator.yml and add the needed mib files for this to work to the Makefile?

@Wqrld
Copy link
Author

Wqrld commented Jul 17, 2024

The generator was also failing locally before adding my patch because of 404's, i had to rip those out of the makefile to generate this configuration.

@Wqrld
Copy link
Author

Wqrld commented Jul 17, 2024

Hi @Wqrld,

could you please provide the updated generator/generator.yml and add the needed mib files for this to work to the Makefile?

I do not have the rights to those original mib files so i'm not sure if i'm allowed to add them. They were taken from https://docs.schleifenbauer.eu/?dir=Interfaces/SNMP
If this is a hard requirement i'll send them an email for explicit permission

@bastischubert
Copy link
Collaborator

Shouldn't be an issue to curl their public available mib files in the generator/Makefile

$(eval TMP := $(shell mktemp))
@echo ">> Downloading schleifenbauer to $(TMP)"
@curl $(CURL_OPTS) -o $(TMP) $(SCHLEIFENBAUER_URL)
@unzip -j -d $(MIBDIR) $(TMP) SCHLEIFENBAUER-PRODUCTS-MIB.txt SCHLEIFENBAUER-DATABUS-MIB.txt SCHLEIFENBAUER-SMI.txt
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SCHLEIFENBAUER-PRODUCTS-MIB.txt seems not to be included in this zipfile, only in the older https://docs.schleifenbauer.eu/Interfaces/SNMP/PDU_mib_244.zip. If the file is necessary we'd need to get it from the 2nd zipfile.

# https://docs.schleifenbauer.eu/?dir=Interfaces/SNMP
schleifenbauer:
walk:
- 1.3.6.1.4.1.31034.12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This OID is overly broad. I think we want to be more targeted here with which walks to include. Some of the metrics included by this are read-write settings OIDs that have no meaning as metrics.

Let's start with the most useful part, the device table.

Suggested change
- 1.3.6.1.4.1.31034.12
- sdbMgmtCtrlDevicesTable

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think almost everything in 1.3.6.1.4.1.31034.12.1.1.2 would be of use, which is basically the whole generated list. There are a few you could leave out, but for my usecase more is better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants