Xymon Mailing List Archive search

No Interface graphs for hosts on CentOS 7..

6 messages in this thread

list Rolf Brusletto · Wed, 11 Mar 2015 11:42:20 -0600 ·
I googled, and couldn't find anything regarding this, but I'm not seeing
any interface graphs for hosts with CentOS7 / RedHat 7, and I'm trying to
understand why. RPMs freshly built from 4.3.18 for CentOS7, the client is
running 4.3.18, and the server is 4.3.9. Is there some sort of
incompatability here with the output from ifconfig or ifstat?

Best regards,

Rolf Brusletto
Senior Network And Systems Admin
Global Liquidity Partners, LLC
user-b4140c0db1a1@xymon.invalid
XXX-XXX-XXXX office
XXX-XXX-XXXX mobile

-- 


*Confidentiality Notice:  This email, including attachments, may include non-public, proprietary, confidential or legally privileged information.  If you are not an intended recipient or an authorized agent of an intended recipient, you are hereby notified that any dissemination, distribution or copying of the information contained in or transmitted with this e-mail is unauthorized and strictly prohibited.  If you have received this email in error, please notify the sender by replying to this message and permanently delete this e-mail, its attachments, and any copies of it immediately.  You should not retain, copy or use this e-mail or any attachment for any purpose, nor disclose all or any part of the contents to any other person.*
list Jeremy Laidman · Thu, 12 Mar 2015 15:53:12 +1100 ·
quoted from Rolf Brusletto
On 12 March 2015 at 04:42, Rolf Brusletto <user-b4140c0db1a1@xymon.invalid> wrote:
I googled, and couldn't find anything regarding this, but I'm not seeing
any interface graphs for hosts with CentOS7 / RedHat 7, and I'm trying to
understand why. RPMs freshly built from 4.3.18 for CentOS7, the client is
running 4.3.18, and the server is 4.3.9. Is there some sort of
incompatability here with the output from ifconfig or ifstat?
The client data parser looks for interface counters in the [ifstat] section
of the client data message. I don't have a RHEL7/CentOS7 system to compare,
but it could be that the format of "ifstat" is different.

First, see if your client messages contain an [ifstat] section.  You can
get to your client message by viewing the "conn" status page for the server
and then clicking on "Client data" link.

Once the client message is parsed, the [ifstat] section is sent to
xymond_rrd via a "data" message.  For Linux servers, the RRD parser uses
the following regular expressions when parsing:

static const char *ifstat_linux_exprs[] = {
        "^([a-z]+[0123456789.:]*|lo:?)\\s",
        "^\\s+RX bytes:([0-9]+) .*TX bytes.([0-9]+) ",
        "^\\s+RX packets\\s+[0-9]+\\s+bytes\\s+([0-9]+) ",
        "^\\s+TX packets\\s+[0-9]+\\s+bytes\\s+([0-9]+) "
};

If it gets the data in the right format, it creates an RRD file for the
server, called ifstat.<interfacename>.rrd.  So check to see if the RRD
files have shown up.

And finally, the default configuration for Xymon is to have "ifstat"
included in the "GRAPHS" variable in xymonserver.cfg.  So that should
ensure that the ifstat graph shows up on the Trends page.  Check the trends
page for the ifstat graph, which should appear immediately after the
"netstat" graph.

J
list Japheth Cleaver · Thu, 12 Mar 2015 19:08:06 -0700 ·
quoted from Jeremy Laidman

On Wed, March 11, 2015 9:53 pm, Jeremy Laidman wrote:
On 12 March 2015 at 04:42, Rolf Brusletto <user-b4140c0db1a1@xymon.invalid> wrote:
I googled, and couldn't find anything regarding this, but I'm not seeing
any interface graphs for hosts with CentOS7 / RedHat 7, and I'm trying
to
understand why. RPMs freshly built from 4.3.18 for CentOS7, the client
is
running 4.3.18, and the server is 4.3.9. Is there some sort of
incompatability here with the output from ifconfig or ifstat?
The client data parser looks for interface counters in the [ifstat]
section
of the client data message. I don't have a RHEL7/CentOS7 system to
compare,
but it could be that the format of "ifstat" is different.

First, see if your client messages contain an [ifstat] section.  You can
get to your client message by viewing the "conn" status page for the
server
and then clicking on "Client data" link.
The layout has changed a little bit, but it's still parse-able by the
default tools.

A bigger issue is that in the fancy new late-Fedora/EL7 world, "ifconfig"
is deprecated (actually, it's apparently been deprecated for like a decade
in favor of 'ip', but I don't know anyone who doesn't use it) thanks to
the move away from SysV initscripts and is no longer installed by default.

Ensure that the "net-tools" RPM is installed if it isn't already; if you
have a blank ifstat section, this is most likely the case.


HTH,

