rrd files do not exist

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

rrd files do not exist

Post by cklayus »

After I add a router via the monitoring wizard with the snmp it detects the ports. but then doesn't really monitor the bandwidth.
it says thet rrd files are missing i checked and they are actually missing.
questrad
Posts: 160
Joined: Wed Mar 21, 2012 3:08 pm
Location: Toronto
Contact:

Re: rrd files do not exist

Post by questrad »

If you have used NagiosXI router wizard then you need to check if MRTG is running on your system and it generates the files for bandwidth checks
zaji_nms
Posts: 616
Joined: Tue Oct 16, 2012 12:28 am

Re: rrd files do not exist

Post by zaji_nms »

Dear cklayus

more /usr/local/nagiosxi/tmp/mrtgscan-your_router_host
copy the desired (only the required) interface and paste in

vi /etc/mrtg/mrtg.cfg

These only 5 lines are required copy and paste (below is example) should show
your_router_host_129.rrd missing


more /usr/local/nagiosxi/tmp/mrtgscan-your_router_host
Target[your_router_host_129]: 129:public@your_router_host:::::2
SetEnv[your_router_host_129]: MRTG_INT_IP="10.10.253.49" MRTG_INT_DESCR="POS4/0/2"
MaxBytes[your_router_host_129]: 19375000
Title[your_router_host_129]: Traffic Analysis for 129 -- your_router_host
PageTop[your_router_host_129]: <h1>Traffic Analysis for 129 -- your_router_host</h1>

root# vi /etc/mrtg/mrtg.cfg

#The below lines are start of the MRTG setup

LibAdd: /opt/rrdtool-1.4.4/lib/perl/5.10.1
HtmlDir: /var/www/mrtg
ImageDir: /var/www/mrtg
LogFormat: rrdtool
LogDir: /var/lib/mrtg
ThreshDir: /var/lib/mrtg
WorkDir: /var/lib/mrtg
EnableIPv6: no

Target[your_router_host_129]: 129:public@your_router_host:::::2
SetEnv[your_router_host_129]: MRTG_INT_IP="10.10.253.49" MRTG_INT_DESCR="POS4/0/2"
MaxBytes[your_router_host_129]: 19375000
Title[your_router_host_129]: Traffic Analysis for 129 -- your_router_host
PageTop[your_router_host_129]: <h1>Traffic Analysis for 129 -- your_router_host</h1>

:wq

Wait for 20 minutes, graph will start to plot.
Zajil NMS
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

Re: rrd files do not exist

Post by cklayus »

I had these lines in the mrtg.cfg file what i dint had is the top lines htmldir.... etc.....
I copied them from the forum and still no graphs after almost an hour.
the start of my mrtg.cfg file looks now like this:
### Global Config Options

# for UNIX
# WorkDir: /home/http/mrtg

# or for NT
# WorkDir: c:\mrtgdata

### Global Defaults

# to get bits instead of bytes and graphs growing to the right
# Options[_]: growright, bits

LibAdd: /opt/rrdtool-1.4.4/lib/perl/5.10.1
HtmlDir: /var/www/mrtg
ImageDir: /var/www/mrtg
LogFormat: rrdtool
LogDir: /var/lib/mrtg
ThreshDir: /var/lib/mrtg
WorkDir: /var/lib/mrtg
EnableIPv6: no

######################################################################
# System: Alon Kanot
# Description: SonicWALL NSA 250 M (SonicOS Enhanced 5.8.1.13-1o)
# Contact:
# Location:
######################################################################


### Interface 1 >> Descr: 'X0-(LAN)' | Name: 'X0' | Ip: '192.168.74.254' | Eth: 'c0-ea-e4-0a-49-c0' ###

Target[target ip]: 1:"deleted on porpoise":::::1
SetEnv[target ip_1]: MRTG_INT_IP="192.168.74.254" MRTG_INT_DESCR="X0-(LAN)"
MaxBytes[target ip_1]: 125000000
Title[target ip_1]: Traffic Analysis for 1 -- Alon Kanot
PageTop[target ip_1]: <h1>Traffic Analysis for 1 -- Alon Kanot</h1>
<div id="sysdetails">
<table>
<tr>
<td>System:</td>
<td>Alon Kanot in </td>
</tr>
<tr>
<td>Maintainer:</td>
<td></td>
</tr>
<tr>
<td>Description:</td>
<td>X0-(LAN) </td>
</tr>
<tr>
<td>ifType:</td>
<td>ethernetCsmacd (6)</td>
</tr>
<tr>
<td>ifName:</td>
<td>X0</td>
</tr>
<tr>
<td>Max Speed:</td>
<td>125.0 MBytes/s</td>
</tr>
<tr>
<td>Ip:</td>
<td>192.168.74.254 (No DNS name)</td>
</tr>
</table>
</div>
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: rrd files do not exist

Post by lmiltchev »

What is the Nagios XI version that you are currently running? I noticed that you are missing the "Include" directive in the "mrtg.cfg", i.e.

Code: Select all

