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

Padding is not always removed from the start of non-numeric strings #308

Closed
kimarenchi opened this issue Jul 25, 2023 · 2 comments
Closed

Comments

@kimarenchi
Copy link

Describe the bug
A clear and concise description of what the bug is.
SPINE 1.2.24 unable to automatically remove alpha characters on SNMP values with the combination of alpha numeric characters

For example:

SNMP get results to value of ">5.00"
Spine does not remove the ">" instead resulting to -nan.

This works after using cmd.php instead

Expected behavior
A clear and concise description of what you expected to happen.

Expected result is that spine should be able to log the value of "5.00" instead of non.

Screenshots
If applicable, add screenshots to help explain your problem.

Server (please complete the following information):

  • OS: CentOs8
  • Version : Kernel 4.18.0-395.3.1el8.x86_64

Compiling (please complete the following information):

  • compiler: gcc 8.5.0-17.el8
  • autoconf: autoconf 2.69-29.el8
  • glibc: 2.28-220
  • source: Cacti

Note: you can find glibc version by running ldd --version

Note: if source is github, please include last commit reference

Additional context
Add any other context about the problem here including logs and command line output

@TheWitness
Copy link
Member

I just checked the code and guess what, it was never supported in spine. I think it's an easy fix though.

@TheWitness TheWitness changed the title SPINE 1.2.24 - problems with SNMP values with Alpanumeric characters Function strip_alpha() does not strip non-numeric leading characters Jul 29, 2023
TheWitness added a commit that referenced this issue Jul 29, 2023
- Function strip_alpha() does not strip non-numeric leading characters
- GitHub merge created an issue with switch syntax.
TheWitness added a commit that referenced this issue Jul 29, 2023
The plus sign is redundant
@TheWitness TheWitness added this to the v1.2.25 milestone Jul 29, 2023
@TheWitness
Copy link
Member

This is resolved now in spine.

@netniV netniV changed the title Function strip_alpha() does not strip non-numeric leading characters Padding is not always removed from the start of non-numeric strings Sep 4, 2023
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

2 participants