robotframework-remote-monitor-library


Namerobotframework-remote-monitor-library JSON
Version 2.2.0 PyPI version JSON
download
home_pagehttps://github.com/doguz2509/robotframework_system_trace_library
SummaryRobotFramework extended keyword library; Allow background system monitoring; aTop, Time, SSHLibrary
upload_time2021-05-04 18:02:50
maintainer
docs_urlNone
authorDmitry Oguz
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Remote Monitor Library (Version 2.2.0)

## Overview
RemoteMonitorLibrary allow collect system data of target linux host during any Robotframework 
testing process being running

### Architecture
Main keyword library executing background python threads for SqlLite db node, separate threads for system trace collecting 
plugins
By default library contain 'aTop'. 'atop' command being executing with predefined interval & its out put parsed as following:
#### aTop System Level
System level portion of 'atop' being storing in database, and later can be shown as chart in special html page
Link to it logged to robotframework regular log
#### aTop Process Level
TBD in future releases
#### PlugIn extension API
Library provide special API for create custom plugins (SystemTraceLibrary.api.[plugins, model])


## Installation

    python -m pip install robotframework-remote-monitor-library

## Usage

LibDoc: [Library documentation](RemoteMonitorLibrary.html)

### Test/Keywords within *.robot file

    *** Settings ***
    Library  RemoteMonitorLibrary 
    ...     [location (Default: logs)] 
    ...     [file_name (Default: system_trace.db)]
    ...     [cumulative (Default: False)]
    ...     [custom_plugins (Default: None)]

    Suite Setup  run keywords  Create host monitor  ${HOST}  ${USER}  ${PASSWORD}  [${PORT} (Default: 22)] 
    ...                 [alias=${SUITE_NAME} (Default: user@host)]
    ...          AND  Start monitor plugin  aTop  interval=1s
    Test Setup   Start period  ${TEST_NAME}
    Test Teardown  run keywords  Stop period   ${TEST_NAME}
    ...             AND  generate module statistics  ${TEST_NAME}
    Suite Teardown  Close host connection  alias=${SUITE_NAME}

    *** Tests ***
    Test
        Do something here

### PlugIn public API

SystemTraceLibrary allow creating extended plugins for trace customer purposes

#### Follow next guide:

##### Create python project 

    plug_in_python_project_folder

##### Create following files inside:

Main init project file for expose Plugin class

    __init__.py
        from .pluin_file import MyPlugInName

        __all__ = [MyPlugInName.__name__]

##### Runner definition

     from RemoteMonitorLibrary.api import plugins

     class MyPlugInName(plugins.PlugInAPI):
         # If constractor override required, keep following signature 
         def __init__(self, parameters, data_handler, host_id, **kwargs):
             plugins.PlugInAPI.__init__(self, parameters, data_handler, host_id=host_id, **kwargs)
             self._my_own_var = ...

         @staticmethod
         def affiliated_tables() -> Iterable[model.Table]:
             return my_plugin_table(),

         @staticmethod
         def affiliated_charts() -> Iterable[plugins.ChartAbstract]:
             return MyPlugInChart(),


##### Tables definition

     from RemoteMonitorLibrary.api import model

     class my_plugin_table(model.TimeReferencedTable / model.Table):
         def __init__(self):
             model.TimeReferencedTable.__init__(self, name='plugin_table',
                                                fields=[model.Field('field01'),
                                                        model.Field('field02'),
                                                        ...],
                                                queries=[model.Query('name', 'select * from table_name where field01 = {}')]
                                                )

     !!! PAY ATTENTION - TimeReferencedTable automatically add fields for reference table entries to time line 
     mechanism 
     In case it not requires, use model.Table base class

##### Parser definition

    from RemoteMonitorLibrary.api import plugins, model

    class my_parser(plugins.Parser):
         def __call__(*output) -> bool:
            table_template = self.table.template

            your_data = []
            for item in <data samples>:
               yuor_data.append(table_template(*item))

            data_unit = model.DataUnit(self.table, *your_data)
            self.datahandler(data_unit)

##### Chart definition

     from RemoteMonitorLibrary.api.plugins import ChartAbstract

     class MyPlugInChart(ChartAbstract):
         pass

     Creating charts require familirisation with pandas & matplotlib

## Prerequisites
    Preinstalled: atop, time installed on remote host, ssh enabled

## Supported OS
    All linux based system where atop supported

