12. How to use Pandora FMS plugins
Plugins allow Pandora FMS to retrieve information that requires complex processing or that requires the use of complex systems or APIs. Some plugin examples could be: MySQL database monitoring.
In this quick guide we will show plugin examples included by default in Pandora FMS, but there is the possibility of being able to create your own server and agent plugins.
Server Plugins
Pandora FMS includes by default a few plugins ready to be used, to see the server plugins registered in Pandora FMS go to Management -> Servers -> Plugins. This kind of plugin only returns a single value.
These plugins are stored in the directory /usr/share/pandora_server/util/plugin/ and they are executed by the server.
To make use of this type of plugin, the plugin server must be enabled in file /etc/pandora/pandora_server.conf.
To create a plugin remote module, access agent editing, at the Modules tab:
Create a plugin server module.
Generally speaking, it is configured as any other type of remote module. In this type of module, there is the Plugin drop-down, which allows you to choose the plugin to be used.
In this example, the Packet Loss plugin is used to check the amount of packets lost in a time span between the server and the target.
Fill in the fields with the necessary information, in the case of the Packet Loss plugin, define the test time and the target IP.
This is what the configured module looks like:
Depending on the plugin, you will have to fill in different specific fields, for example, for MySQL plugin define the IP of MySQL server, the user name and password, and the data you wish to retrieve.
A few seconds after creating the module, the module and its obtained value will appear in the agent's view:
Agent Plugins
Linux
This type of plugins are stored and executed from a software agent and can return more than one value.
These plugins are stored in the /usr/share/pandora_agent/plugins/ directory of the local agent and are defined in the configuration file /etc/pandora/pandora_agent.conf.
In the configuration file, some agent plugins are defined by default, in this example a plugin called top.sh is used, which shows the processes run in the agent.
To see the created module and its value (or values, depending on the plugin) go to the software agent view in the console.
You may see that an icon with the shape of a sheet of paper is shown as obtained data, click on this icon to see the list of processes retrieved from the computer through the agent plugin.
Windows
The plugins are stored in the directory C:\Program Files "pandora_agent" and are defined in the configuration file C:\Program Files "pandora_agent" "pandora_agent.conf".
As in Linux, there are some plugin examples defined in the configuration file.
Did you not get the expected results? Go to help or support sections.