Flopsar Documentation
3.0
3.0
  • Introduction
  • Overview
    • Versioning
    • Licensing
    • Supported Platforms and Requirements
    • Distribution Packages
    • Release Notes
    • Flopsar Lite
  • Administrator Guide
    • Architecture Fundamentals
    • Installation
    • Agent
    • Server
    • Data Archiving
    • Authentication and Authorization
    • Logging
    • Docker
  • User Guide
    • Workstation
    • Agents Profiles
    • Agents Status
    • Data Browsing
    • Online Monitoring
    • Data Inspector
    • Custom Key-Value Metrics
    • Method Execution Stack
  • Developer Guide
    • Agent API
    • Agent Plugins
    • Server Plugins
    • Database API
  • MISCELLANEOUS
    • Troubleshooting
    • Third-party Components
    • Bug Reporting
Powered by GitBook
On this page
  • Configuration
  • Local Documentation
  • Manager Mode
  • Command Line Interface
  • Database Mode
  • Plugins
  • Example
  1. Administrator Guide

Server

Last updated 4 years ago

Server is one of the key Flopsar components, which is responsible for managing the entire Flopsar environment. Depending on the mode the server is run, it consists of one or two components.

The server can operate in one of the three modes:

manager This mode makes the server run as a manager only.

database This mode makes the server run as a database instance.

standalone This mode makes the server run as both manager and database ().

Configuration

Configuration is defined in config.json file under FLOPSAR_WDIR/conf directory.

config.json
{ 
    "server" : { 
        "host" : "*", 
        "port" : 9000 
    },
    "archive" : { 
        "enable" : false, 
        "policy" : "purge",    
        "scheduled on" : { 
            "hour" : 3, 
            "minute" : 0 
        },
        "retention" : 72
    }
}
  • server/host : IP address, which the server listens on. If * is specified, the server will listen on all available addresses.

  • server/port : TCP port, which the server listens on.

  • archive/enable : if set to true/false, the archiving procedure ie enabled/disabled.

  • archive/policy : if set to archive, all the data will be archived. If set to purge, the data eligible for archiving will be deleted.

  • archive/scheduled on/hour : hour of the day at which the archiving procedure will start.

  • archive/scheduled on/minute : minute of the hour at which the archiving procedure will start.

  • archive/retention : data retention period in hours.

config.json
{ 
    "server" : { 
        "host" : "*", 
        "port" : 9000 
    }
}
  • server/host : IP address, which the server listens on. If * is specified, the server will listen on all available addresses.

  • server/port : TCP port, which the server listens on.

config.json
{ 
    "server" : { 
        "host" : "*", 
        "port" : 9000 
    },
    "manager" : { 
        "host" : "host:port", 
        "port" : 9000 
    },
    "redirect" : { 
        "host" : "*", 
        "port" : 9000 
    },
    "archive" : { 
        "enable" : false, 
        "policy" : "purge",    
        "scheduled on" : { 
            "hour" : 3, 
            "minute" : 0 
        },
        "retention" : 72
    }
}
  • server/host : IP address, which the server listens on. If * is specified, the server will listen on all available addresses.

  • server/port : TCP port, which the server listens on.

  • manager/host : IP address, which the manager listens on. The database will connect to this address.

  • manager/port : TCP port, which the manager listens on.

  • redirect/host : IP address, which the database reports to the manager.

  • redirect/port : TCP port, which the database reports to the manager.

  • archive/enable : if set to true/false, the archiving procedure ie enabled/disabled.

  • archive/policy : if set to archive, all the data will be archived. If set to purge, the data eligible for archiving will be deleted.

  • archive/scheduled on/hour : hour of day at which the archiving procedure will start.

  • archive/scheduled on/minute : minute of hour at which the archiving procedure will start.

  • archive/retention : data retention period in hours.

The redirect option is useful when you have your database behind a firewall and no Workstation can connect to the server socket address. If this is the case, you just need to specify the redirect option, which will be used by Workstation instances to connect to the server socket address.

Local Documentation

Flopsar executable usage is also documented in man pages. You can access these pages calling:

$ man flopsar

Manager Mode

Command Line Interface

The manager is managed by means of CLI subcommands of flopsar executable.

Creating Manager Environment

In order to create a new Manager environment execute the following command:

$ flopsar create --mode=manager MANAGER_DIR

where MANAGER_DIR is a directory, which the environment is created.

Starting Manager

In order to start the manager execute the command below:

$ flopsar start MANAGER_DIR

Rerouting Agents

Every agent needs to know, which database it should connect to. In the distributed architecture, there can be multiple databases running independently. In order to attach an agent to a particular database, you must execute the following command:

$ flopsar agent reroute --pattern=PATTERN --agent-type=java --database=host:port FLOPSAR_DIR

This command will reroute Java agents, which names match the PATTERN to the database listening on host:port.

Removing Agent Data

If you want to remove some agent from Manager, you just execute the command:

$ flopsar agent rm --pattern=PATTERN --agent-type=java FLOPSAR_WDIR

This command will remove all the data for any Java agent, which name matches the specified PATTERN.

You cannot remove any agent data while the server is running.

Database Mode

Server runs as a database in this mode.

Plugins

Currently, only Manager instances support plugins.

In order to install a new plugin, you need to execute the following command:

$ flopsar plugin add --name=PLG_NAME --lib=PLG_LIB --conf=PLG_CONF FLOPSAR_WDIR

where:

  • PLG_NAME : user-defined plugin name,

  • PLG_LIB : absolute path to the plugin library file,

  • PLG_CONF : optionally, a plugin configuration file name.

Please note, if your plugin has a configuration file, this file must be in your current working directory which you execute the plugin add command from.

You can always print a list of all the installed plugins by executing the following command:

$ flopsar plugin list FLOPSAR_WDIR

In order to uninstall a plugin, you just need to execute the command:

$ flopsar plugin rm --name=PLG_NAME FLOPSAR_WDIR

where PLG_NAME is the name of the plugin you want to uninstall.

Example

Suppose, we have the following resources: a plugin file myplugin.so and its configuration file myplugin.conf in a current working directory, which is, for example /opt/flopsar. Flopsar manager installation is in /opt/flopsar/flopsar-server directory:

$ pwd
/opt/flopsar
$ ls
flopsar-server myplugin.so myplugin.conf

In order to add the plugin, we need to execute the following command:

$ flopsar plugin add --name=myFancyPlugin --lib=/opt/flopsar/myplugin.so \
    --conf=myplugin.conf flopsar-server    

If the plugin was successfully installed, we should see the following message:

Plugin "myFancyPlugin" added successfully.

If you do not see the above message, an error must have occurred. In order to get more details, add an extra option --verbose to the command, and execute it again. Now, a new log file out.log should be created with more information about the issue.

Manager is responsible for managing the entire Flopsar environment. When Flopsar runs in this mode, it means the is in use.

Server provides a mechanism, which allows to replace and extends Flopsar functionalities.

plugin
standalone architecture
distributed architecture
Redirect Usage