Skip to main content

Configuration in PandoraFMS

Install the plugin on the PandoraFMS server

The operating procedure below is based on the use of PandoraFMS enterprise.

The operations below need to be carried out when installing Control For i for the first time on an already operational PandoraFMS solution. 

Search for the name of the directory containing the plugins

In PandoraFMS by default the path for server plugins is /usr/share/pandora_server/util/plugin  but a custom path could by used, on this guide we are going to use the default one and create a directory called pandora_ibm for example to put there all the necessary files.

 

mkdir /usr/share/pandora_server/util/plugin/pandora_ibm

Transfer the plugin to PandoraFMS Server

The installation of the Control For i product created the /Ctl4i directory which contains the plugin and  configuration file to install on the PandoraFMS server. 

Transfer the plugin and the configuration file from the “/Ctl4i” directory of the IBM i partition to the directory  containing the plugins in PandoraFMS. In our example: “/usr/share/pandora_server/util/plugin/pandora_ibm”.

If we download the package from the PandoraFMS library, an updated version of the Control4i client will be provided on the same package, so we could avoid transfer data from IBM i partition to the PandoraFMS server.

To download the pandora_ibmi plugin, Control4i client and confs files go to the PandoraFMS library: (url: https://pandorafms.com/library/pandorafms-ibm-i-enterprise-plugin/) and click on the package link to download a zip file including the necessary files.

Then transfer these files to the directory defined on the PandoraFMS server

Change the port to use (possibly)

If port 7357 is already being used, the port to be used for communication between the PandoraFMS plugin and the  agent on the IBM i partition may be changed. 

The default port is defined in the check_Control4i_Config file located in the same directory as the plugin that  has just been transferred. 

Edit the content of this file and change the port number. 

A specific port can also be used by defining on the pandora_ibmi plugin definition, which calls the check_Control4i plugin by passing it the parameter -p followed by the port number to use.

 

Check that the check_Control4i client is working properly

In the IBM i partition, check that the CONTROL4I subsystem is active. If not, start it with the CTSTRSBS  command. 

In the PandoraFMS server terminal could execute: 

# cd /usr/share/pandora_server/util/plugin/pandora_ibm
# ./check_Control4i -H <IBM i partition ip> -c "ctchksbs control4i"
CTL1015 - The CONTROL4I subsystem is in *RUN state 

 

Make sure the check_Control4i and the pandora_ibmi binaries has execution rights, in case not just execute:

 

chmod +x check_Control4i
chmod +x pandora_ibmi

 

If the returned message is: 

CTL1015 - The CONTROL4I subsystem is in *RUN state 

The plugin operation is validated. 

During the first use, you may receive no answer from the IBM I partition. Run the same command 3 times before  to look for another cause. The reason is that when the agent starts (job CTAGENT) the 3 first demands are  rejected, for a technical reason.  




Configure the pandora_ibmi conf file

 

To get metrics using the pandora_ibmi plugin we should modify the pandora_ibmi.conf definition file, whit the commands we want to execute on the IBM i partition, to get a full list of available commands could address the  IBM i check commands document. 

 

In order to execute a basic checks to our IBM i partition we will define a couple of commands on the configuration file, which is included by default:

 

Execute pandora_ibmi manually

 

To execute pandora_ibmi manually simply download de zip file, uncompress it on the desired path and move it to it, in our case /usr/share/pandora_server/util/plugin/pandora_ibm then execute the pandora_ibmi with the host ip from our IBM i partition and the definition conf file as parameters.

 

./pandora_ibmi -H 10.10.10.1 --conf pandora_ibmi.conf

 

Remember, there are a couple of optional parameters we can use, like the agent alias, a custom port, module prefix, etc. But the mandatory ones are host ip and command definition conf file

 

This is a server plugin so if we didn't get any error and a value of 1 is returned, that means every runs correctly and the agent (with default name in this case) was created on our PandoraFMS server retrieving the data of all commands defined on the command definition conf file.

 

 

 

Configuring monitoring on PandoraFMS web Console

 

We have configured our IBM i partition and chek the pandora_ibmi and the check_Control4i are working, so now we should configure the plugin in the web console in order to use to monitor IBM i.

 

Once we log in into the web console as an administrator user, the first step is to access the console. In the Servers section, we access the Plugins tab.

 

In this tab will appear all the server plug-ins that are installed by default with Pandora FMS.

 

Click on Add.

 

 

The following window will be used to configure the plug-in before registering it.

The first section is general options, where we can set the name we want to give to the plug-in, the type of plug-in, standard or Nagios, the maximum execution time of the plug-in and a brief description.

 

In the next section we define the path where the plug-in is located and a series of macros, which are equivalent to the parameters of which the plug-in is composed, we will define the minimum necessary for this example and an adding just an extra optional parameter as agent alias.

 

 

For more information about macros and how they work please visit the online documentation about it:

https://pandorafms.com/manual/es/documentation/08_technical_reference/05_anexo_server_plugins_development?s[]=field1#macros_de_plugin

 

Finally, if we have added execution parameters, this section will be used to define these parameters by means of macros. We can also add default values to these macros, so that they will be used in case we do not provide a parameter.

In this case, since the only mandatory parameter is the token parameter, the other two will be configured with default values.

 

 

Once we have finished, click on Create. Now we hace our plugin defined ready for deployment.

 

Deploy the server plugin into an agent on PandoraFMS.

 

Complete documentation about server plugins deployment could be found on: https://pandorafms.com/manual/en/documentation/03_monitoring/03_remote_monitoring#monitoring_with_server_remote_plugins

 

Here, we will deploy the server plugin configured before on a test agent, in order to show the basic configuration needed to make it work.

 

The first step is to access the web console. In the resources section, we access the manage agent tab.

 

Here we could select the agent to deploy the plugin or create a new one, in our case we are going to create a new one.

 

Click on create agent and fulfil the name, group and needed fields, then click on create.

 

 

Once created, a toolbar is available on the upper right side, go to the modules tab, select the type ‘create a new plugin server module’, then clic on create.

 

 

  Select the pandora_ibmi plugin we defined before

 

 

Then give it a module name and fullfill the fields configured on the macros for this execution, click on create.

 




That's it the plugin is already configured, wait a couple of seconds and then go to the eye on the upper right side to see the execution results.

 

Once is executed, the plugin generates a new agent with all the commands defined on the command definition conf file:

 

 

From now, we can use the same template and definition to point as many IBMi partition as we want, just defining a new module with different IP addresses or even different command definition conf file for different modules.