Skip to main content

Configuración en PandoraFMS

InstallInstalar theel plugin onen theel servidor de PandoraFMS server

TheEl operatingprocedimiento procedureoperativo belowque isse baseddescribe ona thecontinuación useestá ofbasado en el uso de PandoraFMS enterprise.

TheLas operationsoperaciones belowque needse toindican bea carriedcontinuación outdeben whenrealizarse installingcuando se instala Control For i forpor theprimera firstvez timeen onuna ansolución already operationalde PandoraFMS solution. ya operativa.

SearchBusque forel thenombre namedel ofdirectorio theque directorycontiene containing thelos plugins 

InEn PandoraFMS bypor defaultdefecto thela pathruta forpara serverlos plugins isdel servidor es /usr/share/pandora_server/util/plugin  butpero se puede utilizar una ruta personalizada, en esta guía vamos a customutilizar pathla couldque byviene used,por ondefecto thisy guidecrearemos weun aredirectorio going to use the default one and create a directory calledllamado pandora_ibm forpor exampleejemplo topara putponer thereallí alltodos thelos necessaryficheros files.necesarios.

 

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

TransferTransferir theel plugin toal servidor de PandoraFMS Server

TheLa installationinstalación ofdel theproducto Control For i productha createdcreado theel directorio "/Ctl4iCtl4i" directoryque whichcontiene contains theel plugin and y configurationel filefichero tode installconfiguración onpara theinstalar PandoraFMSen server. el servidor de PandoraFMS.

TransferTransfiera theel plugin andy theel configurationfichero filede fromconfiguración thedesde el directorio "/Ctl4i”Ctl4i" directoryde ofla thepartición IBM i partitional todirectorio theque directory contiene containing thelos plugins inen PandoraFMS. InEn ournuestro example:ejemplo: "/usr/share/pandora_server/util/plugin/pandora_ibm”pandora_ibm".



IfSi wedescargamos downloadel thepaquete packagede fromla thelibrería PandoraFMSde library,PandoraFMS, anse updatedproporcionará versionuna ofversión theactualizada del cliente de Control4i clienten willel bemismo providedpaquete, onpor thelo sameque package,podremos soevitar wela couldtransferencia avoidde transferdatos datadesde fromla partición de IBM i partitional toservidor thede PandoraFMSPandoraFMS.

server.



ToPara downloaddescargar theel pandora_ibmiplugin plugin,pandora_ibmi, el cliente de Control4i clienty andlos ficheros confs filesvaya goa tola thelibrería PandoraFMSde library:PandoraFMS: (url: https://pandorafms.com/library/pandorafms-ibm-i-enterprise-plugin/) andy clickhaga onclic theen packageel linkenlace todel downloadpaquete apara descargar un fichero zip fileque includingincluye thelos necessaryficheros files.necesarios.

ThenLuego transfertransfiera theseestos filesficheros toal thedirectorio directorydefinido defineden onel theservidor de PandoraFMS server

ChangeCambiar theel portpuerto toa useutilizar (possibly)si se requiere)

IfSi portel puerto 7357 isya alreadyestá beingsiendo used,utilizado, these portpuede tocambiar beel usedpuerto fora communicationutilizar betweenpara thela comunicación entre el plugin de PandoraFMS pluginy andel the agente agenten onla thepartición IBM ii. partition

may

El bepuerto changed.por defecto se define en el fichero check_Control4i_Config situado en el mismo directorio que el plugin que se acaba de transferir. 

TheEdite defaultel portcontenido isde definedeste inarchivo they check_Control4i_Configcambie fileel locatednúmero inde the same directory as the plugin that  has just been transferred.puerto. 

EditTambién these contentpuede ofutilizar thisun filepuerto andespecífico changedefiniendo theen portla number. 

definición

A specific port can also be used by defining on the pandora_ibmidel plugin definition,pandora_ibmi, whichque callsllama theal plugin check_Control4i pluginpasándole byel passing it the parameterparámetro -p followedseguido bydel thenúmero portde numberpuerto toa use.utilizar.

 

CheckCompruebe thatque theel cliente check_Control4i clientfunciona is working properly correctamente

InEn thela partición IBM ii, partition,compruebe checkque thatel thesubsistema CONTROL4I subsystemestá isactivo. active.Si Ifno not,lo startestá, itinícielo withcon theel CTSTRSBS comando command. CTSTRSBS.

InEn theel terminal del servidor de PandoraFMS serverse terminalpuede could execute:ejecutar: 

# 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 

 

MakeAsegúrese surede theque los binarios check_Control4i andy thepandora_ibmi pandora_ibmitienen binariesderechos hasde executionejecución, rights,en incaso casede notno justser execute:así, simplemente ejecútelos:

 

chmod +x check_Control4i
chmod +x pandora_ibmi

 

IfSi theel returnedmensaje messagedevuelto is: es:

CTL1015 - TheEl subsistema CONTROL4I subsystemestá isen inestado *RUN state 

TheSe pluginvalida operationla isoperación validated.del plugin.  

DuringDurante theel firstprimer use,uso, youes mayposible receiveque no answerreciba fromrespuesta thede la partición IBM II. partition.Ejecute Runel themismo same commandcomando 3 timesveces before antes topara lookbuscar forotra anothercausa. cause.La Therazón reasones isque thatcuando whenel theagente agentse startsinicia (jobtrabajo CTAGENT) thelas 3 firstprimeras demandsdemandas are son rejected,rechazadas, forpor auna technicalrazón reason.técnica.   




ConfigureConfigurar theel pandora_ibmiarchivo conf filede pandora_ibmi

 

ToPara getobtener metricsmétricas usingutilizando theel plugin pandora_ibmi plugindeberemos wemodificar shouldel modifyfichero thede definición pandora_ibmi.confconf, definitioncon file,los whitcomandos theque commandsqueramos weejecutar wanten tola execute on thepartición IBM ii, partition,para toobtener getuna alista fullcompleta listde ofcomandos availabledisponibles commandspodríamos coulddirigirnos addressal the documento IBM i check commandscommands. document. 

 

InPara orderejecutar toun executechequeo básico a basicnuestra checks to ourpartición IBM i partitiondefiniremos weun willpar definede acomandos coupleen ofel commandsarchivo onde theconfiguración, configurationque file,se whichincluye ispor included by default:defecto:

 

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.