Mrtg help...


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mrtg help...
# 1  
Old 07-13-2008
Mrtg help...

Hello All,


Can anyone tell me that how to make MRTG graph by picking values through a simple file. If you have such script of MRTG then please tell me the details.

Actually my scenarios is that i want to make a Graph through a simple file in which values randomly changes.

I hop you understand, what i am trying to explain..

Regards,
Waqas Ahmed
# 2  
Old 07-13-2008
Java

Definately do-able Smilie

In the place of your normal SNMP target line, add an entry to call your script thus:
Code:
Target[routername.yourname.com]: `/fully/path/to/your/script.sh parameters`

Then set your script up to return exactly 4 values, one per line:
  1. first value to graph
  2. second value to graph
  3. uptime string
  4. hostname (or application name)
You can leave out the second two output lines if you want, all it does it print "<hostname> has been up for <uptime string>" at the top of each graph.

Then it's just a matter to making a short script to get the relevant values out of your text file.
If the text file has one number per line and you know the line number to get, you can pull the info out via a shell script using:
Code:
head -<line number> <file> | tail -1

For anything more complex, I'd suggest awk within a shell script. For anything even more complex, switch to perl. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Red Hat

Why do we use RRDtool in MRTG?

Hi Guys, Why do we use RRDtool in MRTG? I have implemented MRTG for some routers, I have read some notes about RRDTOOL also but don't know what is use of these tool. Any one one please explain me the use of RRDTOOL in their own words? (1 Reply)
Discussion started by: manalisharmabe
1 Replies

2. Red Hat

Help me on MRTG

I have installed MRTG on my Linux 5.5 system. then i started copying data from the machine when MRTG is installed to another machine. I could see some changes in graphs. But can't understand what does that mean? Moreover how to see load on the system where MRTG is installed by copying files... (2 Replies)
Discussion started by: manalisharmabe
2 Replies

3. AIX

Want to use MRTG to Monitor AIX 6.1

hi, I used to use MRTG monitor Redhat, CentOS. But, i found that. I can't snmpwalk to my AIX 6.1 I want to know, how can I snmpwalk my AIX 6.1's CPU usage, Memory usage, New TCP connection, EST. TCP connection and the Harddisk Size....etc. thanks. (1 Reply)
Discussion started by: virusxx
1 Replies

4. Red Hat

MRTG Installation and Compilation Error

THESE ARE MY INFORMATION ABOUT MRTG AND LIBERIES. I have mrtg version “mrtg-2.17.2” Then after running :rpm -qa | grep gcc I got gcc-4.4.4-13.el6.x86_64 libgcc-4.4.4-13.el6.x86_64 libgcc-4.4.4-13.el6.i686 Then after running :rpm -qa | grep gd I got... (1 Reply)
Discussion started by: manalisharmabe
1 Replies

5. Infrastructure Monitoring

Cacti + MRTG + Nagios

hello all, could you please tell me how much time it will take setting up (for the first time) : MRTG, Cacti and Nagios on a network with ~25 routers and ~50 switches ? i am a bit familiar with perl and shell scripting. thanx in advance (3 Replies)
Discussion started by: OneDreamCloser
3 Replies

6. Linux

MRTG Problem

Dear All I have an E1 link (2Mbps) for the internet usage in my office. I have configured MRTG on Linux Proxy Machine and Router's serial interface. The problem that i have is some times in MRTG web page Bits per second increase up to 2.4 M or 4.8 M but it should not go over 2048 Kbps. How can... (0 Replies)
Discussion started by: surfer24
0 Replies

7. Cybersecurity

MRTG vs Nagios

hye all.. I like to know if anyone here can justify and make wise recommendation to me, whether to choose MRTG or NAGIOS as network Monitoring Performance. If can, is there any website that provide comparison for both of them? Ur help are highly appreciated.. Regards, ~unknown (1 Reply)
Discussion started by: unknown2205
1 Replies

8. IP Networking

MRTG in Unix Systems

Hi, I need help to discovery the correct MIB to monitoring CPU, Memory and Hard Disc in Unix. I get any MIB in the internet, but don´t work. Anybody help-me? Thanks. Marcio Dunder Perin (2 Replies)
Discussion started by: dunder
2 Replies
Login or Register to Ask a Question