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

Ping Result not reported properly #5665

Closed
carryel opened this issue Feb 7, 2024 · 3 comments
Closed

Ping Result not reported properly #5665

carryel opened this issue Feb 7, 2024 · 3 comments
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team QA Bug created between releases. So, no CHANGELOG entry required resolved A fixed issue

Comments

@carryel
Copy link
Contributor

carryel commented Feb 7, 2024

Describe the bug

cacti version is develop branch.

Ping Result was always "ICMP ping Timed out" even though the server was alive.

When debugging this issue, the parsing of the results appeared to be incorrect.

  • PHP_OS was "Linux".
  • ping command was "fping -q -t 400 -c 1 -r 1 my.host.com".
  • Result was "my.host.com : xmt/rcv/%loss = 1/1/0%, min/avg/max = 0.258/0.258/0.258".

It seems to be a side-effect of 011ae4c#diff-22abb1862abff566f5588ec6a9666d11553d088d2bb54a280a7b21b2ca36b499R225 .

I think the "if statement" should be reversed like this:

if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') {

https://github.com/Cacti/cacti/blob/develop/lib/ping.php#L225

To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'

  2. Click on '....'

  3. Scroll down to '....'

  4. See error

Expected behavior

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

Screenshots

Screenshot 2024-02-07 at 3 08 38 PM Screenshot 2024-02-07 at 3 08 50 PM

Desktop (please complete the following information)

  • OS: CentOS7

Additional context

Add any other context about the problem here.

@carryel carryel added bug Undesired behaviour unverified Some days we don't have a clue labels Feb 7, 2024
carryel added a commit to carryel/cacti that referenced this issue Feb 7, 2024
@dallenk
Copy link
Contributor

dallenk commented Feb 7, 2024

Also experiancing the same results with commits after 011ae4c

Advanced ping template stops graphing all hosts.. git reset --hard 4563aaa resolves it for me.

@arno-st
Copy link
Contributor

arno-st commented Feb 9, 2024

Same here, but didn't do the troubleshooting.
Except that the ping is OK for spine, and in CLI, but on the dipslay it said ping timeout.
I'm using icmp ping and SNMP uptime to get the status and the device is UP as it should be, with the ping timeout error.
Cacti dev branch,
On almalinux

TheWitness added a commit that referenced this issue Feb 18, 2024
* Fixed "installer - Undefined array key "name" warning in php8"
- #5662

* Fixed "ping - Ping Result not reported properly".
- #5665

* Update functions.php

* Update ping.php

Minor updates for Windows

---------

Co-authored-by: TheWitness <thewitness@cacti.net>
TheWitness added a commit that referenced this issue Feb 18, 2024
Ping Result not reported properly
@TheWitness
Copy link
Member

Okay, fixed this. No changelog as this was between releases. Thanks for reporting all!

@TheWitness TheWitness added resolved A fixed issue confirmed Bug is confirm by dev team QA Bug created between releases. So, no CHANGELOG entry required and removed unverified Some days we don't have a clue labels Feb 18, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Undesired behaviour confirmed Bug is confirm by dev team QA Bug created between releases. So, no CHANGELOG entry required resolved A fixed issue
Projects
None yet
Development

No branches or pull requests

4 participants