``profile::icinga::nrpe``
=========================

This profile is a function that configures ``nrpe`` and ``sudoers`` (whenever needed) for a specific command: 
  * Will create a ``/etc/nrpe.d/<filename>.cfg`` file for ``nrpe``
  * Will create a ``/etc/sudoers.d/<filename>`` file for ``sudoers`` (if ``sudo`` is required)

Parameters
----------

======================  ==========  =========================================================
**Name**                **Type**    **Default**
----------------------  ----------  ---------------------------------------------------------
command                 String      
sudo                    Boolean     ``false``
notifications_enabled   Boolean     ``true``
======================  ==========  =========================================================

``command``
~~~~~~~~~~~

Full path for the command to be configured in the ``nrpe.d`` file. This will be translated
in the ``nrpe.d`` as::

  # sudo = true
  command[${title}]=/usr/bin/sudo ${command}
  
  # sudo = false
  command[${title}]=${command}               

``sudo``
~~~~~~~~

Whether ``sudo`` is required or not for that command. By default is ``false``.
When set to ``true``, ``/usr/bin/sudo`` will be added to the ``nrpe`` command, and proper
``sudoers`` file will be configured. Example::

   Defaults:nrpe !requiretty
   nrpe ALL=(root) NOPASSWD: ${command}

``notifications_enables``
~~~~~~~~~~~~~~~~~~~~~~~~~

Currently this settings has no effect. Will be used when exporting Nagios resources to the PuppetDB.
Please ignore it in the meantime.

Facts
-----

When some specific facts are detected, it will trigger some actions.

=====================================  ===============  ==============================================
**Fact**                               **Value(s)**     **Action description**
-------------------------------------  ---------------  ----------------------------------------------
=====================================  ===============  ==============================================