## Open issues
 - Add period histogram square or vertical line over system graph for indicate different period's start/stop 
   on same chart instead of create separated charts per period




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/doguz2509/robotframework_system_trace_library",
    "name": "robotframework-remote-monitor-library",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Dmitry Oguz",
    "author_email": "doguz2509@gmail.com",
    "download_url": "",
    "platform": "",
    "description": "# Remote Monitor Library (Version 2.2.0)\n\n## Overview\nRemoteMonitorLibrary allow collect system data of target linux host during any Robotframework \ntesting process being running\n\n### Architecture\nMain keyword library executing background python threads for SqlLite db node, separate threads for system trace collecting \nplugins\nBy default library contain 'aTop'. 'atop' command being executing with predefined interval & its out put parsed as following:\n#### aTop System Level\nSystem level portion of 'atop' being storing in database, and later can be shown as chart in special html page\nLink to it logged to robotframework regular log\n#### aTop Process Level\nTBD in future releases\n#### PlugIn extension API\nLibrary provide special API for create custom plugins (SystemTraceLibrary.api.[plugins, model])\n\n\n## Installation\n\n    python -m pip install robotframework-remote-monitor-library\n\n## Usage\n\nLibDoc: [Library documentation](RemoteMonitorLibrary.html)\n\n### Test/Keywords within *.robot file\n\n    *** Settings ***\n    Library  RemoteMonitorLibrary \n    ...     [location (Default: logs)] \n    ...     [file_name (Default: system_trace.db)]\n    ...     [cumulative (Default: False)]\n    ...     [custom_plugins (Default: None)]\n\n    Suite Setup  run keywords  Create host monitor  ${HOST}  ${USER}  ${PASSWORD}  [${PORT} (Default: 22)] \n    ...                 [alias=${SUITE_NAME} (Default: user@host)]\n    ...          AND  Start monitor plugin  aTop  interval=1s\n    Test Setup   Start period  ${TEST_NAME}\n    Test Teardown  run keywords  Stop period   ${TEST_NAME}\n    ...             AND  generate module statistics  ${TEST_NAME}\n    Suite Teardown  Close host connection  alias=${SUITE_NAME}\n\n    *** Tests ***\n    Test\n        Do something here\n\n### PlugIn public API\n\nSystemTraceLibrary allow creating extended plugins for trace customer purposes\n\n#### Follow next guide:\n\n##### Create python project \n\n    plug_in_python_project_folder\n\n##### Create following files inside:\n\nMain init project file for expose Plugin class\n\n    __init__.py\n        from .pluin_file import MyPlugInName\n\n        __all__ = [MyPlugInName.__name__]\n\n##### Runner definition\n\n     from RemoteMonitorLibrary.api import plugins\n\n     class MyPlugInName(plugins.PlugInAPI):\n         # If constractor override required, keep following signature \n         def __init__(self, parameters, data_handler, host_id, **kwargs):\n             plugins.PlugInAPI.__init__(self, parameters, data_handler, host_id=host_id, **kwargs)\n             self._my_own_var = ...\n\n         @staticmethod\n         def affiliated_tables() -> Iterable[model.Table]:\n             return my_plugin_table(),\n\n         @staticmethod\n         def affiliated_charts() -> Iterable[plugins.ChartAbstract]:\n             return MyPlugInChart(),\n\n\n##### Tables definition\n\n     from RemoteMonitorLibrary.api import model\n\n     class my_plugin_table(model.TimeReferencedTable / model.Table):\n         def __init__(self):\n             model.TimeReferencedTable.__init__(self, name='plugin_table',\n                                                fields=[model.Field('field01'),\n                                                        model.Field('field02'),\n                                                        ...],\n                                                queries=[model.Query('name', 'select * from table_name where field01 = {}')]\n                                                )\n\n     !!! PAY ATTENTION - TimeReferencedTable automatically add fields for reference table entries to time line \n     mechanism \n     In case it not requires, use model.Table base class\n\n##### Parser definition\n\n    from RemoteMonitorLibrary.api import plugins, model\n\n    class my_parser(plugins.Parser):\n         def __call__(*output) -> bool:\n            table_template = self.table.template\n\n            your_data = []\n            for item in <data samples>:\n               yuor_data.append(table_template(*item))\n\n            data_unit = model.DataUnit(self.table, *your_data)\n            self.datahandler(data_unit)\n\n##### Chart definition\n\n     from RemoteMonitorLibrary.api.plugins import ChartAbstract\n\n     class MyPlugInChart(ChartAbstract):\n         pass\n\n     Creating charts require familirisation with pandas & matplotlib\n\n## Prerequisites\n    Preinstalled: atop, time installed on remote host, ssh enabled\n\n## Supported OS\n    All linux based system where atop supported\n\n## Open issues\n - Add period histogram square or vertical line over system graph for indicate different period's start/stop \n   on same chart instead of create separated charts per period\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "RobotFramework extended keyword library; Allow background system monitoring; aTop, Time, SSHLibrary",
    "version": "2.2.0",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "af9c02be1c282952e037c65ddddc9cbb",
                "sha256": "999451e0c09f38f7da678a116d6bb5cbf03bd2573a1a240ad51a5c3aabc54709"
            },
            "downloads": -1,
            "filename": "robotframework_remote_monitor_library-2.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "af9c02be1c282952e037c65ddddc9cbb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 109397,
            "upload_time": "2021-05-04T18:02:50",
            "upload_time_iso_8601": "2021-05-04T18:02:50.634854Z",
            "url": "https://files.pythonhosted.org/packages/40/23/8e6f127951bab0b1ef8c968e130a4a0134ff9b30d55b9dc99bdf954590d6/robotframework_remote_monitor_library-2.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-05-04 18:02:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "doguz2509",
    "error": "Could not fetch GitHub repository",
    "lcname": "robotframework-remote-monitor-library"
}
        
Elapsed time: 0.30999s