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

[check_snmp] Feature request : multiply, or divide values #349

Open
BenoitPoulet opened this issue Dec 12, 2017 · 5 comments
Open

[check_snmp] Feature request : multiply, or divide values #349

BenoitPoulet opened this issue Dec 12, 2017 · 5 comments

Comments

@BenoitPoulet
Copy link

Hello,
I have a bunch of devices who send temperatures results in integer :

SNMP OK - temperature 207 d°C | temperature=207d°C;260;280;

So it would be great if it was possible to multiply, or divide values

Regards.

@box293
Copy link
Contributor

box293 commented Jun 27, 2018

I saw this was added as a commit / pull request some time ago but now it's no longer there, I'll chase up the person who added it as there's no point re-inventing the wheel.

@BenoitPoulet
Copy link
Author

Hello,

Any chance for this enhancement ?

@sawolf
Copy link
Member

sawolf commented Feb 18, 2020

Hi,

I'm not sure what commit or PR @box293 is talking about, but the repository is open to pull requests. If someone wants to submit a change I can pull that in for the next feature release.

edit: Troy told me where the commit was from. We'll see if he's in a helping mood.

@scottchiefbaker
Copy link
Contributor

I came here looking to request this feature as well. I have two different types of PDUs. One type reports amperage in 1/10ths of an AMP, and the other uses 1/100ths of an amp.

For the purposes of reporting it in the Nagios UI I'd like it to be in amps. A multiplication factor would solve this problem.

@scottchiefbaker
Copy link
Contributor

Looking at the check_snmp.c code, it wasn't as gnarly as I thought it'd be. I submitted a PR that solves my above use case. If someone else could test for me that would be great.

Just add a --multiplier 0.1 or whatever is appropriate for your environment.

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

No branches or pull requests

4 participants