-jc
list Jeremy Laidman · Fri, 13 Mar 2015 17:43:36 +1100 ·
quoted from Japheth Cleaver
On 13 March 2015 at 13:08, J.C. Cleaver <user-87556346d4af@xymon.invalid> wrote:
A bigger issue is that in the fancy new late-Fedora/EL7 world, "ifconfig"
is deprecated (actually, it's apparently been deprecated for like a decade
in favor of 'ip', but I don't know anyone who doesn't use it) thanks to
the move away from SysV initscripts and is no longer installed by default.
Ah, that makes sense.  Well given that it's deprecated, I suppose the Xymon
client script and server-side parser should probably have been adjusted to
cope with this, sometime in the last decade.

On the client, we could perhaps use "netstat -ibn" (like on BSD-based
systems, and HPUX) and use the existing parsing code on the server.  If we
use "ip -s" then we'll need new parsing code on the server side.

The FREEBSD parsing on the server first looks for the V8 format then falls
back to the original format if it doesn't match.  The Linux parsing could
do the same, so if the Linux parsing string fails to match, look again
using a suitable *BSD parsing string.

Then on the client side script, it'd be something like:

[ -x /bin/ifconfig ] && /sbin/ifconfig || netstat -ibn

J
list Japheth Cleaver · Thu, 12 Mar 2015 23:58:47 -0700 ·
quoted from Jeremy Laidman

On Thu, March 12, 2015 11:43 pm, Jeremy Laidman wrote:
On 13 March 2015 at 13:08, J.C. Cleaver <user-87556346d4af@xymon.invalid> wrote:
A bigger issue is that in the fancy new late-Fedora/EL7 world,
"ifconfig"
is deprecated (actually, it's apparently been deprecated for like a
decade
in favor of 'ip', but I don't know anyone who doesn't use it) thanks to
the move away from SysV initscripts and is no longer installed by
default.
Ah, that makes sense.  Well given that it's deprecated, I suppose the
Xymon
client script and server-side parser should probably have been adjusted to
cope with this, sometime in the last decade.

On the client, we could perhaps use "netstat -ibn" (like on BSD-based
systems, and HPUX) and use the existing parsing code on the server.  If we
use "ip -s" then we'll need new parsing code on the server side.

The FREEBSD parsing on the server first looks for the V8 format then falls
back to the original format if it doesn't match.  The Linux parsing could
do the same, so if the Linux parsing string fails to match, look again
using a suitable *BSD parsing string.

Then on the client side script, it'd be something like:

[ -x /bin/ifconfig ] && /sbin/ifconfig || netstat -ibn
Agreed, some logic along these lines is probably going to be necessary. I
do wonder how stable 'ip's output has been over time too.


Regards,

-jc
list Francois Claire · Fri, 13 Mar 2015 16:18:29 +0100 ·
Hi Rolf,


I hit this problem a while back on Fedora 16 and I found a trick to get it working: to pipe a cat command to the output of the ifconfig.

Here's a patch I proposed:

--- xymonclient-linux.sh.orig    2012-01-06 11:30:09.000000000 +0100
+++ xymonclient-linux.sh    2012-01-06 11:30:35.000000000 +0100
@@ -55,7 +55,7 @@
   echo "[free]"
   free
   echo "[ifconfig]"
-/sbin/ifconfig
+/sbin/ifconfig | cat
   echo "[route]"
   netstat -rn
   echo "[netstat]"
@@ -64,7 +64,7 @@
   # Bug in RedHat's netstat spews annoying error messages.
   netstat -ant 2>/dev/null
   echo "[ifstat]"
-/sbin/ifconfig
+/sbin/ifconfig | cat
   # Report mdstat data if it exists
   if test -r /proc/mdstat; then echo "[mdstat]"; cat /proc/mdstat; fi
   echo "[ps]"


Corresponding thread in xymon developer mailing list:
http://sourceforge.net/p/xymon/mailman/message/28638172/


Could you please try it and let us know wether it helps in your case ?


Francois.
quoted from Rolf Brusletto


Le 11/03/2015 18:42, Rolf Brusletto a écrit :
I googled, and couldn't find anything regarding this, but I'm not seeing any interface graphs for hosts with CentOS7 / RedHat 7, and I'm trying to understand why. RPMs freshly built from 4.3.18 for CentOS7, the client is running 4.3.18, and the server is 4.3.9. Is there some sort of incompatability here with the output from ifconfig or ifstat?

Best regards,

Rolf Brusletto
Senior Network And Systems Admin
Global Liquidity Partners, LLC

user-b4140c0db1a1@xymon.invalid <mailto:user-b4140c0db1a1@xymon.invalid>
quoted from Rolf Brusletto
XXX-XXX-XXXX office
XXX-XXX-XXXX mobile

//

/*Confidentiality Notice:* This email, including attachments, may include non-public, proprietary, confidential or legally privileged information.  If you are not an intended recipient or an authorized agent of an intended recipient, you are hereby notified that any dissemination, distribution or copying of the information contained in or transmitted with this e-mail is unauthorized and strictly prohibited.  If you have received this email in error, please notify the sender by replying to this message and permanently delete this e-mail, its attachments, and any copies of it immediately.  You should not retain, copy or use this e-mail or any attachment for any purpose, nor disclose all or any part of the contents to any other person./