No rrd files are generated in new services

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
pucobre
Posts: 12
Joined: Tue May 10, 2016 7:59 am

Re: No rrd files are generated in new services

Post by pucobre »

with "sudo" I have the same root privileges. I have no direct access to the root account

The results are as follows:

[NagiosServer /]$ sudo time LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
time: cannot run LANG=C: No such file or directory
0.00user 0.00system 0:00.00elapsed ?%CPU (0avgtext+0avgdata 256maxresident)k
0inputs+0outputs (0major+53minor)pagefaults 0swaps

[NagiosServer /]$ sudo LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
ERROR: unable to open include file: /etc/mrtg/conf.d/172.16.80.8_10103.cfg

[evisusroot@PUC-MGM-11-05 ~]$ sudo locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

[NagiosServer /]$ cat /etc/sysconfig/i18n
LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: No rrd files are generated in new services

Post by tgriep »

Can you run these commands and post the output?

Code: Select all

ls -l /var/lib/mrtg
ls -l /etc/mrtg/conf.d
su -
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!
pucobre
Posts: 12
Joined: Tue May 10, 2016 7:59 am

Re: No rrd files are generated in new services

Post by pucobre »

Good day

as root:
[NagiosServer /]$ LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
>ERROR: unable to open include file: /etc/mrtg/conf.d/172.16.80.8_10103.cfg

attached results
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: No rrd files are generated in new services

Post by tgriep »

Lets remove some of the left over files and the lock file and then run the mrtg command with debug enabled.
Run this as root and post the output.

Code: Select all

rm /var/lib/mrtg/mrtg.ok
rm /etc/mrtg/mrtg.ok
rm /var/lock/mrtg/mrtg_l
LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --debug=base,cfg
Be sure to check out our Knowledgebase for helpful articles and solutions!
pucobre
Posts: 12
Joined: Tue May 10, 2016 7:59 am

Re: No rrd files are generated in new services

Post by pucobre »

thanks, I back up and delete the files, the command output is as follows:

--base: Creating Lockfiles /etc/mrtg/mrtg.cfg_l,/etc/mrtg/mrtg.cfg_l_5466
--base: Reading Config File: /etc/mrtg/mrtg.cfg
--cfg: /etc/mrtg/mrtg.cfg[1]: ######################################################################
--cfg: /etc/mrtg/mrtg.cfg[2]: # Multi Router Traffic Grapher -- Example Configuration File
--cfg: /etc/mrtg/mrtg.cfg[3]: ######################################################################
--cfg: /etc/mrtg/mrtg.cfg[4]: # This file is for use with mrtg-2.0
--cfg: /etc/mrtg/mrtg.cfg[5]: #
--cfg: /etc/mrtg/mrtg.cfg[6]: # Note:
--cfg: /etc/mrtg/mrtg.cfg[7]: #
--cfg: /etc/mrtg/mrtg.cfg[8]: # * Keywords must start at the begin of a line.
--cfg: /etc/mrtg/mrtg.cfg[9]: #
--cfg: /etc/mrtg/mrtg.cfg[10]: # * Lines which follow a keyword line which do start
--cfg: /etc/mrtg/mrtg.cfg[11]: # with a blank are appended to the keyword line
--cfg: /etc/mrtg/mrtg.cfg[12]: #
--cfg: /etc/mrtg/mrtg.cfg[13]: # * Empty Lines are ignored
--cfg: /etc/mrtg/mrtg.cfg[14]: #
--cfg: /etc/mrtg/mrtg.cfg[15]: # * Lines starting with a # sign are comments.
--cfg: /etc/mrtg/mrtg.cfg[16]:
--cfg: /etc/mrtg/mrtg.cfg[17]: # Where should the logfiles, and webpages be created?
--cfg: /etc/mrtg/mrtg.cfg[18]:
--cfg: /etc/mrtg/mrtg.cfg[19]: # Minimal mrtg.cfg
--cfg: /etc/mrtg/mrtg.cfg[20]: #--------------------
--cfg: /etc/mrtg/mrtg.cfg[21]:
--cfg: /etc/mrtg/mrtg.cfg[22]: HtmlDir: /var/www/mrtg
--cfg: /etc/mrtg/mrtg.cfg[23]: ImageDir: /var/www/mrtg
--cfg: /etc/mrtg/mrtg.cfg[24]: LogFormat: rrdtool
--cfg: /etc/mrtg/mrtg.cfg[25]: LogDir: /var/lib/mrtg
--cfg: /etc/mrtg/mrtg.cfg[26]: ThreshDir: /var/lib/mrtg
--cfg: /etc/mrtg/mrtg.cfg[27]: WorkDir: /var/lib/mrtg
--cfg: /etc/mrtg/mrtg.cfg[28]:
ERROR: unable to open include file: /etc/mrtg/conf.d/172.16.80.6_10101.cfg
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: No rrd files are generated in new services

Post by Box293 »

pucobre wrote:ERROR: unable to open include file: /etc/mrtg/conf.d/172.16.80.6_10101.cfg
Move the file /etc/mrtg/conf.d/172.16.80.6_10101.cfg into /tmp/ and then run the command again. What output is produced now?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
pucobre
Posts: 12
Joined: Tue May 10, 2016 7:59 am

Re: No rrd files are generated in new services

Post by pucobre »

Hi good day.

The output is very extensive, is there any way to send the output to a file ?, adding "> output.txt" at the end does not work.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: No rrd files are generated in new services

Post by tgriep »

If you run the command like below, it should create a log file called mrtg.txt in the /tmp folder.

Code: Select all

LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg -debug=cfg,base &> /tmp/mrtg.txt
Then you can upload the file to this post so we can review it.
Be sure to check out our Knowledgebase for helpful articles and solutions!
pucobre
Posts: 12
Joined: Tue May 10, 2016 7:59 am

Re: No rrd files are generated in new services

Post by pucobre »

I send the file
Thank you

p.d: I moved the files "xxxx" and now are generating rrd files, can that be the problem?
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: No rrd files are generated in new services

Post by tgriep »

If one of the 172.16.80.6_xxxxx config files were corrupted, yes that could of stopped mrtg from running and updating the rrd files.
I just want to verify, are the rrd files updating now except for the ones you moved??
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked