Difference between revisions of "Pandora: Agent and remote module creation"

From Pandora FMS Wiki
Jump to: navigation, search
(How to create local modules)
(How to create local and remote modules)
Line 5: Line 5:
 
== Differences between local and remote modules ==
 
== Differences between local and remote modules ==
  
A '''local module''' is a command or a script that is executed by the software agent which is installed in a machine. The software agent executes commands or scripts and catches the output of them to send it as monitoring information to Pandora FMS server to be processed.
+
A '''local module''' is a command or a script that is executed by the software agent which is installed on a machine. The software agent executes commands or scripts and captures their output in order to send it as monitoring information to the Pandora FMS server for its processing.
  
 
<br>
 
<br>
Line 13: Line 13:
 
<br>
 
<br>
  
A '''remote module''' is a command executed by Pandora server against to a remote machine that hasn't got a software agent installed inside. When this modules are executed the server performs a remote query and gets the result as the monitoring information.
+
A '''remote module''' is a command executed by the Pandora Server against a remote machine that hasn't got a software agent installed on it. When these modules are executed the server performs a remote query and obtains the result as monitoring information.
  
 
<br>
 
<br>
Line 25: Line 25:
 
There are two types of local modules:
 
There are two types of local modules:
  
* Predefined in software agent
+
* Predetermined on the software agent
 
* Generic commands
 
* Generic commands
  
'''Generic modules''' are system command, scripts or other programs executions that get the information and return a single value that will the value monitored. This modules are executed using the parameter ''module_exec''.
+
'''Generic modules''' are the system command, scripts or other programs which can be executed to get the information and return a single value that will be the value that's monitored. These modules are executed using the ''module_exec'' parameter.
  
In addition to generic modules, Pandora FMS' software agent has '''predefined modules''' this modules made information extraction easy. Some of the predefined modules are: CPU usage, memory usage, disk usage, log parser, etc.
+
In addition to generic modules, Pandora FMS' software agent has '''predefined modules''' these modules make information extraction easy. Some of the predefined modules are: CPU usage, memory usage, disk usage, log parser, etc.
  
 
=== How to create local modules ===  
 
=== How to create local modules ===  
  
The local modules are deifned inside Pandora FMS' software agent configuration file.
+
The local modules are defined inside Pandora FMS' software agent configuration file.
  
 
An example of generic module definition could be:
 
An example of generic module definition could be:
Line 45: Line 45:
 
  module_end
 
  module_end
  
This module returns the number of processes running in the system. An example of a predefined module could be:
+
This module returns the number of processes running on the system. An example of a predefined module could be:
  
 
  module_begin
 
  module_begin
Line 56: Line 56:
 
This module returns the total CPU usage of the system.
 
This module returns the total CPU usage of the system.
  
When the software agent sends the information to Pandora FMS server you will see all you local modules inside the agent like this image:
+
When the software agent sends the information to Pandora FMS server you will see all you local modules inside the agent as can be seen on this image:
  
 
<br>
 
<br>
Line 78: Line 78:
 
* Web checks
 
* Web checks
  
'''Network modules''' are check executed on network protocols such as: ICMP, TCP or SNMP. The valuers returned by these checks are predefined and could be selected when the module is created. For example if you want to monitor if a port is open in a machine you will select the module ''TCP boolean data'' that will return 1 if the port is open and 0 otherwise.
+
'''Network modules''' are checks executed on network protocols such as: ICMP, TCP or SNMP. The values returned by these checks are predefined and could be selected when the module is created. For example if you want to monitor if a port is open on a machine you will select the module ''TCP boolean data'' that will return a value of 1 if the port is open and 0 otherwise.
  
The '''WMI modules''' are remote modules that allow you to perform queries using WMI protocol to Windows machines.
+
The '''WMI modules''' are remote modules that allow you to perform queries on Windows machines using WMI protocol.
  
'''Plugin modules''' allow you to execute remote scripts or checks created by the user that perform any kind of action. The only requirement is that the plugin must return a single value. The plugins are developments created to perform action that could be executed remotely for example: access to a webservice to get data, correlate information from many sources before to return the value, etc.
+
'''Plugin modules''' allow you to execute remote scripts or checks created by the user that perform any kind of action. The only requirement is that the plugin must return a single value. The plugins are developments created to perform actions that could be executed remotely for example: accessing a webservice to obtain data, correlate information from many sources before to return the value, etc.
  
'''Web checks''' are remote modules that allow you to perform transactional checks to webs. These modules simulate the actions performed by an user when he is browsing a website.
+
'''Web checks''' are remote modules that allow you to perform transactional checks on webs. These modules simulate the actions performed by an user when he is browsing a website.
  
 
=== How to create remote modules ===
 
=== How to create remote modules ===

Revision as of 13:39, 22 February 2016

Go back to Quick Guides index

1 How to create local and remote modules

1.1 Differences between local and remote modules

A local module is a command or a script that is executed by the software agent which is installed on a machine. The software agent executes commands or scripts and captures their output in order to send it as monitoring information to the Pandora FMS server for its processing.


Esquema-AGENT-MODULE-EXECUTION.png


A remote module is a command executed by the Pandora Server against a remote machine that hasn't got a software agent installed on it. When these modules are executed the server performs a remote query and obtains the result as monitoring information.


Esquema-REMOTE-MODULE-EXECUTION.png


1.2 Local module

There are two types of local modules:

  • Predetermined on the software agent
  • Generic commands

Generic modules are the system command, scripts or other programs which can be executed to get the information and return a single value that will be the value that's monitored. These modules are executed using the module_exec parameter.

In addition to generic modules, Pandora FMS' software agent has predefined modules these modules make information extraction easy. Some of the predefined modules are: CPU usage, memory usage, disk usage, log parser, etc.

1.2.1 How to create local modules

The local modules are defined inside Pandora FMS' software agent configuration file.

An example of generic module definition could be:

module_begin
module_name proctotal
module_type generic_data
module_exec ps -A | tail --lines=+5 | wc -l
module_description Total processes
module_end

This module returns the number of processes running on the system. An example of a predefined module could be:

module_begin
module_name CPUUse
module_type generic_data
module_cpuusage all
module_description CPU usage
module_end

This module returns the total CPU usage of the system.

When the software agent sends the information to Pandora FMS server you will see all you local modules inside the agent as can be seen on this image:


Quickguide local module.png


You can find more information and some examples about software agent monitoring in the section Monitoring with software agents. If you want to know more about the predefined of generic modules of software agent you can see the section Agent module definition

1.3 Remote module

The remote module types are the following:

  • Network modules:
    • ICMP
    • TCP
    • SNMP
  • WMI
  • Plugins
  • Web checks

Network modules are checks executed on network protocols such as: ICMP, TCP or SNMP. The values returned by these checks are predefined and could be selected when the module is created. For example if you want to monitor if a port is open on a machine you will select the module TCP boolean data that will return a value of 1 if the port is open and 0 otherwise.

The WMI modules are remote modules that allow you to perform queries on Windows machines using WMI protocol.

Plugin modules allow you to execute remote scripts or checks created by the user that perform any kind of action. The only requirement is that the plugin must return a single value. The plugins are developments created to perform actions that could be executed remotely for example: accessing a webservice to obtain data, correlate information from many sources before to return the value, etc.

Web checks are remote modules that allow you to perform transactional checks on webs. These modules simulate the actions performed by an user when he is browsing a website.

1.3.1 How to create remote modules

You can create a remote module in Modules section of Agent Management View. The next image shows an example of the form to create a remote module which checks if the port 80 of a machine is open.


Create remote port80.png


When the different remote modules collect data they appear in Pandora console using different icons depending on remote module type as you can see in the image below.


Remote modules check example.png


If you want to know more about remote modules and how to configure them, you can go to section Remote Monitoring