mirror of
https://github.com/bringout/oca-technical.git
synced 2026-04-18 07:32:04 +02:00
Initial commit: OCA Technical packages (595 packages)
This commit is contained in:
commit
2cc02aac6e
24950 changed files with 2318079 additions and 0 deletions
|
|
@ -0,0 +1,56 @@
|
|||
To configure this module, you need to:
|
||||
|
||||
* Configure your server and a passive service in your monitoring tool
|
||||
(e.g service ``Odoo Mail Queue`` on host ``MY-SERVER``).
|
||||
|
||||
* Declare your NSCA server in the menu Configuration / Technical / NSCA Client / Servers
|
||||
|
||||
.. image:: nsca_client/static/description/server.png
|
||||
:width: 400 px
|
||||
|
||||
* Create NSCA checks in the menu Configuration / Technical / NSCA Client / Checks
|
||||
|
||||
.. image:: nsca_client/static/description/check.png
|
||||
:width: 400 px
|
||||
|
||||
* Code the methods which will be called by the NSCA checks.
|
||||
|
||||
Such methods must return a tuple ``(RC, MESSAGE, PERFORMANCE_DATA)`` where ``RC`` is an integer,
|
||||
``MESSAGE`` a unicode string AND ``PERFOMANCE_DATA`` is a dictionary.
|
||||
``RC`` values and the corresponding status are:
|
||||
|
||||
- 0: OK
|
||||
- 1: WARNING
|
||||
- 2: CRITICAL
|
||||
- 3: UNKNOWN
|
||||
|
||||
``PERFORMANCE_DATA`` is not mandatory, so it could be possible to send
|
||||
``(RC, MESSAGE)``.
|
||||
Each element of ``PERFORMANCE_DATA`` will be a dictionary that could contain:
|
||||
|
||||
- value: value of the data (required)
|
||||
- max: Max value on the chart
|
||||
- min: Minimum value on the chart
|
||||
- warn: Warning value on the chart
|
||||
- crit: Critical value on the chart
|
||||
- uom: Unit of Measure on the chart (s - Seconds, % - Percentage, B - Bytes, c - Continuous)
|
||||
|
||||
The key of the dictionary will be used as the performance_data label.
|
||||
|
||||
E.g:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class MailMail(models.Model):
|
||||
_inherit = 'mail.mail'
|
||||
|
||||
@api.model
|
||||
def nsca_check_mails(self):
|
||||
mails = self.search([('state', '=', 'exception')])
|
||||
if mails:
|
||||
return (1, u"%s mails not sent" % len(mails), {
|
||||
'exceptions': {'value': len(mails)}})
|
||||
return (0, u"OK", {'exceptions': {'value': len(mails)}})
|
||||
|
||||
On the example, the performance data will use the label ``exceptions`` and the
|
||||
value will be the number of exception of mails.
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
* Sébastien Alix <sebastien.alix@osiell.com>
|
||||
* Enric Tobella <etobella@creublanca.es>
|
||||
* Jaime Arroyo <jaime.arroyo@creublanca.es>
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
This is a technical module to send passive alerts to your favorite NSCA daemon
|
||||
(Nagios, Shinken...).
|
||||
This module is based on the Odoo cron system and requires a NSCA client
|
||||
installed on the system to satisfy the ``/usr/sbin/send_nsca`` command.
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
To use this module, you need to install a NSCA client.
|
||||
|
||||
On Debian/Ubuntu::
|
||||
|
||||
$ sudo apt-get install nsca-client
|
||||
Loading…
Add table
Add a link
Reference in a new issue