Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Advanced ping 100% loss

 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
manaf
Cacti User


Joined: 16 Apr 2006
Posts: 50

PostPosted: Sun Aug 20, 2006 8:51 am    Post subject: Advanced ping 100% loss Reply with quote

I have a problem in graphing ping latency using advanced ping template. the graph always show a constant 100% loss as you see in the attached graph.
when I run the script using root account no problem happend:

Quote:
[root@nms cacti]# php /var/www/html/cacti/scripts/ss_fping.php www.google.com 20
min:154.7600 avg:156.2960 max:159.0200 dev:1.0255 loss:0.0000
[root@nms cacti]#
[root@nms cacti]#


but using other users like cactiuser i got the following result:
Quote:
-bash-3.1$ php /var/www/html/cacti/scripts/ss_fping.php www.google.com
PHP Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /var/www/html/cacti/lib/ping.php on line 96
PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /var/www/html/cacti/lib/ping.php on line 97
PHP Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /var/www/html/cacti/lib/ping.php on line 96
PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /var/www/html/cacti/lib/ping.php on line 97
PHP Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /var/www/html/cacti/lib/ping.php on line 96
PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /var/www/html/cacti/lib/ping.php on line 97
PHP Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /var/www/html/cacti/lib/ping.php on line 96
PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /var/www/html/cacti/lib/ping.php on line 97
PHP Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /var/www/html/cacti/lib/ping.php on line 96
PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /var/www/html/cacti/lib/ping.php on line 97
PHP Warning: socket_create(): Unable to create socket [1]: Operation not permitted in /var/www/html/cacti/lib/ping.php on line 96
PHP Warning: socket_set_block() expects parameter 1 to be resource, boolean given in /var/www/html/cacti/lib/ping.php on line 97
loss:100.00
PHP Warning: Unknown: open(/var/lib/php/session/sess_i3nvshq0fev0lokbguenmjc9u5, O_RDWR) failed: Permission denied (13) in Unknown on line 0
PHP Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/var/lib/php/session) in Unknown on line 0
-bash-3.1$


I'm using cacti 0.8.6h and php 5.1.4
could anybody help??



graph_image.png
 Description:
 Filesize:  24.75 KB
 Viewed:  3695 Time(s)

graph_image.png


Back to top
echelon360



Joined: 28 Mar 2006
Posts: 24

PostPosted: Sun Aug 20, 2006 11:50 pm    Post subject: Reply with quote

i'm having the same problem as well...any luck?
Back to top
sizulku
Cacti User


Joined: 04 Nov 2002
Posts: 102
Location: ACEH

PostPosted: Mon Aug 21, 2006 12:57 am    Post subject: Reply with quote

you need to run poller as root.
Back to top
echelon360



Joined: 28 Mar 2006
Posts: 24

PostPosted: Mon Aug 21, 2006 2:57 am    Post subject: Reply with quote

sizulku wrote:
you need to run poller as root.



but i'm running cacti on windows
Back to top
manaf
Cacti User


Joined: 16 Apr 2006
Posts: 50

PostPosted: Wed Aug 30, 2006 3:58 pm    Post subject: Reply with quote

does anybody get solve this problem?
Back to top
TheWitness
Developer


Joined: 14 May 2002
Posts: 9697
Location: MI, USA

PostPosted: Thu Aug 31, 2006 7:52 pm    Post subject: Reply with quote

This is an issue in Linux/Unix that prevents ICMP sockets to be created by anyone other than root. So, if your poller runs as root, you should be ok. Otherwise, you have to set the euid of php to root. A good way of doing that is to copy the PHP program to a custom location, make only the poller have access to it and then set the setuid bit on the application. Then in cron, make sure you start poller with this special php program. I have not tested it, but it might work. Don't know. Running the poller as root will though.

TheWitness
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group