Giter Club home page Giter Club logo

fty-discovery's Introduction

fty-discovery

it discovers power devices (ups, epdu, ats) over the network and publishes new device element in the asset DB.

The default configuration values are in fty-discovery.cfg file (section default)

How to build

To build fty-discovery project run:

./autogen.sh [clean]
./configure
make
make check # to run self-test

How to run

To run fty-discovery project:

from within the source tree, run:

./src/fty-discovey

The available options are:

  • -v for verbose mode;
  • -r [subnet] to scan the subnet (192.168.1.0/24 format);
  • -c [file] to define a config file;
  • -a for agent mode.

If neither -a nor -r options are present, scan of all attached networks (localscan) will be performed.

from an installed base, using systemd, run:

systemctl start fty-discovery

Protocols

Mailbox requests

It is possible to request the agent discovery for:

  • launch a scan based on the configuration;
  • get the progression of the scan;
  • stop a scan.

Launch the scan configured

The USER peer sends the following messages using MAILBOX SEND to fty-discovery peer:

  • LAUNCHSCAN/<correlation_id>

The fty-discovery peer MUST respond with one of the messages back to USER peer using MAILBOX SEND.

  • <correlation_id>/OK
  • <correlation_id>/ERROR
  • <correlation_id>/RUNNING
  • <correlation_id>/STOPPING

RUNNING reply means an other scan curently running. STOPPING reply means an other scan is currently stopping. ERROR reply can be occur if config file is missformed.

Get the progression of the current scan

The USER peer sends the following messages using MAILBOX SEND to fty-discovery peer:

  • PROGRESS/<correlation_id>

The fty-discovery peer MUST respond with one of the messages back to USER peer using MAILBOX SEND.

  • <correlation_id>/OK/'-1'
  • <correlation_id>/OK/<status>/<percent>/<nb of discovered devices>/<nb of discovered ups>/<nb of discovered epdu>/<nb of discovered sts>
  • <correlation_id>/ERROR

Where

  • 'status' is the current status of the scan. It can be '1' for "cancelled by user", '2' for "terminated" and '3' for "in progress"
  • 'percent' the percent number of the scan progression
  • 'nb of discovered devices' is the number of all the discovered devices
  • each 'nb of discovered [...]' are the number of specific type of discovered device.

<correlation_id>/OK/'-1' occur if no scan has been launched yet.

Stop the current scan

The USER peer sends the following messages using MAILBOX SEND to fty-discovery peer:

  • STOPSCAN

The fty-discovery peer MUST respond with one of the messages back to USER peer using MAILBOX SEND.

  • OK

fty-discovery's People

Contributors

barraudl avatar geraldguillaume avatar jana-rapava avatar jimklimov avatar aquette avatar thalman avatar eldoreijk avatar mimixav avatar nicodav avatar

Watchers

James Cloos avatar

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.