Disabling and Enabling Individual Plugins

Server Scout agents automatically discover and load plugins to monitor various services and applications on your system. However, you might want to disable certain plugins to reduce overhead, resolve conflicts, or exclude unused services from monitoring. This guide explains how to control which plugins are active on your Scout agent.

How Plugin Auto-Discovery Works

When the Scout agent starts up, it automatically scans the plugins.d/ directory and attempts to activate any available plugins. Each plugin includes a detect function that checks whether the relevant service or application is present on the system. If the detect function returns success, the plugin is loaded and begins collecting metrics.

This auto-discovery mechanism ensures that your server monitoring adapts automatically to your installed software without manual configuration. However, there are times when you'll want more granular control over which plugins run.

When to Disable Plugins

Consider disabling plugins in these scenarios:

  • Unused control panels: A control panel like cPanel is installed but no longer actively used
  • Performance optimisation: Reducing collection overhead on resource-constrained systems
  • Plugin conflicts: A plugin is causing issues or collecting duplicate data
  • Security compliance: Limiting data collection to only essential metrics
  • Testing purposes: Isolating specific plugins during troubleshooting

Disabling Plugins via Configuration File

The most straightforward method to disable a plugin is through the Scout configuration file:

  1. Open the Scout configuration file in your preferred editor:

``bash sudo nano /opt/scout-agent/scout.conf ``

  1. Add a line to disable the specific plugin using the format plugin_=0. For example:

`` plugincpanel=0 pluginplesk=0 plugin_mysql=0 ``

  1. Save the file and exit your editor.
  1. Restart the Scout agent to apply the changes:

``bash sudo systemctl restart scout-agent ``

The plugin name corresponds to the filename in the plugins.d/ directory without the file extension. You can list available plugins by checking this directory:

ls /opt/scout-agent/plugins.d/

Re-enabling Plugins

To re-enable a previously disabled plugin:

  1. Edit the configuration file again:

``bash sudo nano /opt/scout-agent/scout.conf ``

  1. Either change the value from 0 to 1:

`` plugin_cpanel=1 ``

Or remove the line entirely to allow auto-discovery to resume.

  1. Restart the agent:

``bash sudo systemctl restart scout-agent ``

Using the Interactive Configuration Menu

Scout agent provides an interactive configuration tool that simplifies plugin management:

  1. Run the configuration utility:

``bash sudo /opt/scout-agent/scout-agent --configure ``

  1. Navigate through the menu options to find plugin settings.
  1. Toggle plugins on or off using the interface.
  1. Save your changes and exit the menu.
  1. Restart the agent to apply changes:

``bash sudo systemctl restart scout-agent ``

This method is particularly useful if you're unsure about plugin names or prefer a graphical interface over manual file editing.

Verifying Active Plugins

After making configuration changes, verify which plugins are actually loaded:

  1. Check the agent startup logs:

``bash journalctl -u scout-agent --since "5 minutes ago" ``

  1. Look for "Plugin loaded" messages in the output. These indicate successfully activated plugins.
  1. Conversely, disabled plugins should not appear in these logs.

You can also check the current status of the Scout agent:

sudo systemctl status scout-agent

Best Practices

  • Always restart the agent after configuration changes
  • Keep a backup of your configuration file before making modifications
  • Monitor system performance after disabling plugins to ensure you're still collecting essential metrics
  • Document which plugins you've disabled and why, especially in team environments

Remember that disabling plugins reduces the monitoring coverage of your system. Only disable plugins you're certain you don't need, and regularly review your configuration to ensure it aligns with your current infrastructure and monitoring requirements.

Frequently Asked Questions

How do I disable a plugin in ServerScout agent?

Edit the Scout configuration file at /opt/scout-agent/scout.conf and add a line with plugin_<name>=0, replacing <name> with the plugin filename from plugins.d/ directory without extension. Save the file and restart the agent with sudo systemctl restart scout-agent.

How does ServerScout plugin auto-discovery work?

When the Scout agent starts, it automatically scans the plugins.d/ directory and runs each plugin's detect function. If the detect function finds the relevant service or application on your system, the plugin is loaded and begins collecting metrics without manual configuration.

Why is my disabled plugin still running after configuration changes?

You must restart the Scout agent after making configuration changes for them to take effect. Run sudo systemctl restart scout-agent and then check the startup logs with journalctl -u scout-agent --since "5 minutes ago" to verify the plugin is no longer loaded.

How do I re-enable a previously disabled plugin?

Edit /opt/scout-agent/scout.conf and either change the plugin setting from plugin_name=0 to plugin_name=1, or remove the line entirely to allow auto-discovery to resume. Restart the agent with sudo systemctl restart scout-agent to apply changes.

What is the interactive configuration menu in ServerScout?

Run sudo /opt/scout-agent/scout-agent --configure to access an interactive tool that simplifies plugin management. You can navigate through menu options, toggle plugins on or off using the interface, and save changes without manually editing configuration files.

When should I disable ServerScout plugins?

Disable plugins when you have unused control panels like cPanel, need to optimize performance on resource-constrained systems, resolve plugin conflicts, meet security compliance requirements limiting data collection, or isolate specific plugins during troubleshooting.

How can I see which plugins are currently active in ServerScout?

Check the agent startup logs with journalctl -u scout-agent --since "5 minutes ago" and look for "Plugin loaded" messages. You can also list available plugins by checking the /opt/scout-agent/plugins.d/ directory with ls command.

Was this article helpful?