Page 2 of 3
Re: No rrd files are generated in new services
Posted: Thu May 12, 2016 2:52 pm
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"
Re: No rrd files are generated in new services
Posted: Thu May 12, 2016 5:00 pm
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
Re: No rrd files are generated in new services
Posted: Fri May 13, 2016 8:09 am
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
Re: No rrd files are generated in new services
Posted: Fri May 13, 2016 11:27 am
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
Re: No rrd files are generated in new services
Posted: Fri May 13, 2016 3:55 pm
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
Re: No rrd files are generated in new services
Posted: Mon May 16, 2016 2:45 am
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?
Re: No rrd files are generated in new services
Posted: Mon May 16, 2016 8:32 am
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.
Re: No rrd files are generated in new services
Posted: Mon May 16, 2016 8:49 am
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.
Re: No rrd files are generated in new services
Posted: Mon May 16, 2016 12:15 pm
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?
Re: No rrd files are generated in new services
Posted: Mon May 16, 2016 1:31 pm
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??