-
Notifications
You must be signed in to change notification settings - Fork 22
ManagementConfiguration
This page covers all configuration files used and interpreted by the Vermont management infrastructure.
The Vermont manager component is configured by a single XML file specified as command parameter at startup.
Here is an example configuration:
[Global]
Interval=5
Logfile=manager.log
AllowedWebIP=127.0.0.1
BindAddress=127.0.0.1
ListenPort=8001
[VermontInstances]
host_1=http://vermont.monitor.de:8000
host_2=http://vermont2.monitor.de:8000
It contains the following parameters:
- Interval: Specifies the interval of retrieving sensor values of the Vermont instances in seconds. After the data retrieval, reconfiguration sensors are checked and, if needed, actors are triggered.
- Logfile: Specifies the file, where the manager log is to be written to.
- AllowedWebIP: Specifies the IP address, which may access the RPC interface. Only one IP address may be specified, as only the web interface needs to access this interface.
- BindAddress: Specifies the IP address of the networking interface, where manager should listen for RPC connections. Specify nothing, if manager should listen on all available interfaces. Be very careful, if all interfaces are used by the RPC interface, as manager does not perform access control or authentication!
- ListenPort: Specifies the port where manager should listen on. Usually port 8001 is used for manager.
- host_X: Configures all Vermont instance's controller using an URL, where the controllers' interfaces are available. X needs to be incremented starting at 1.
Like the manager, the controller is configured by a single XML file specified as command parameter when executing it:
[Global]
VermontDir=../vermont
ConfigFile=vermont.conf
ControllerLogFile=vcontroller.log
VermontLogFile=tmp.log
AllowedManagerIp=1.2.3.4
BindAddress=127.0.0.1
ListenPort=8000
[Stats]
Interval=5
Name_1=CPU Utilization
XPath_1=sum(/vermont/sensorData/processor[@id="0"]/util)
Name_2=Received packets on PCAP
XPath_2=sum(/vermont/sensorData/sensor[@name="observer"]/addInfo/pcap/received[@type="packets"])
Name_3=Dropped packets on PCAP
The following parameters may be specified:
-
Section Global:
- VermontDir: Directory, in which the Vermont instance that needs to be managed is located (either absolute or relative to the current working directory).
- ConfigFile: File name relative to path \emph{VermontDir, in which Vermont's configuration is saved.
- ControllerLogFile: File name relative to the controller's working directory, in which the controller's log is saved.
- VermontLogFile: File name relative to path \emph{VermontDir, in which all log data of the started Vermont instance is saved.
- AllowedManagerIp: Specifies the IP address which may access the RPC interface. Only one IP address may be specified, as only the manager needs to access this interface. Ensure, that only one manager component accesses a controller, as two simultaneous dynamic configuration processes would influence each other unpredictably.
- BindAddress: Specifies the IP address of the networking interface, where controller should listen for RPC connections. Specify nothing, if controller should listen on all available interfaces. Be very careful, if all interfaces are used by the RPC interface, as controller does not perform access control or authentication!
- ListenPort: Specifies the port where the controller should listen on. Usually port 8000 is used for the controller.
-
Section Stats: Specifies sensor data in an enumerated list starting at
$1$ . For these sensor data items, statistical data is saved to construct a time-line graph in the web interface. All specified terms ''X'' must be replaced by a number.- Name_X: Name of sensor data item
- XPath_X: XPath String, which specifies the sensor data item within the XML file filled by Vermont with sensor data.
- Interval: Interval in seconds, that specifies how often sensor data is retrieved for saving the statistics.
The Vermont webinterface is also configured by a single XML configuration file:
[Global]
VManager=http://localhost:8001
The file must be named ''vermont_web.conf'' and be located in the same directory as the script file for the web interface ''start.py''. It only consists of a single parameter.
- VManager: Specifies the URL, where the manager component's RPC interface can be found. Usually port 8001 is used for this interface.
The complete reconfiguration process is performed in component manager. In regular intervals (default: 5 seconds), sensor data from all registered Vermont instances is retrieved, analyzed by sensors and eventually specified actors are triggered which modify configuration parameters of Vermont instances. Configuration of both sensors and actors is specified in each Vermont instance's configuration file and interpreted by the central manager component. Vermont ignores all parameters belonging to sensors and actors. In the following, we will describe possible configuration options for the reconfiguration framework.
Sensors read sensor data from a signle Vermont instance and acts on it. Source for sensor data is the XML file produced by Vermont's module called SensorManager. This XML file is generated regularly by Vermont, read by the controller and forwarded to the manager. Here is an example configuration:
<sensor id="1">
<source>sum(/vermont/sensorData/processor/util)</source>
<threshold>50</threshold>
<activation>positive</activation>
</sensor>
The following parameters may be specified for each sensor:
- Attribute id: Each sensor is given an unique identification number. Attention: Dynamic reconfiguration acts globally on all Vermont instances. So this ID needs to be unique within the configurations of all Vermont instances.
- Element source: XPath-String. XPath is a string which defines a single or multiple elements within a XML document. It is similar to a path definition in a file system. In XPath, there are some additional functions specified to convert or aggregate multiple values inside the XML document. The XPath string specified in the example would select all sensor data values that are located in path ''/vermont/sensorData/processor/util''. If multiple elements are found, their contents are summed up by the function ''sum'', which specifies the data elements inside the XML document containing the sensor data coming from Vermont (File ''sensor_output.xml''). This data is used as source for the corresponding sensor. A floating-point number is expected from Vermont manager as a result.
- Element threshold: Defines a limit, when all assigned actors are to be notified.
- Element activation: This value defines, if the sensor is activated when the the current value is above (''positive'') or below (''negative'') the limit, or never (''disabled'')
In the displayed example, the sum of the utilization of all the system's processors is used as source. If this value is greater than 50, all connected actors are triggered.
During each check of the sensor values, the sensors trigger their assigned actors if the trigger conditions are satisfied. During a regular reconfiguration interval of 5 seconds, it is possible that actors are triggered in the same interval of 5 seconds.
Actors define actions that are executed after being triggered by a sensor. At the moment, the following actions are available:
- change of parameters in configuration
- deactivation of Vermont modules
- reactivation of Vermont modules
Actors are configured in the same way as sensors directly in the XML configuration of Vermont. This is a configuration example:
<actor id="1">
<action>modifyvalue</action>
<code>v = int(v)*2<//code>
<trigger>always</trigger>
<target>/ipfixConfig/filter[@id=2]/countBased/interval</target>
</actor>
Each actor accepts the following parameters:
- Attribute id: This ID connects an actor with a sensor. If an actor uses the same ID as a sensor, the actor will be triggered by the sensor. It is possible to connect multiple actors by using the same ID.
- Element action: Defines an action that is executed after the actor was triggered by a sensor. The follwing actions are implemented:
- modifyvalue: Changes a parameter in the Vermont configuration, specified in element ''target''. How the value is changed is documented in element ''code''.
- pausemodule: Pauses the module specified in element ''target'' by removing all connections to preceding modules. Then the module is still activated inside Vermont, but does not receive any input data any more. If it is reactivated again, the module's state will be kept this way.
- resumemodule: Reactivates the module specified in element ''target''. All connections that were removed by action ''pausemodule'' are reinserted into the configuration, so that the module starts receiving input data again.
- Element code: This element parametrizes the method how to change the parameter value for action ''modifyvalue''. This element expects Python code as input. Variable ''v'' contains the configuration parameter's current value. This value can be modified arbitrarily. The value of variable ''v'' will after execution of the code applied to Vermont's configuration.
- Element trigger: Specifies, how often the actor reacts on trigger events from sensors. The following values can be used:
- always: When the actor is triggered by the assigned sensor, the configuration action is executed immediately.
- delayed: If the actor is triggered over an interval of ''delay'', the action will be executed once.
- once: The actor's action will be executed, when the assigned sensor did not trigger in the preceding interval, but triggered in the current one.
- once delayed: Is a combination of ''delayed'' and ''once'': The actor will be executed when the assigned sensor was active and triggered the actor over an interval of ''delay''. After executing the action, the actor is not activated any more, except the sensor was inactive for a duration of ''delay''. From this moment on, the actor is activated again and may execute its action like previously described.
- Element delay: Defines a time interval in seconds that is used by the actions \verb|delayed| and \verb|once delayed|.
- Element target: When using the action ''modifyvalue'', this element specifies a parameter inside Vermont's XML configuration file using XPath. The Path ''/ipfixConfig/filter[@id=2]/countBased/interval''((In this XPath string, ''filter[@id=2]'' specifies the XML element ''filter'' containing the value 2 in attribute ''id'')). It specifies in this example, that the interval of a sampler is target for modification. When using the actions ''pausemodule'' and ''resumemodule'', this element points to a configuration element specifying a Vermont module, as e.g. the XML element ''<observer>''.
The displayed example configuration for an actor changes the parameter value of a filter module each time a sensor triggers it. The configured interval will be doubled each time.
If actors change Vermont's configuration, the configuration will be automatically transmitted to the running Vermont instance by updated the configuration file and a reconfiguration of Vermont is triggered by sending a process signal. These tasks are executed by the controller component.