not getting bandwidth output

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
wiproltdwiv
Posts: 281
Joined: Sat Sep 08, 2012 12:52 am

Re: not getting bandwidth output

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: not getting bandwidth output

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
wiproltdwiv
Posts: 281
Joined: Sat Sep 08, 2012 12:52 am

Re: not getting bandwidth output

Post 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.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: not getting bandwidth output

Post by slansing »

You should have at least some output in the error_log can you post what it outputs as shown above?
wiproltdwiv
Posts: 281
Joined: Sat Sep 08, 2012 12:52 am

Re: not getting bandwidth output

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: not getting bandwidth output

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
wiproltdwiv
Posts: 281
Joined: Sat Sep 08, 2012 12:52 am

Re: not getting bandwidth output

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: not getting bandwidth output

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
wiproltdwiv
Posts: 281
Joined: Sat Sep 08, 2012 12:52 am

Re: not getting bandwidth output

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: not getting bandwidth output

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked