Giter VIP home page Giter VIP logo

smokeping-opensshmikrotikrouterosping's People

Contributors

ctc avatar tonydm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

8023 ctc

smokeping-opensshmikrotikrouterosping's Issues

Feature Request - Ping Results to Multiple Nodes

Hello,

Is there a way to configure this probe to allow a single probe to report on the results of multiple IPs? For instance, the probe connects to a MikroTik router, then runs and gets ping results from IPs x.x.x.x, x.x.x.y, x.x.x.z, and so forth?

Or can multiple probes be spawned to connect to the same router simultaneously to run these tests?

If either of these is possible, how would you format the SmokePing config file to accomplish this?

Thank you.

multiplex_ssh collides

Seems multiplex_ssh collides if there a many same hosts and threads.

OpenSSHMikrotikRouterOSPing: OpenSSHMikrotikRouterOSPing connecting 10.0.101.38: unable to establish master SSH connection: bad ssh master at /var/lib/smokeping/.libnet-openssh-perl/[email protected] socket owned by pid 318032 (pid 317986 expected)
OpenSSHMikrotikRouterOSPing: OpenSSHMikrotikRouterOSPing connecting 10.0.101.38: unable to establish master SSH connection: bad ssh master at /var/lib/smokeping/.libnet-openssh-perl/[email protected] socket owned by pid 318032 (pid 317980 expected)

Directory '/var/run/smokeping' does not exist

In ubuntu 20.0.4 LTS when i add the probe:

+ OpenSSHMikrotikRouterOSPing
routerospass = pswd
routerosuser = smokeping
source = 192.168.5.39

I get the error in web page:
ERROR: /etc/smokeping/config.d/pathnames, line 5: Directory '/var/run/smokeping' does not exist

1 ms ping accuracy

The graphs show that the Mikrotik rounds the ping times and so on the one hand it is very ugly and on the other hand not accurate enough that way. Couldn't somehow get the Mikrotik to ping more accurately?

I found in Mikrotik 6.44 changelog:

speedtest - added "/tool speed-test" for ping latency, jitter, loss and TCP and UDP download, upload speed measurements (CLI only);

This gives the following output:

[admin@mikrotik] > /tool speed-test 192.168.88.2 duration=5 without-paging
          status: ping
  time-remaining: 55s
            loss: 100% (1/1)

              status: ping
      time-remaining: 54s
    ping-min-avg-max: 860us / 1.09ms / 3.93ms
  jitter-min-avg-max: 0s / 352us / 2.97ms
                loss: 0% (0/21)

              status: ping
      time-remaining: 53s
    ping-min-avg-max: 856us / 1.04ms / 3.93ms
  jitter-min-avg-max: 0s / 257us / 2.97ms
                loss: 0% (0/41)

              status: ping
      time-remaining: 52s
    ping-min-avg-max: 852us / 1.01ms / 3.93ms
  jitter-min-avg-max: 0s / 191us / 2.97ms
                loss: 0% (0/61)

              status: ping
      time-remaining: 51s
    ping-min-avg-max: 852us / 989us / 3.93ms
  jitter-min-avg-max: 0s / 159us / 2.97ms
                loss: 1.23% (1/81)

Im getting empty response from specific hosts

Let me show:
After running smokeping --debug comand I can see:
OpenSSHMikrotikRouterOSPing: 172.22.255.250: got 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 0.0000000000e+00 OpenSSHMikrotikRouterOSPing: 194.41.0.4: got
as you can see first host is ok but second is not.
I already tryed running manually the:
ping 198.41.0.4 count=20 size=56 src-address=190.94.186.XX
from router and from server
/usr/bin/ssh -S /tmp/.libnet-openssh-perl/1eaf789b53c5273c7d488469dded4e80 -l smokeping -p 22000 172.17.50.1 -- ping 198.41.0.4 count=20 size=56 src-address=190.94.186.XX

Both works ok , but smokeping plug in can not get usable output.
Dont know what else to check.

OpenSSH Error

Sep 28 13:47:05 Smokeping smokeping[36093]: Use of uninitialized value $call[3] in exec at /usr/local/share/perl/5.28.1/Net/OpenSSH.pm line 1014.
Sep 28 13:47:05 Smokeping smokeping[36091]: OpenSSHMikrotikRouterOSPing: OpenSSHMikrotikRouterOSPing connecting 208.89.144.11: unable to establish master SSH connection: bad password or master process exited unexpectedly

I did verify that the OpenSSH client was installed.

Typo in the readme

In the Multiplexed SSH Connections section of the readme the setting is called multiplex_socket_file_path
Later in the example of the Probes file it is called multiplex_control_file_path
And finally, in the code, it is called multiplex_control_socket_path

Reusing ssh connections

Hello dear Tony.
I would like to modify your module so we can reuse ssh connections (master mode).
After reading Net::OpenSSH documentation tryed to tweat OpenSSH objects parameters but can not get them reuse connections.
This is what I have so far:

my $ssh = Net::OpenSSH->new(
   $source,
   $login ? ( user => $login ) : (),
   $password ? ( password => $password ) : (),
   #external_master => 1,
   port => $port,
   timeout => 60,
   strict_mode => 0,
   kill_ssh_on_timeout => 1,
   ctl_dir => "/tmp/.libnet-openssh-perl",
   #ctl_path => "reusable_path",
   master_opts => [-o => "StrictHostKeyChecking=no"],
   ssh_cmd => $ssh_cmd
 );

Im playing with ctl_path , master_opts and external_master values , but it is not working
Please take a look to following perlmonk node as well:
https://www.perlmonks.org/?node_id=11122369
I will try to make more tests today and let you know if have some improvement.
Leandro.

adding second optional parameter

Dear tony.
Sorry ... its me again.
I will try to modify your pm module to accept a second optinal parameter.
I found very usefull to set the "routing-table" while ping.
This force router to send ping over not active default route.
For example to exec this:
ping 8.8.8.8 routing-table=uen_itx

so I will try:
line 86
my $rtable = $target->{vars}{rtable};

and line 122

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

This definition does not work:

+ ROUTE_TEST
menu = ROUTE_TEST
probe = OpenSSHMikrotikRouterOSPing
title = google_x_itx
ssh_port = 22000
host = 8.8.8.8
source = 10.20.20.4
rtable = uen_itx

it yelds: unknown variable 'rtable'".
Can you help me ?

Regards.
Leandro.

Unexpected Packet Loss?

The plugin debugging shows no packetloss, but Smokeping's UI is showing 50% packetloss.

My assumption (I'm no developer) is that the plugin is only sending 20 pings worth of data back to Smokeping. RouterOS paginates the results, so it seems like we're grabbing the first 20 results and moving on.

My use case is having a nearly constant stream of pings. With the FPing plugin, I have step and pings set to 60. I think I have gaps in the data, due to having the same value, so when I saw that this plugin had a max of 50, I went down to 40 pings with a step of 50. I still get an error about reaching 80% of the polling round, but I don't think I'm actually losing any data. I may have to drop that further to not fill my logs with warnings.

As a workaround, I could likely drop down to 20 pings with a step of 26 to both be under the 20 max and under the 80% warning level, but I assume that would increase the load on the poller. My intent is to end up having dozens or hundreds of tests being done concurrently, so that would end up being a consideration.

Smokeping Router OS Pagination.txt
Rochelle_Lab_last_10800

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.