Skip to content

REST controlled remote ping agent. Developed by the University of Málaga.

License

Notifications You must be signed in to change notification settings

5genesis/Remote_Ping_Agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

77 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ping Agent

Requirements

Due to the different output format and parameters between the Windows and Linux versions of ping this agent can only be deployed on Linux.

Installing (development)

  1. Clone the repository to a known folder, e.g. in c:\malaga-platform
  2. Enter the folder
cd c:/malaga-platform/pingAgent
  1. Create a new Python virtualenv:
pip install virtualenv
virtualenv venv
  1. Activate the virtual environment:
source venv/bin/activate
  1. Install Python dependencies:
pip install -r requirements.txt
  1. Start the development server:
flask run

The app will start listening for requests on port 5000. Press Control+C to stop the development server.

Usage

The Ping Agent exposes a REST API with the following endpoints:

  • /Ping/<address>: Executes ping process to the given address. Returns a JSON reporting the success of the execution and a message. The following URL parameters can be used:
    • interval: Ping interval
    • size: Packet size
    • ttl: Time to Live
  • /Close: Closes ping process. Returns a JSON reporting the success of the process closure and a message.
  • /LastJsonResult: Retrieve the result of the previous executions. Returns a JSON reporting the success of the retrieval, a message and a list of Results (dictionary with parsed results).
  • /StartDateTime: Retrieve the date and time of the last execution. Returns a JSON reporting the success of the retrieval and a message informing of the date.
  • /IsRunning: Check if there is another execution running. Returns a JSON reporting the success of the check and a message informing if is running or not.

Authors

  • Gonzalo Chica Morales
  • Bruno Garcia Garcia

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

REST controlled remote ping agent. Developed by the University of Málaga.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages