Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Apr 25, 2019 6:59 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Doubt on ping function
PostPosted: Mon Oct 09, 2017 9:35 am 
Offline
Cacti User

Joined: Wed Dec 07, 2011 9:19 am
Posts: 322
Hello,
I try to monitor some AP (WiFi Access Point) on my network, but even if I can ping it from the cli, Cacti is always telling me it's down!
If i do a debug I got:
2017-10-09 16:29:18 - SPINE: Poller[1] DEBUG: The Value of Active Threads is 0 for Device ID 1123
2017-10-09 16:29:18 - SPINE: Poller[1] Device[wa-se46-tst-1850] TH[1] DEBUG: HOST COMPLETE: About to Exit Device Polling Thread Function
2017-10-09 16:29:18 - SPINE: Poller[1] Device[wa-se46-tst-1850] TH[1] Total Time: 0.41 Seconds
2017-10-09 16:29:18 - SPINE: Poller[1] Device[wa-se46-tst-1850] DEBUG: UDP Timeout, Try Count:2, Time:402.0791 ms
2017-10-09 16:29:18 - SPINE: Poller[1] Device[wa-se46-tst-1850] DEBUG: UDP Timeout, Try Count:1, Time:400.8000 ms
2017-10-09 16:29:18 - SPINE: Poller[1] Device[wa-se46-tst-1850] DEBUG: Entering UDP Ping
2017-10-09 16:29:18 - SPINE: Poller[1] Device[wa-se46-tst-1850] DEBUG Falling back to UDP Ping Due to SetUID Issues
2017-10-09 16:29:18 - SPINE: Poller[1] DEBUG: In Poller, About to Start Polling of Device for Device ID 1123

On my setting for the Availability/Reachability Options I use only ping and ICMP type; why the log is showing me UDP
And on the top when I'm looking on the device is see:
Ping Results
ICMP Ping Success (1.878 ms)

And doing a tcpdump why do I have a udp/23 on it ?

_________________
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.3, Map 0.4

Test
Cacti 1.2.1
Spine 1.2.1
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.4
Map 1.2.5


Top
 Profile  
 
 Post subject: Re: Doubt on ping function
PostPosted: Fri Oct 13, 2017 2:19 am 
Offline
Cacti User

Joined: Wed May 27, 2009 5:10 pm
Posts: 135
Just posted something similar, relating to selinux which I don't know how to resolve. Do you have selinux running at the moment? You dont say which system you have.
I'm trying to find a solution in this thread https://forums.cacti.net/viewtopic.php?f=2&t=58055


Top
 Profile  
 
 Post subject: Re: Doubt on ping function
PostPosted: Tue Oct 17, 2017 12:51 am 
Offline
Cacti User

Joined: Wed Dec 07, 2011 9:19 am
Posts: 322
I'm not sure the problem is on linux, the trace show a udp ping that is not suppose to happen, and Cacti is using this udp ping to check the status of my device.
Even if the config is set with icmp ping. And when I look on the device, it show as 'ICMP Ping Success (0.787 ms)'

_________________
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.3, Map 0.4

Test
Cacti 1.2.1
Spine 1.2.1
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.4
Map 1.2.5


Top
 Profile  
 
 Post subject: Re: Doubt on ping function
PostPosted: Tue Oct 17, 2017 1:39 am 
Offline
Cacti User

Joined: Wed May 27, 2009 5:10 pm
Posts: 135
I think you misunderstood me :)

If you run CLI command on the server: "sestatus" does it return "enforcing" ? IF true then I believe the reason your ping is not working is because the security on your server is not set up to permit cacti / web server to send a ping. To fix this, the selinux config needs to be adjusted to allow the web server to send a ping (create a socket). I am stuck here, I don't know how to proceed. I've tried to google to find best practice to allow this to be done. A lot of people say they have fixed this by turning off selinux but that's not good. It's the equivalent of removing your front door of your house, to let your relative stay for a visit = not secure.

As a temporary fix, you can run this command:
Code:
setenforce permissive


This will turn off selinux temporarily. Selinux will be enabled again after a reboot OR, you can run "setenforce enforcing". But be CAREFUL, with selinux turned off I believe new files are not labelled with a selinux policy so doing this long-term might cause more problems and difficulties.

Still waiting for someone to reply to my post :cry: :cry:


Top
 Profile  
 
 Post subject: Re: Doubt on ping function
PostPosted: Tue Oct 17, 2017 3:46 am 
Offline
Cacti User

Joined: Wed Dec 07, 2011 9:19 am
Posts: 322
I do not have SELinux active:
SELinux status: disabled


And I know the icmp ping is working, but cacti is doing both icmp and udp
And I think this udp stuff is taken from the default device config under settings. because it's a ping on port 23 UDP.

But I will have to find some time to look on the code to trace why it doe's that.


So I just made test, change the ping method to be udp, change the port 69, put back the pint to icmp

Now the udp ping is doing it on port 69
Even with no port on the ping port neither on the device, nor on the default solve the issue; actually it does the icmp ping, then an udp on port 0

_________________
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.3, Map 0.4

Test
Cacti 1.2.1
Spine 1.2.1
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.4
Map 1.2.5


Top
 Profile  
 
 Post subject: Re: Doubt on ping function
PostPosted: Tue Oct 17, 2017 3:54 am 
Offline
Cacti User

Joined: Wed May 27, 2009 5:10 pm
Posts: 135
Understood...
Your symptom doesn't happen for me. I am running cacti 1.1.24. Have you tried updating?


Top
 Profile  
 
 Post subject: Re: Doubt on ping function
PostPosted: Tue Oct 17, 2017 4:24 am 
Offline
Cacti User

Joined: Wed Dec 07, 2011 9:19 am
Posts: 322
I'm on 1.1.23, and I doubt the 24 to 26 solve the problem.

I will try to updated later this week, and look into the code

_________________
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.3, Map 0.4

Test
Cacti 1.2.1
Spine 1.2.1
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.4
Map 1.2.5


Top
 Profile  
 
 Post subject: Re: Doubt on ping function
PostPosted: Fri Oct 20, 2017 4:49 am 
Offline
Cacti User

Joined: Sun May 27, 2007 5:42 pm
Posts: 175
Since u are using spine, you can set to use ICMP ping instead.
But you need to set the spine (should be in /usr/local/spine/bin/spine) to have +s executable.
Do this in root, use sudo:
chmod +s /usr/local/spine/bin/spine


Top
 Profile  
 
 Post subject: Re: Doubt on ping function
PostPosted: Mon Oct 23, 2017 2:05 am 
Offline
Cacti User

Joined: Wed Dec 07, 2011 9:19 am
Posts: 322
Yes that's was my problem, during a upgrade spine change his right setup, and I forgot to put it back.
now it's working as it should

_________________
CentOS
Production
Cacti 0.8.8h
Spine 0.8.8h
PIA 3.1
Aggregate 0.75
Monitor 1.3
Settings 0.71
Weathermap 0.98
Thold 0.5
rrdclean 0.41

Own plugin: LinkDiscovery 0.3, Map 0.4

Test
Cacti 1.2.1
Spine 1.2.1
thold 1.0.6
monitor 2.3.5
php 7.2.11
mariadb 5.5.56
Own plugin:
ExtendDB 1.1.2
LinkDiscovery 1.2.4
Map 1.2.5


Top
 Profile  
 
 Post subject: Re: Doubt on ping function
PostPosted: Thu Mar 28, 2019 6:18 pm 
Offline

Joined: Sun Mar 17, 2019 6:15 pm
Posts: 7
super-hornet wrote:
Since u are using spine, you can set to use ICMP ping instead.
But you need to set the spine (should be in /usr/local/spine/bin/spine) to have +s executable.
Do this in root, use sudo:
chmod +s /usr/local/spine/bin/spine


Thankyou for that- I was banging my head against a wall trying to figure out why I had 3 devices out of 7 that were marked as down and returning UDP ping failures!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group