Giter VIP home page Giter VIP logo

Comments (4)

tonydm avatar tonydm commented on July 22, 2024

Hi leostero,

I would check the raw result of the query from the router, @output. Uncomment the debug code on line 132. Run smokeping and check the log for the raw output. If there's a result, then the next place to look would the be @times value. It's a result of parsing @output for just the time data. If the @output data is not blank but is for some reason oddly formatted and does not pass the regex filter on each line of @output, @times would be invalid and also result in a blank got.

if ( $psource ) {
  @output = $ssh->capture("ping $dest count=$pings size=$bytes src-address=$psource");
} else {
  @output = $ssh->capture("ping $dest count=$pings size=$bytes");
}

if ($ssh->error) {
  $self->do_log( "OpenSSHMikrotikRouterOSPing running commands on $source: ".$ssh->error );
  return ();
};

# Debug
# $self->do_log(Dumper \@output);```

from smokeping-opensshmikrotikrouterosping.

tonydm avatar tonydm commented on July 22, 2024

It also occurred to me to consider a more obvious reason. It's happened to me, that I over looked a miss config in the target config. Please also ensure the Target source, (Optional: psource) and host are correct. I've fat fingered things that technically still made a valid config but would fail to ping on the router. Then tested from router it worked. Then found my config error. Just making sure we've not overlooked the obvious since it's always the obvious we overlook first.

from smokeping-opensshmikrotikrouterosping.

leostereo avatar leostereo commented on July 22, 2024

Dear tony , Today I continue debugin this issue:
I uncommented the line 132 as you mentioned but can not read the output. where should I look for it ?
What Im doing is running:
./smokeping --debug
from the smokeping binary folder , but output is same here ... and there is nothing at smoke.log file nor meesage.

Target:
Already checked target multiple times just in case and for instance, this works:
++++ ROOT_SERVER_L menu = ROOT_SERVER_L title = ROOT_SERVER_L - 199.7.83.42 probe = OpenSSHMikrotikRouterOSPing ssh_port = 22000 host = 199.7.83.42 source = 172.17.50.1 psource = 90.94.186.18
but this one does not:
++++ ROOT_SERVER_A menu = ROOT_SERVER_A title = ROOT_SERVER_A - 198.41.0.4 probe = OpenSSHMikrotikRouterOSPing ssh_port = 22000 host = 98.41.0.4 source = 172.17.50.1 psource = 90.94.186.18
Then I set forks to 20 just to try.
And finally, tryed without specify psource:
Here the output is ok but then I got another error when updating rrd file:
Aug 24 10:57:56 UBUNTU-SMOKE-CORE smokeping[13564]: RRDs::update ERROR: /var/lib/smokeping/PROVEDORES/ITX_LIC/ROOT_SERVERS/ROOT_SERVER_A.rrd: found extra data on update argument: 1.7800000000e-01

Then , installed smokeping on fresh ubuntu server but have same behavuiour.

Any , thanks for listening, I will continue debuggin this.
Leandro

from smokeping-opensshmikrotikrouterosping.

tonydm avatar tonydm commented on July 22, 2024

Hi leostereo,

To further assist you...

Smokeping by default does not create a log file, it will only output to stdout/stderr. You must specify the logfile option on the command line with smokeping.

smokeping --debug --logfile=/tmp/smokeping.log

Alternatively, you can log any output you wish to a user specified file by adding this code to your probe file. This will allow you to separate out just the information you're interested in vs all of the smokeping logging data. In this case insert it at line 130 in the OpenSSHMikrotikRouterOSPing.pm file. Be sure to uncomment line #24 so that the Data::Dumper module is loaded. If you still don't see any data from the @output variable in your logfile, then the problem isn't the probe or Smokeping, but with the OpenSSH library and/or the router and/or target host itself. If you do see data from the @output variable, add the custom log code snippet below the @times loop to determine the result of @times which is returned to smokeping to then process and update the rrd file.

my $filename = "/tmp/mydebugfile.log";
open(FH, '>', $filename) or warn $!;
print FH "Result of \@output...\n";
print FH Dumper \@output;
close(FH);

Best

from smokeping-opensshmikrotikrouterosping.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.