Page 2 of 3

Re: Help!?

Posted: Mon Mar 04, 2013 3:30 pm
by JW21a
The task has been completed.

Will the file automatically be created, or do I have to create the file?

Status:
susetestbox:/usr/local/nagios/etc/objects # ls -la /var/lib/ | grep mrtg
drwxr-xr-x 1 nagios nagios 0 Mar 4 16:31 mrtg

susetestbox:/usr/local/nagios/etc/objects # ls -la /var/lib/mrtg
total 0
drwxr-xr-x 1 nagios nagios 0 Mar 4 16:31 .
drwxr-xr-x 1 root root 1200 Mar 4 16:31 ..

Re: Help!?

Posted: Mon Mar 04, 2013 3:42 pm
by abrist
The mrtg folders *should* be auto-created. You have to wait until 2 checks for each service have been received.

Re: Help!?

Posted: Tue Mar 05, 2013 9:46 am
by JW21a
It seems that the graph charts are not generating at all, even though the mrtg directory was created yesterday and mrtg was installed since January.

susetestbox:/var/lib/mrtg # ps flax | grep nagios
0 0 31451 24585 20 0 2528 488 - S+ pts/0 0:00 \_ grep --color=auto nagios
5 113 2062 1 20 0 4088 16 - Ss ? 1:11 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
1 113 12989 1 20 0 11276 1328 - Ssl ? 0:59 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg

susetestbox:/var/lib/mrtg # ls -al /var/lib/mrtg/
total 0
drwxr-xr-x 1 nagios nagios 0 Mar 4 16:31 .
drwxr-xr-x 1 root root 1200 Mar 4 16:31 ..


I do not know if this is the problem, but I do not know if I have to manually configured each log file:
susetestbox:/usr/local/nagios/lib # more check_mrtg

******** check_mrtg: Not a text file ********


susetestbox:/usr/local/nagios/lib # more check_mrtgtraf

******** check_mrtgtraf: Not a text file ********

Re: Help!?

Posted: Tue Mar 05, 2013 9:50 am
by JW21a
Also, MRTG is running as well:

susetestbox:/usr/local/nagios/etc/objects # ps flax | grep mrtg
0 0 32749 24585 20 0 2528 488 pipe_w S+ pts/0 0:00 \_ grep --color=auto mrtg

Re: Help!?

Posted: Tue Mar 05, 2013 5:12 pm
by abrist
Run this command to update mrtg log file.

Code: Select all

env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
Check crond to make sure you have a few entries that reseble:

Code: Select all

/5 * * * * /usr/bin/env LANG=C /usr/bin/mrtg /etc/mrtg/mymrtg.cfg –logging /var/log/mrtg.log
*/5 * * * * /usr/bin/env LANG=C /usr/bin/mrtg /etc/httpd/conf/mrtg.cfg --logging /var/log/mrtg.log

Re: Help!?

Posted: Wed Mar 06, 2013 8:49 am
by JW21a
susetestbox:/usr/local/nagios/etc/objects # env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
2013-03-06 09:25:35: ERROR: Creating templock /etc/mrtg/mrtg.cfg_l_22680: No such file or directory at /usr/bin/mrtg line 1969.

susetestbox:/usr/local/nagios/etc/objects # grep mrtg
^C
susetestbox:/usr/local/nagios/etc/objects # cd


susetestbox:~ # grep mrtg
^C

susetestbox:~ # susetestbox:/usr/local/nagios/etc/objects # env LANG=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg
-bash: susetestbox:/usr/local/nagios/etc/objects: No such file or directory


susetestbox:~ # 2013-03-06 09:25:35: ERROR: Creating templock /etc/mrtg/mrtg.cfg_l_22680: No such file or directory at /usr/bin/mrtg line 1969.
If '2013-03-06' is not a typo you can use command-not-found to lookup the package that contains it, like this:
cnf 2013-03-06


susetestbox:~ # */5 * * * * /usr/bin/env LANG=C /usr/bin/mrtg /etc/httpd/conf/mrtg.cfg --logging /var/log/mrtg.log
-bash: */5: No such file or directory


susetestbox:~ # /5 * * * * /usr/bin/env LANG=C /usr/bin/mrtg /etc/mrtg/mymrtg.cfg .logging /var/log/mrtg.log
-bash: /5: No such file or directory

Re: Help!?

Posted: Wed Mar 06, 2013 11:32 am
by abrist
abrist wrote: Check crond to make sure you have a few entries that reseble:

Code: Select all

/5 * * * * /usr/bin/env LANG=C /usr/bin/mrtg /etc/mrtg/mymrtg.cfg –logging /var/log/mrtg.log
*/5 * * * * /usr/bin/env LANG=C /usr/bin/mrtg /etc/httpd/conf/mrtg.cfg --logging /var/log/mrtg.log
These are lines in a cron file, not commands. To possibly see if you have any of these entries, run:

Code: Select all

cat /etc/cron*/* | grep mrtg

Re: Help!?

Posted: Wed Mar 06, 2013 2:05 pm
by JW21a
Status:

susetestbox:~ # cat /etc/cron*/* | grep mrtg
susetestbox:~ #

Re: Help!?

Posted: Wed Mar 06, 2013 2:27 pm
by abrist
It looks like you do not have any cron jobs setup for mrtg. How did you install core?

Re: Help!?

Posted: Fri Mar 08, 2013 8:38 am
by JW21a
Reviewing the instruction from this website:
http://nagios.sourceforge.net/docs/3_0/ ... nsuse.html