Introduction
Shinken Enterprise includes a set of scalable internal mechanisms for checking the status of hosts and services on your network. These are called modules and can be loaded by the various Shinken Enterprise daemons involved in data acquisition (Poller daemons, Receiver daemons, Arbiter Daemon)
Shinken Enterprise also relies on external programs (called check plugins) to monitor a very wide variety of devices, applications and networked services.
...
Plugins are compiled executables or scripts (Perl scripts, shell scripts, etc.) that can be run from a command line to check the status of a host or service. Shinken Enterprise uses the results from plugins to determine the current status of hosts and services on your network and obtain performance data about the monitored service.
Shinken Enterprise will execute a plugin whenever there is a need to check the status of a service or host. The plugin does something (notice the very general term) to perform the check and then simply returns the results to Shinken Enterprise . It will process the results that it receives from the plugin and take any necessary actions (running event handlers, sending out notifications, etc).
...
Plugins act as an abstraction layer between the monitoring logic present in the Shinken Enterprise daemon and the actual services and hosts that are being monitored.
The upside value of this type of plugin architecture is that you can monitor just about anything you can think of.
If you can automate the process of checking something, you can monitor it with Shinken Enterprise .
There are already literally thousands of plugins that have been created in order to monitor basic resources such as processor load, disk usage, ping rates, etc.
If you want to monitor something else, take a look at the documentation on :ref:`writing plugins <development/pluginapi>` and roll your own. It's simple!
The downside to this type of plugin architecture is the fact that Shinken Enterprise has absolutely no idea about what is monitored.
You could be monitoring network traffic statistics, data error rates, room temperate, CPU voltage, fan speed, processor load, disk space, or the ability of your super-fantastic toaster to properly brown your bread in the morning...
Shinken Enterprise doesn't understand the specifics of what's being monitored - it just tracks changes in the state of those resources.
Only the plugins know exactly what they're monitoring and how to perform the actual checks.
...
- Applications, databases, logs and more.
Obtaining Plugins
Shinken Enterprise also organizes monitoring configuration packages. These are pre-built for fast no nonsense deployments.
They include the check command definitions, service templates, host templates, discovery rules and integration hooks to the Community web site.
The integration with the community web site permits deployment and updates of monitoring packs.
Get started with :ref:`Shinken Enterprise Monitoring Packages "Packs" <contributing/create-and-push-packs>` today.
The plugins themselves are not distributed with Shinken Enterprise , but you can download the official Monitoring-plugins and many additional plugins created and maintained by shinken Shinken Enterprise users from the following locations:
...
Scripts and executables must do two things (at a minimumleast) in order to function work as Shinken Enterprise plugins:
Exit with one of several possible return values
Return at least one line of text output to "STDOUT"
The inner workings of your plugin are unimportant not important to Shinken Enterprise , interface between them is important.
Your plugin could check the status of a TCP port, run a database query, check disk free space, or do whatever else it needs to check something.
The details will depend on what needs to be checked - that's up to you.
If you are interested in having a plugin that is performant to use with Shinken Enterprise , consider making it a Python or python + C type plugin that is daemonized by the Shinken Enterprise poller or receiver daemons.
You can look at the existing poller daemons for how to create a module, it is very simple.
Return Code
Shinken Enterprise determines the status of a host or service by evaluating the return code from plugins.
The following tables shows a list of valid return codes, along with their corresponding service or host states.
...
If the :ref:`use_aggressive_host_checking <advanced/unused-shinkenShinken Enterprise -parameters#use_aggressive_host_checking>` option is enabled, return codes of 1 will result in a host state of DOWN or UNREACHABLE. Otherwise return codes of 1 will result in a host state of UP. The process by which shinken Shinken Enterprise determines whether or not a host is DOWN or UNREACHABLE is discussed :ref:`here <thebasics/networkreachability>`.
Plugin Output Spec
At a minimumleast, plugins should return at least one of text output. Beginning with shinken Shinken Enterprise 3, plugins can optionally return multiple lines of output. Plugins may also return optional performance data that can be processed by external applications. The basic format for plugin output is shown below:
...
Plugin Output Length Restrictions
shinken Shinken Enterprise will only read the first 64 KB of data that a plugin returns. This is done in order to prevent runaway plugins from dumping megs or gigs of data back to shinkenShinken Enterprise .