Include: conf.d/*.cfg
Does this directory exist? Run the following command and show us the output:

Code: Select all

ll -R /etc/mrtg
Do you get any errors when you run the following command in the CLI?

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

Re: rrd files do not exist

Post by cklayus »

I am running the 2014R2.0 version

the output of the firs command is:
/etc/mrtg:
total 20
drwxrwxr-x 2 apache nagios 4096 May 12 2014 archive
drwxrwxr-x 2 apache nagios 4096 May 12 2014 conf.d
-rwxrwxr-x 1 apache nagios 7729 Dec 8 13:13 mrtg.cfg
-rwxrwxr-x 1 apache nagios 742 May 13 2014 mrtg.cfg.orig

/etc/mrtg/archive:
total 0

/etc/mrtg/conf.d:
total 0
You have new mail in /var/spool/mail/root

when i run the second i get an error:
ERROR: CFG Error in "libadd", file /etc/mrtg/mrtg.cfg line 22: /opt/rrdtool-1.4.4/lib/perl/5.10.1 is not the name of a directory
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

Re: rrd files do not exist

Post by cklayus »

the /opt directory is empty
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: rrd files do not exist

Post by sreinhardt »

Looks like you might be missing some dependencies there. Let's check a few packages:

Code: Select all

rpm -qa | grep -i 'net-snmp\|rrdtool\|mrtg\|perl' | sort -u
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
cklayus
Posts: 62
Joined: Tue May 27, 2014 8:42 am

Re: rrd files do not exist

Post by cklayus »

mrtg-2.16.2-7.el6.x86_64
mrtg-libs-2.16.2-7.el6.x86_64
net-snmp-5.5-49.el6_5.1.x86_64
net-snmp-libs-5.5-49.el6_5.1.x86_64
net-snmp-utils-5.5-49.el6_5.1.x86_64
perl-5.10.1-136.el6.x86_64
perl-Class-Singleton-1.4-6.el6.noarch
perl-Compress-Raw-Zlib-2.021-136.el6.x86_64
perl-Compress-Zlib-2.021-136.el6.x86_64
perl-Config-IniFiles-2.72-2.el6.noarch
perl-CPAN-1.9402-136.el6.x86_64
perl-Crypt-DES-2.05-9.el6.x86_64
perl-Crypt-SSLeay-0.57-16.el6.x86_64
perl-DateTime-0.5300-2.el6.x86_64
perl-DBD-MySQL-4.013-3.el6.x86_64
perl-DBI-1.609-4.el6.x86_64
perl-devel-5.10.1-136.el6.x86_64
perl-Digest-HMAC-1.01-22.el6.noarch
perl-Digest-SHA1-2.12-2.el6.x86_64
perl-Digest-SHA-5.47-136.el6.x86_64
perl-Error-0.17015-4.el6.noarch
perl-ExtUtils-MakeMaker-6.55-136.el6.x86_64
perl-ExtUtils-ParseXS-2.2003.0-136.el6.x86_64
perl-HTML-Parser-3.64-2.el6.x86_64
perl-HTML-Tagset-3.20-4.el6.noarch
perl-IO-Compress-Base-2.021-136.el6.x86_64
perl-IO-Compress-Zlib-2.021-136.el6.x86_64
perl-IO-Socket-INET6-2.56-4.el6.noarch
perl-IO-Socket-SSL-1.31-2.el6.noarch
perl-IO-stringy-2.110-10.1.el6.noarch
perl-libs-5.10.1-136.el6.x86_64
perl-libwww-perl-5.833-2.el6.noarch
perl-List-MoreUtils-0.22-10.el6.x86_64
perl-Mail-IMAPClient-3.34-1.el6.noarch
perl-Mail-POP3Client-2.18-6.el6.noarch
perl-Module-Pluggable-3.90-136.el6.x86_64
perl-Net-DNS-0.65-5.el6.x86_64
perl-Net-LibIDN-0.12-3.el6.x86_64
perl-Net-SMTP-TLS-0.12-1.el6.rf.noarch
perl-Net-SNMP-5.2.0-4.el6.noarch
perl-Net-SSLeay-1.35-9.el6.x86_64
perl-Params-Validate-0.92-3.el6.x86_64
perl-Parse-RecDescent-1.965-1.el6.noarch
perl-Pod-Escapes-1.04-136.el6.x86_64
perl-Pod-Simple-3.13-136.el6.x86_64
perl-SNMP_Session-1.12-4.el6.noarch
perl-Socket6-0.23-4.el6.x86_64
perl-Test-Harness-3.17-136.el6.x86_64
perl-Time-HiRes-1.9721-136.el6.x86_64
perl-URI-1.40-2.el6.noarch
perl-version-0.77-136.el6.x86_64
perl-XML-Parser-2.36-7.el6.x86_64
perl-XML-Simple-2.18-6.el6.noarch
rrdtool-1.3.8-6.el6.x86_64
rrdtool-perl-1.3.8-6.el6.x86_64
rrdtool-python-1.3.8-6.el6.x86_64
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: rrd files do not exist

Post by sreinhardt »

Ah, I see you have the perl-Net-SNMP package, but not the actual net-snmp packages, and we need both in this case. Let's get those in place with:

Code: Select all

yum install net-snmp-perl
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked