PDA

View Full Version : Another fping problem...


McCall
21-02-2009, 15:50
Hi Folks,

I have looked around the forums and found a few problems with people getting fping to return data, I have followed everything I can find but still can't seem to get it working!

Fping location is /usr/bin/fping, but there is also a symlink in /usr/sbin/fping
I have changed to /usr/bin/fping location in /etc/zabbix_server.conf
I have run the following on the binary:

chown root:zabbix /usr/bin/fping
chmod 710 /usr/bin/fping
chmod ug+s /usr/bin/fping

The version of fping I am using supports the -S option.

I still get a flat "0" data line to a host I know is reachable from my command line.

Can anyone help please?

McCall
23-02-2009, 11:27
I am still having this problem... does anyone have any clues for me please?

richlv
24-02-2009, 20:13
chmod 4750

cgroothius
02-03-2009, 16:58
I am also having the exact same issue...get a 0 flat line to a host that I am able to ping from the command line...i have configured per the manual and have also chmod per this post with the same results..anyone have any other suggestions r was this post ever resolved??
Thaks
Colin

richlv
02-03-2009, 17:06
did you try 'su - zabbix' and running the exact sudo line for fping launching ? any errors displayed that way ?

cgroothius
02-03-2009, 17:10
what might that "exact sudo line" be?

thanks
C.

richlv
02-03-2009, 17:16
ahh, i mixed up with other commands, just plain fping line :)
as you have a different system, it might be useful to list all things you have checked :

1. fping location in zabbix_server.conf (including server restarting after config change);
2. fping permissions;
3. whether you can use fping as 'su - zabbix';
4. whether you have source address set for zabbix server and whether your copy of fping supports -S flag in that case.

and maybe something else i have forgotten :)

cgroothius
02-03-2009, 17:32
location of fping.

^[[A[zabbix@zabbix etc]$ locate fping
/usr/sbin/fping
/usr/sbin/fping6
/usr/share/doc/fping-2.4b2
/usr/share/doc/fping-2.4b2/COPYING
/usr/share/doc/fping-2.4b2/ChangeLog
/usr/share/doc/fping-2.4b2/README
/usr/share/man/man8/fping.8.gz
[zabbix@zabbix etc]$


-------

Is source IP set in zabbix_server.conf. No.

# Listen port for trapper. Default port number is 10051. This parameter
# must be between 1024 and 32767

ListenPort=10051

# Source IP address for outgouing connections
#SourceIP=

--------------------
Does fping support -S? No

[zabbix@zabbix etc]$ fping -S 192.168.20.20
fping: invalid option -- 'S'

but you imply its irrelevant as sourceip is not set in zabbix_server.conf right??

--------------------
I carried out these instructions.

chown root:zabbix /usr/sbin/fping
chmod 710 /usr/sbin/fping
chmod ug+s /usr/sbin/fping

stop/start. No Change
------
chmod 4750 /usr/sbin/fping

stop/start. No Change
------
Can I run as zabbix user...yep

[zabbix@zabbix etc]$ fping 192.168.20.20
192.168.20.20 is alive

cgroothius
02-03-2009, 17:36
Version of fping is

Package fping-2.4b2-8.fc9.i386 already installed and latest version
Nothing to do
[root@zabbix sbin]#

C.

richlv
03-03-2009, 11:13
at a quick glance, it seems ok.
have you tried setting zabbix server debug to 4 and observing the logfile when fping check fails ?

cgroothius
03-03-2009, 13:21
I have not...I'm new to the app but I sure will.

Thanks (again)

Colin.:)

cgroothius
03-03-2009, 16:22
OK I set debug=4 in zabbix_server.conf.

I still see no entries for that host in the log. Am I missing something? The manual states that all simple checks accept 2 parameters. I had NO parameters appended to my icmppingsec . WhenI added per the manual, then I got the following in the log.

3801:20090303:095858 Too many parameters in [icmppingsec,192.168.20.20,0]
3801:20090303:095858 Parameter [icmppingsec,192.168.20.20,0] is not supported by agent on host [MOL DB] Old status [0]

Which is something at least :O)

So I guess I have 2 outstanding questions. Does the simple check icmppingsec need parameters and if not how do we change the manual to reflect this?


Lastly, I read in the forums about setting "the port" to 0 for such simple checks. Is this at the host level where we would usually have port 10050 for agent monitored hosts?

Regardles of all of these thhings I have tried I STILL cannot return a value.

Thanks.
Again.
Colin.

richlv
03-03-2009, 16:40
not sure about the parameters. could you provide full item configuration then ?

cgroothius
03-03-2009, 17:03
Hope this is right...

richlv
03-03-2009, 17:13
try setting type to numeric (float). and, of course, increasing period - 5 seconds is damn often, you'll overload the server soon :)

cgroothius
03-03-2009, 17:17
Son of a gun.

cgroothius
03-03-2009, 17:39
Thanks Rich...

Cant believe I didnt even try that...anyway it is now registering values on the graph. I did put "ms" as my units but I'm getting .09 as opposed to the 90ms that I would really like...

I tried removing ms as my units...no change.

Thanks for hanging in there!!

Colin.

richlv
03-03-2009, 17:42
well, try setting custom multiplier to 1000.
i'm not sure it's the best solution, but it works

cgroothius
03-03-2009, 18:39
it sure does...

Many thanks
Colin.

chinasunysh
25-03-2009, 07:47
delete "-S" in icmpping.c and make;

Kerrygeek
26-03-2009, 20:02
It looks like there may be something to that. It's trying to use -S instead of -s for fping:
8275:20090326:140032 /usr/sbin/fping -S -c3 2>/dev/null </tmp/zabbix_server_8275.pinger

I'm not sure I know the exact syntax to replace the -S in the file but I've made a backup of the original so I'll tinker with it. My only problem is that my 1.6.1 server has the same thing in the .c file and it's working fine.

Here goes nothing!
Kerry

Kerrygeek
26-03-2009, 20:14
Ok, I know it's poor form to reply to yourself, but maybe this will help you other guys. Stop the server, replace the -S with a -s, save the file, do a make install, then restart the server. When you do make install it will tell you "nothing to do" in most places, it will just have one small change to make.

That seems to do the trick, icmpping is now working fine. Icmppingsec doesn't seem to be working yet but I'm not using it right now so I'll tinker with that later.

Thanks for the tip on editing the .c file and running make again.

Kerry

richlv
27-03-2009, 08:50
um, -S is using a patched fping feature - it sets source ip address. you could also remove source ip config parameter from server config file.

Kerrygeek
27-03-2009, 13:59
Ok, I'll look for that, that may be what was keeping the ping time from working right. I got fping from their site, I'll see if I can find a patch or different version of fping.

NOB
03-04-2009, 12:56
Ok, I'll look for that, that may be what was keeping the ping time from working right. I got fping from their site, I'll see if I can find a patch or different version of fping.

Hi

I unpackaged the source RPM fping-2.4-1.b2.rf.src.rpm,
added the fping "-S" patch to the fping source
and repackaged it for i386 and amd64 archs but didn't test
it, yet.

I'm not sure where to put the RPMs, though.
My Website is still under construction.
If there is interest, please tell me.

Regards

Norbert.