Some follow-up. I had missed the debug option in your post, so I added
it, and got considerably more data, but I noticed one thing: the
mrtg_genstats.log file is only updating when I run /usr/local/bin/mrtg
from the command line. It's not updating at all when I run mrtg-rrd.cgi
either from the command line or from within OpsView.

 

 

________________________________

From: opsview-users-boun...@lists.opsview.org
[mailto:opsview-users-boun...@lists.opsview.org] On Behalf Of Strawser,
Eric
Sent: Wednesday, November 25, 2009 8:38 AM
To: Opsview Users
Subject: Re: [opsview-users] mrtg-rrd.cgi "Error: No MRTG data
available."

 

Thank you, Duncs. I have logging on, and it's only showing that mrtg
started:

 

[r...@montest ~]# tail /usr/local/nagios/var/log/mrtg_genstats.log

2009-11-25 07:45:02 -- Started mrtg with config
'/usr/local/nagios/etc/mrtg.cfg'

2009-11-25 07:50:01 -- Started mrtg with config
'/usr/local/nagios/etc/mrtg.cfg'

2009-11-25 07:55:01 -- Started mrtg with config
'/usr/local/nagios/etc/mrtg.cfg'

2009-11-25 08:00:02 -- Started mrtg with config
'/usr/local/nagios/etc/mrtg.cfg'

2009-11-25 08:05:02 -- Started mrtg with config
'/usr/local/nagios/etc/mrtg.cfg'

2009-11-25 08:10:01 -- Started mrtg with config
'/usr/local/nagios/etc/mrtg.cfg'

2009-11-25 08:15:01 -- Started mrtg with config
'/usr/local/nagios/etc/mrtg.cfg'

2009-11-25 08:20:01 -- Started mrtg with config
'/usr/local/nagios/etc/mrtg.cfg'

2009-11-25 08:25:01 -- Started mrtg with config
'/usr/local/nagios/etc/mrtg.cfg'

2009-11-25 08:30:02 -- Started mrtg with config
'/usr/local/nagios/etc/mrtg.cfg'

 

 

 

/usr/local/nagios/bin/mrtg_genstats.sh contains the following:

 

[ -f $HOME/.bash_profile ] && . $HOME/.bash_profile

[ -z "$PERL5LIB" ] && [ -f $HOME/.profile ] && . $HOME/.profile

 

if [ -f /usr/local/nagios/etc/mrtg.cfg -a -s
/usr/local/nagios/etc/mrtg.cfg ] ; then

        LANG=C mrtg /usr/local/nagios/etc/mrtg.cfg --logging
/usr/local/nagios/var/log/mrtg_genstats.log

Fi

 

 

 

/usr/local/nagios/etc/mrtg.cfg exists, and is the cfg mentioned in the
original post. /usr/local/nagios/var/log/mrtg_genstats.log has nothing
valuable in it, just noting that mrtg is starting, but I still get
"Error: No MRTG data available." Any time I run mrtg-rrd.cgi. I looked
through the mrtg-rrd.cgi, and I see where the error is coming from:

 

    print_error("No MRTG data available.")

        unless $stat && defined $targets{$stat};

 

 

But I don't know why it's failing that $stat && defined $targets test.

 

 

 

________________________________

From: opsview-users-boun...@lists.opsview.org
[mailto:opsview-users-boun...@lists.opsview.org] On Behalf Of Duncan
Ferguson
Sent: Wednesday, November 25, 2009 4:37 AM
To: Opsview Users
Subject: Re: [opsview-users] mrtg-rrd.cgi "Error: No MRTG data
available."

 

 

On 24 Nov 2009, at 15:13, Strawser, Eric wrote:

 

Hi.

 

I've been trying to get OpsView running, but mrtg is failing. MRTG
works, itself, and produces graphs if I run it from the command line,
like this:

 

mrtg /usr/local/nagios/share/mrtg/mrtg.cfg

 

I put that in a loop and ran it for a while and got traffic graphs from
it.

 

 

I would suggest amending mrtg_genstats.sh to add 

 

--logging /tmp/mrtg.out --debug="cfg,base,eval"

 

as options to mrtg and seeing what is logged.

 

  Duncs

 
-- 

Duncan Ferguson
Senior Developer


 



Opsera Limited | Unit 69 Suttons Business Park
Reading | Berkshire | RG6 1AZ | UK

Phone:   +44 (0) 845 057 7887
Mobile:   +44 (0) 7968 148 748
Skype:   duncan_j_ferguson     Email:   duncan.fergu...@opsera.com
www.opsera.com <http://www.opsera.com/> 

 

Opsera Limited is registered in the UK under Company Number 5396532. Our
registered office is Gorse View, Horsell Rise, Woking, Surrey, GU21 4RB.

 

<<image001.gif>>

_______________________________________________
Opsview-users mailing list
Opsview-users@lists.opsview.org
http://lists.opsview.org/lists/listinfo/opsview-users

Reply via email to