LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 08-10-2004, 01:07 PM   #1
ivanatora
Member
 
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:
Code:
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:
Code:
echo 3027162
echo 0
uptime
echo 193.bla.bla.bla
It returns 4 lines of output, but nothing is drawn on the graphs after running mrtg on that config:
Code:
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
ivanatora
Member
 
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
 
  


Reply


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


All times are GMT -5. The time now is 03:42 PM.

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