Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-10-2004, 01:07 PM   #1
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Rep: Reputation: 31
MRTG getting output from scripts

There is written in the documentation that MRTG can write graphics based on output from external scripts instead of SNMP. 4 lines are needed as output:
Line 1
    current state of the first variable, normally 'incoming bytes count' 

Line 2
    current state of the second variable, normally 'outgoing bytes count' 

Line 3
    string (in any human readable format), telling the uptime of the target. 

Line 4
    string, telling the name of the target.
So I made the following script (/root/mrtg-test) and chmoded it +x:
echo 3027162
echo 0
echo 193.bla.bla.bla
It returns 4 lines of output, but nothing is drawn on the graphs after running mrtg on that config:
WorkDir: /var/www/htdocs/mrtg-test
options[_]: growright

Title[test]: Am testovo nekvo takova
Target[test]: `/root/mrtg-test`
MaxBytes[test]: 1250000000
PageTop[test]: <H2>Bla?</H2>
Max In: 0.0 B/s (0.0%) Average In: 0.0 B/s (0.0%) Current In: 0.0 B/s (0.0%)
Max Out: 0.0 B/s (0.0%) Average Out: 0.0 B/s (0.0%) Current Out: 0.0 B/s (0.0%)
IMHO, there should be 3027162 current value, but it is 0. Does anyone have an idea?
Old 08-12-2004, 06:23 AM   #2
Registered: Sep 2003
Location: Bulgaria
Distribution: Ubuntu 9.10, FreeBSD 7.2
Posts: 459

Original Poster
Rep: Reputation: 31
I made up my way, via using gauge option
Wow, how many things can be monitored via MRTG... I feel like a little child in a toy-shop


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
VPN: Debian Scripts -> Mandriva 2006 Scripts Undefined Mandriva 0 11-30-2005 01:10 PM
Mrtg Rrd Wrong Output renak Linux - Software 0 12-14-2004 03:43 AM
have apache deliver the output of perl cgi scripts immidiately fibbi Linux - Software 2 07-13-2004 01:17 PM
rrd mrtg & mrtg-rrd.cgi ducati620 Linux - Newbie 0 06-03-2004 08:29 PM
the sound gives output when using mic but no output when run a music file medo Debian 0 04-19-2004 08:17 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration