Saturday, 21 April 2018

Worker - let's make it work

Let's start quickly what the worker is for: we have many business applications to be observed which can be done with the reader worker. What it does is to read the log file of application if a known pattern (like .*OutOfMemoryError: Java heap space.*) occurs there it will report it to the Reaction Engine as a possible incident. The engine will make a decision and it might start an execution flow (chain of commands) to remedy to problem which will be executed sequentially by the executor worker on one or more hosts.

So the workers seem pretty important, don't they? Ok, so let's install them first.
What has to be done to make them work on a host?
  1. install the ZIP file from HERE
    wget -P /local/reaction
  2. unzip it to a folder and add execute permission to manage_*.sh
    unzip /local/reaction/ -d /local/reaction/
    chmod a+x manage_*.sh
  3. configure it
The first 2 steps are cakewalk and the 3rd one isn't difficult either.

So the config can be found in conf/worker.yml.
The most important settings that have to be taken care of are as follows:
  • host_name: Reaction system will link this worker to the system record stored in system administration of the management application with this host_name value. For example: if you define a system in the management app with the host name ADNLT653 then the same value has to be set for the host_name too in the config file. It can be anything but highly recommended to use the real name of the host.
  • rest_call.engine_endpoint: It is the endpoint URL of Reaction Engine. For example: http://localhost:8080/reaction-engine
And that's all! There are many other settings in the config file that are for refining the worker but only these two have to be set at the beginning.

In the manage_*.sh files the Java home (J_HOME) variable has to be set. If the JAVA_HOME is set correctly then no alteration is needed.
For Linux the EXEC (path to jsvc) and the USER (the user to run the daemon) variables have to be checked too.

The last check should be to have a look at the credential file file and set the password there properly. The same password (and username) has to exist in Reaction Engine too.

I recommend the following places to get more info about how to install worker:

No comments:

Post a comment

Reaction v1.1 is released!