how to configure MRTG for multiple nodes

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.
barry1946
Posts: 32
Joined: Wed Aug 14, 2013 11:29 am

Re: how to configure MRTG for multiple nodes

Post by barry1946 »

at the blink of an eye.I mean i change it to nagios.nagios then I do ls -l and it is ... root.root
so if we could solve this issue of re-return , maybe we can solve the problem!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: how to configure MRTG for multiple nodes

Post by tmcdonald »

What command are you using? Are you typing "nagios.nagios" or "nagios:nagios"?
Former Nagios employee
barry1946
Posts: 32
Joined: Wed Aug 14, 2013 11:29 am

Re: how to configure MRTG for multiple nodes

Post by barry1946 »

nagios.nagios
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: how to configure MRTG for multiple nodes

Post by abrist »

hmmm. mrtg is usually processed on a cron. I wonder if the cron is not setting the proper permissions. What is the output of:

Code: Select all

cat /etc/cron.d/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.
barry1946
Posts: 32
Joined: Wed Aug 14, 2013 11:29 am

Re: how to configure MRTG for multiple nodes

Post by barry1946 »

*/5 * * * * root /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok

actually this is the original line that were automatically created after installing mrtg and I just uncommented it
there are plenty of suggestion out in the wild and I do not know which one to take.
I appreciate your suggestion for the cron.d/mrtg correct entry in this regard
barry1946
Posts: 32
Joined: Wed Aug 14, 2013 11:29 am

Re: how to configure MRTG for multiple nodes

Post by barry1946 »

I think the .log file becomes root:root because of the crond,
because the cron I set to 1 minute check after 1 minute the .log file in /var/www/mrtg/ becomes -rw-r--r--
also cron says: LANG=C LC_ALL=C /usr/bin/mrtg /etc/mrtg/mrtg.cfg --lock-file /var/lock/mrtg/mrtg_l --confcache-file /var/lib/mrtg/mrtg.ok
content-type: type: text/plain;charset=UTF-8
I really need to solve this issue, I need help
barry1946
Posts: 32
Joined: Wed Aug 14, 2013 11:29 am

Re: how to configure MRTG for multiple nodes

Post by barry1946 »

I did LANG=en_US
export LANG
but still unable to open logfile for mrtftraf
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: how to configure MRTG for multiple nodes

Post by abrist »

What are the permission on check_mrtgtraf?

EDIT: And your umask settings:

Code: Select all

umask
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.
barry1946
Posts: 32
Joined: Wed Aug 14, 2013 11:29 am

Re: how to configure MRTG for multiple nodes

Post by barry1946 »

it is 0022
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: how to configure MRTG for multiple nodes

Post by abrist »

What about check_mrtgtraf?

Code: Select all

ls -la /usr/local/nagios/libexec/check_mrtgtraf
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.
Locked