[mrtg] Re: Problem please Help

Jelle Beusen beusen25 at zonnet.nl
Tue Oct 10 12:02:22 MEST 2000


if you run the script from mrtg then the value should go into mrtg !!! but
don't forget you need 4 not 1 !!!!!

I do basicly the same but I use perl do execute the command and then I get
and echo back from the command and I just use 4 of the values !!

Do you have the possibility to run perl scripts ?

Straight out of the manual :)

#!/usr/bin/perl
$username = yourname
$passwd = yourpassword
use Net::Telnet ();
        $t = new Net::Telnet (Timeout => 10,
                              Prompt => 'yourprompt $/');
        $t->open("ipadress");
        $t->login($username, $passwd);
        @lines = $t->cmd("yourcommand");
        print @lines;

----- Original Message -----
From: "Schoepf Hans Peter" <pety at dnet.it>
To: <mrtg at list.ee.ethz.ch>
Sent: Tuesday, October 10, 2000 11:57 AM
Subject: [mrtg] Problem please Help


>
> Hello!
>
> When i execute a telnet script in mrtg than mrtg can read the value.
> Normale when i make a telnet on the macchine i becoume this value:
> Trying 0.0.0.0...
> Connected to mymacchine.hallo.com.
> Escape character is '^]'.
>       64
> Connection closed by foreign host.
>
> How can i but this value 64 in the mrtg?
>
> Thank you very much
> Peter
>
>
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> Archive     http://www.ee.ethz.ch/~slist/mrtg
> FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
>



--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list