[mrtg] mrtg-mysql-load not returning usable data?

Alex Franks arfranks at gmail.com
Wed Jan 24 03:02:39 MET 2007


Hi again everyone. I've seen some activity on this list recently so I
thought I'd ask a question again that I asked a couple months ago.

Since then I've upgraded to mrtg 2.15.0, which I believe is the newest
version. However, I'm still having the problems I was having before.

I'm trying to get data from mrtg-mysql-load from a different machine. I can
run mrtg manually (using the same mrtg.cfg and with the identical command
that the cron job runs) and it will generate some info in the log file:

1169603819 2896787 1046
1169603819 0 0 0 0
1169603720 0 0 0 0
1169603700 0 0 0 2
1169603400 0 2 0 2
1169603100 0 2 0 2
1169602800 0 2 0 2
1169602500 0 2 0 2
1169602200 0 1 0 2
1169601900 0 0 0 0

However, when the job runs via crontab, it becomes this:

1169604001 -1 -1
1169604001 0 0 0 0
1169603819 0 0 0 0
1169603700 0 0 0 2
1169603400 0 2 0 2
1169603100 0 2 0 2
1169602800 0 2 0 2
1169602500 0 2 0 2
1169602200 0 1 0 2
1169601900 0 0 0 0

And I get a nasty error in /var/log/mrtg.log:

2007-01-23 18:00:01 -- 2007-01-23 18:00:00: WARNING: Could not get any data
from external command '/usr/local/bin/mrtg-mysql-load -c
/www/shoegoo.soletechnology/docs/mrtg/mysql-load.cfg'
Maybe the external command did not even start. ()

2007-01-23 18:00:01 -- 2007-01-23 18:00:00: WARNING: Problem with External
get '/usr/local/bin/mrtg-mysql-load -c
/www/shoegoo.soletechnology/docs/mrtg/mysql-load.cfg':
   Expected a Number for 'in' but nothing'

2007-01-23 18:00:01 -- 2007-01-23 18:00:00: WARNING: Problem with External
get '/usr/local/bin/mrtg-mysql-load -c
/www/shoegoo.soletechnology/docs/mrtg/mysql-load.cfg':
   Expected a Number for 'out' but nothing'

2007-01-23 18:00:02 -- 2007-01-23 18:00:02: ERROR:
Target[shoeshine_mysqlload][_IN_] ' $target->[12]{$mode} ' did not eval into
defined data
2007-01-23 18:00:02 -- 2007-01-23 18:00:02: ERROR:
Target[shoeshine_mysqlload][_OUT_] ' $target->[12]{$mode} ' did not eval
into defined data

How are these two different?! Why would running the command manually and the
crontab running the command have any different effect?

If anyone has some insight into this I'd greatly appreciate it.

Thanks!
Alex

On 11/22/06, Alex Franks <arfranks at gmail.com> wrote:
>
> I've poured through all the web archives, online forums and anything
> else I could find, but still no solution has arisen.
>
> I'm using:
> mrtg-mysql-load 1.02 (newest version I think?)
> mrtg-2.15.0
> mysql-4.1.18-log
>
> YES, my mrtg installation works just fine for other graphic stats,
> including things that don't come from my router (apache stats). I'm
> *pretty sure* mrtg-mysql-load works as well, because when I run it
> from the command line (outside of the cron job that runs mrtg) I get
> the version information and uptime on the html page mrtg creates for
> mysql load, but no data.
>
> I've read that mrtg-mysql-load was designed for mysql 3.23.? so
> perhaps that's not helping either.
>
> And this shows up in the /var/log/mrtg.log:
>
> 2006-11-22 15:40:01 -- Wednesday, 22 November 2006 at 15:40: WARNING:
> Could not get any data from external command
> '/usr/local/bin/mrtg-mysql-load -c
> /www/shoegoo.soletechnology/docs/mrtg/mysql-load.cfg'
> Maybe the external command did not even start. ()
>
> 2006-11-22 15:40:01 -- Wednesday, 22 November 2006 at 15:40: WARNING:
> Problem with External get '/usr/local/bin/mrtg-mysql-load -c
> /www/shoegoo.soletechnology/docs/mrtg/mysql-load.cfg':
>    Expected a Number for 'in' but nothing'
>
> 2006-11-22 15:40:01 -- Wednesday, 22 November 2006 at 15:40: WARNING:
> Problem with External get '/usr/local/bin/mrtg-mysql-load -c
> /www/shoegoo.soletechnology/docs/mrtg/mysql-load.cfg':
>    Expected a Number for 'out' but nothing'
>
> 2006-11-22 15:40:01 -- Wednesday, 22 November 2006 at 15:40: ERROR:
> Target[shoeshine_mysqlload][_IN_] ' $target->[11]{$mode} ' did not
> eval into defined data
> 2006-11-22 15:40:01 -- Wednesday, 22 November 2006 at 15:40: ERROR:
> Target[shoeshine_mysqlload][_OUT_] ' $target->[11]{$mode} ' did not
> eval into defined data
>
> I'm somewhat new to mrtg, so if this is an obvious, n00b question,
> I'll happily take the abuse in order to get this thing working.
>
> Thanks
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.oetiker.ch/pipermail/mrtg/attachments/20070123/699b84be/attachment.html 


More information about the mrtg mailing list