Git Product home page Git Product logo

nettest-agent's Introduction

Choria Nettest agent

This is an agent that will execute a ping or remote connection test on mcollective hosts

I often find myself logging onto boxes to ping different sites to diagnose local or remote network issues, this means I can now just issue a single command and get results from anywhere Iโ€™m running mcollective.

Installation

This module depends on the Net::Ping Ruby gem which requires a C++ compiler to build.

Usage

ICMP ping test:

$ mco nettest ping hostname
Do you really want to perform network tests unfiltered? (y/n): y

 * [ ============================================================> ] 11 / 11

node1.example.net                        time = 0.429
node8.example.net                        time = 0.388
node5.example.net                        time = 0.686
node4.example.net                        time = 1.858
middleware.example.net                   time = 2.697
node7.example.net                        time = 0.637
node0.example.net                        time = 16.455
node9.example.net                        time = 1.974
node6.example.net                        time = 0.415
node3.example.net                        time = 0.389
node2.example.net                        time = 0.4

Summary of RTT:

   Min: 0.388ms  Max: 16.455ms  Average: 2.393ms


Finished processing 11 / 11 hosts in 85.76 ms

TCP connection test to port 8140:

$ mco nettest connect hostname 8140

Validator

The nettest agent supplies an fqdn validator which will validate if a string is a valid uri.

validate :fqdn, :nettest_fqdn

The nettest agent supplies a server address validator which will validate that a given string includes both a valid hostname and port number separated by a colon.

validate :serveraddress, :nettest_server_address

Data Plugin

The nettest agent also supplies a data plugin which uses the nettest agent to check if a connection to a fqdn at a specific port can be made. The data plugin will return 'true' or 'false' and can be used during discovery or any other place where the MCollective discovery language is used.

$ mco rpc rpcutil -S "Nettest('myhost', '8080').connect=true"

Mma Aggregate Plugin

The nettest agent supplies a mma aggregate plugin which will determine the minimum value, maximum value and average value of a set of inputs determinted in a DDL.

summarize do
  aggregate nettest_mma(:rtt, :format => "Min: %.3fms  Max: %.3fms  Average: %.3fms")
end

nettest-agent's People

Contributors

ripienaar avatar richardc avatar ploubser avatar melissa avatar smortex avatar bastelfreak avatar

Stargazers

David Hollinger III avatar

Watchers

 avatar  avatar James Cloos avatar David Hollinger III avatar

nettest-agent's Issues

support other ways to ping

net::ping now supports external, http, icmp, tcp, udp and wmi. should consider a way to support those too

Broken Archlinux support

this module tries to install net-ping with the puppet_gem provider. Archlinux doesn't use the AIO packages, so it has no vendored ruby version. All dependencies for choria need to be installed as packages, not gems. I want to contribute a fix for this, like I did it in choria-legacy/mcollective-choria#434, but the directory structure in this module is a bit confusing. Could you explain how the module is generated? I'm happy to submit patches.

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.