Help!?

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
JW21a
Posts: 22
Joined: Mon Feb 18, 2013 1:10 pm

Re: Help!?

Post 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 ..
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Help!?

Post by abrist »

The mrtg folders *should* be auto-created. You have to wait until 2 checks for each service have been received.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
JW21a
Posts: 22
Joined: Mon Feb 18, 2013 1:10 pm

Re: Help!?

Post 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 ********
JW21a
Posts: 22
Joined: Mon Feb 18, 2013 1:10 pm

Re: Help!?

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Help!?

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
JW21a
Posts: 22
Joined: Mon Feb 18, 2013 1:10 pm

Re: Help!?

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Help!?

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
JW21a
Posts: 22
Joined: Mon Feb 18, 2013 1:10 pm

Re: Help!?

Post by JW21a »

Status:

susetestbox:~ # cat /etc/cron*/* | grep mrtg
susetestbox:~ #
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Help!?

Post by abrist »

It looks like you do not have any cron jobs setup for mrtg. How did you install core?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
JW21a
Posts: 22
Joined: Mon Feb 18, 2013 1:10 pm

Re: Help!?

Post by JW21a »

Reviewing the instruction from this website:
http://nagios.sourceforge.net/docs/3_0/ ... nsuse.html
Locked