Back to OP5 Monitor FAQ

How to install third-party plugins

Version Copied

This article was written for version 7.0 of op5 Monitor; it could work on both lower and higher versions if nothing else is stated.

Introduction Copied

OP5 Monitor uses a plugin system to handle things like notifications, restarting crashed services and the actual host and service monitoring. This means that the system can be easily extended to monitor new kinds of devices or be integrated with third-party ticketing systems.

Developing your own plugins is really straightforward, but there are already heaps available to download from sites like Monitoring Exchange or Nagios Exchange.

In this how-to we will look at installing a check plugin, cover solutions to common problems, and give some general recommendations for using third-party plugins.

Support information Copied

Installing and using third-party plugins is not supported by op5 AB. If you need help installing, configuring or developing custom plugins, please contact the professional services department.

Prerequisites Copied

Installation Copied

In this tutorial we will install the check plugin “check_example.py” - download it to your local system. We will use the WinSCP client for SSH and SFTP access to the host running op5 Monitor in these examples, but any SSH/SFTP client should work.

Security implications Copied

Only install plugins from trusted sources - malicious plugins can execute commands to steal information, crash the system, or similar.

Start off by opening WinSCP and connect to your monitoring server:

OP5 Monitor - How to install third-party plugins

Upload the “check_example.py” file to the “/opt/plugins/custom” directory on the server. Storing your custom plugins in this directory protects them from changes during upgrades and includes them in backups:

OP5 Monitor - How to install third-party plugins

Click the “Open terminal” button in the top left corner:

OP5 Monitor - How to install third-party plugins

We now need to run a command that makes the plugin executable - do this by executing chmod 755 /opt/plugins/custom/check_example.py:

OP5 Monitor - How to install third-party plugins

Configuration Copied

The plugin needs to be configured as a “command” to be used with op5 Monitor. Enter the “Commands” section of the “Configure” page:

OP5 Monitor - How to install third-party plugins

You will now have to enter a name for the command and usually a few parameters for the plugin. The plugins are applications or scripts executed on the system shell, so the parameters are set by command line arguments.

In this example we use the internal macros/variables "$USER1$", "$HOSTADDRESS$", and "$ARG1$" to configure path, host, and service-specific arguments. These will be resolved differently depending on which host in op5 Monitor they are executed for.

OP5 Monitor - How to install third-party plugins Your plugin might require other arguments - please consult the plugin documentation.

The check plugin is now ready to be used by services:

OP5 Monitor - How to install third-party plugins

Service configuration

OP5 Monitor - How to install third-party plugins

Service status in list view

Common issues Copied

The following are some common problems and their solutions:

“The plugin is complaining about a missing module called utils.pm” Copied

The “utils.pm” Perl module is used by many plugins and is sometimes hard-coded to a specific path in the file system. This problem can usually be solved by running the following sed command:

# sed -i 's/utils.sh/..\/utils.sh/g' /opt/plugins/custom/name_of_plugin

OP5 Monitor - How to install third-party plugins Executing the same command with WinSCP

["Geneos"] ["FAQ"]

Was this topic helpful?