Page 4 of 5

Re: not getting bandwidth output

Posted: Thu Feb 21, 2013 10:40 pm
by wiproltdwiv
Scott,

We are adding fresh routers, we are not adding services for already configured routers.

Whatever routers we are adding, there is no exciting entry in mrtg for.

Re: not getting bandwidth output

Posted: Fri Feb 22, 2013 7:59 am
by scottwilkerson
Ok, then it could be a permissions thing... Lets run

Code: Select all

ls -l /etc/mrtg/mrtg.cfg
And also, if we could tail the httpd error_log while we try to run the wizard we may get a clue

Code: Select all

tail -f /var/log/httpd/error_log

Re: not getting bandwidth output

Posted: Mon Feb 25, 2013 4:28 am
by wiproltdwiv
[root@EMSNagios1 libexec]# ls -l /etc/mrtg/mrtg.cfg
-rw-r--r-- 1 apache nagios 3184287 Feb 22 14:21 /etc/mrtg/mrtg.cfg


i did not get any error in httpd log.

Re: not getting bandwidth output

Posted: Mon Feb 25, 2013 10:24 am
by slansing
You should have at least some output in the error_log can you post what it outputs as shown above?

Re: not getting bandwidth output

Posted: Wed Feb 27, 2013 2:55 am
by wiproltdwiv
I checked with below command then i got below error

env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok


2013-02-27 13:06:04: ERROR: Target[IP_13][_OUT_] ' $target->[1113]{$mode} ' did not eval into defined data
2013-02-27 13:06:04: ERROR: Target[IP_16][_IN_] ' $target->[1114]{$mode} ' did not eval into defined data
2013-02-27 13:06:04: ERROR: Target[IP_16][_OUT_] ' $target->[1114]{$mode} ' did not eval into defined data
2013-02-27 13:06:04: ERROR: Cannot tune logfile: mmaping file '/var/lib/mrtg/<IP>.rrd': Cannot allocate memory
2013-02-27 13:06:04: ERROR: Cannot update /var/lib/mrtg/<IP>.rrd with '1361950257:1530832:846762' mmaping file '/var/lib/mrtg/<IP>.rrd': Cannot allocate memory
2013-02-27 13:06:04: ERROR: Cannot tune logfile: mmaping file '/var/lib/mrtg/<IP>.rrd': Cannot allocate memory
2013-02-27 13:06:04: ERROR: Cannot update /var/lib/mrtg/<IP>.rrd with '1361950322:3827:240' mmaping file '/var/lib/mrtg/<IP>.rrd': Cannot allocate memory

[root@somehost local]# tail /var/log/messages
Feb 27 13:22:59 somehost nagios: Error: Could not open check result queue directory '/usr/local/nagios/var/spool/checkresults' for reading.

Re: not getting bandwidth output

Posted: Wed Feb 27, 2013 1:59 pm
by scottwilkerson
wiproltdwiv wrote:2013-02-27 13:06:04: ERROR: Cannot tune logfile: mmaping file '/var/lib/mrtg/<IP>.rrd': Cannot allocate memory
2013-02-27 13:06:04: ERROR: Cannot update /var/lib/mrtg/<IP>.rrd with '1361950257:1530832:846762' mmaping file '/var/lib/mrtg/<IP>.rrd': Cannot allocate memory
2013-02-27 13:06:04: ERROR: Cannot tune logfile: mmaping file '/var/lib/mrtg/<IP>.rrd': Cannot allocate memory
2013-02-27 13:06:04: ERROR: Cannot update /var/lib/mrtg/<IP>.rrd with '1361950322:3827:240' mmaping file '/var/lib/mrtg/<IP>.rrd': Cannot allocate memory
This looks like the system is out of memory
wiproltdwiv wrote:Feb 27 13:22:59 somehost nagios: Error: Could not open check result queue directory '/usr/local/nagios/var/spool/checkresults' for reading.
this looks like you have a permissions problem, can you run the following as root

Code: Select all

ls -ld /usr/local/nagios/var/spool/checkresults

Re: not getting bandwidth output

Posted: Thu Feb 28, 2013 4:47 am
by wiproltdwiv
also getting below error

013-02-28 15:05:22: ERROR: Target[10.152.17.1_12][_OUT_] ' $target->[1080]{$mode} ' did not eval into defined data
2013-02-28 15:05:22: ERROR: Target[IP][_IN_] ' $target->[1081]{$mode} ' did not eval into defined data
2013-02-28 15:05:22: ERROR: Target[IO][_OUT_] ' $target->[1081]{$mode} ' did not eval into defined data
2013-02-28 15:05:22: ERROR: Target[IP][_IN_] ' $target->[1082]{$mode} ' did not eval into defined data
2013-02-28 15:05:22: ERROR: Target[IP][_OUT_] ' $target->[1082]{$mode} ' did not eval into defined data
2013

httpd/error.log
[Thu Feb 28 13:28:51 2013] [error] Exception KeyError: KeyError(139946949539808,) in <module 'threading' from '/usr/lib64/python2.6/threading.pyc'> ignored
[Thu Feb 28 14:52:59 2013] [error] [client 10.128.17.4] client denied by server configuration: /var/www/mrtg
[Thu Feb 28 14:53:11 2013] [error] [client 10.128.17.4] File does not exist: /usr/local/nagiosxi/html/mrtg
[Thu Feb 28 15:00:08 2013] [error] [client 10.128.17.4] File does not exist: /var/www/html/var/lib
[Thu Feb 28 15:00:25 2013] [error] [client 10.128.17.4] client denied by server configuration: /var/www/mrtg

permission
drwxrwxr-x 2 nagios nagios 61440 Feb 28 15:17 /usr/local/nagios/var/spool/checkresults


one more thing, maximum how many ports bandwidth we can monitor in nagios xi?

Re: not getting bandwidth output

Posted: Thu Feb 28, 2013 11:18 am
by scottwilkerson
Those permissions are correct, so we need to make sure we don't have a user expired or something

Code: Select all

chage -l nagios
cat /etc/group|grep nag
sestatus

Re: not getting bandwidth output

Posted: Thu Feb 28, 2013 11:23 pm
by wiproltdwiv
[root@EMSNagios1 ~]# chage -l nagios
Last password change : Aug 14, 2012
Password expires : never
Password inactive : never
Account expires : never
Minimum number of days between password change : 0
Maximum number of days between password change : 99999
Number of days of warning before password expires : 7

[root@EMSNagios1 ~]# cat /etc/group|grep nag
nagios:x:505:nagios,apache
nagcmd:x:506:nagios,apache

[root@EMSNagios1 ~]# sestatus
SELinux status: disabled

one more thing, maximum how many ports bandwidth we can monitor in nagios xi? please suggest

Re: not getting bandwidth output

Posted: Fri Mar 01, 2013 11:52 am
by scottwilkerson
Did you add additional memory to the server since the memory problem?
wiproltdwiv wrote:one more thing, maximum how many ports bandwidth we can monitor in nagios xi? please suggest
This depends on many factors including system resources, network speed, check frequency etc.. With powerful optimized systems we have seen well over 10000 services (could be switch ports) monitored on 5 minute intervals