OdooWiki OCA HUB
Tools License: AGPL-3

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.

auto_awesome What this module does

AI-generated from the code · Odoo 16.0

Configure monitoring servers and scheduled checks that send passive alerts from Odoo to an NSCA daemon (Nagios, Shinken, etc.).

This module adds a new 'NSCA Client' menu under the Custom menu, with two screens: Servers and Checks.

On the Servers screen you register each monitoring server: hostname, port, password, encryption method, and the hostname of the current Odoo node. A configuration file is written automatically when a server is created or modified, and a button on the server form shows how many checks are linked to it and opens them.

On the Checks screen you define scheduled checks. Each check is linked to a server, has a service name, a frequency (interval number and type), a next call date and an active flag. You also choose the Odoo model and method to run, plus optional arguments. The method must return a result code and message (0 OK, 1 WARNING, 2 CRITICAL, 3 UNKNOWN); if it returns nothing, a CRITICAL message is sent unless you tick 'Allow void result'. Any error is reported as CRITICAL.

Checks run through Odoo's scheduled job system and send their result to the NSCA daemon using the send_nsca command, which must be installed on the server. A built-in status method reports CPU, RAM and online user counts. Access is limited to the ERP manager group.

Depends on

base

Menus it adds

menu_action_nsca_check_treeNSCA Clientmenu_action_nsca_server_tree
Models and fields (2)
  • nsca.check · new modelcron_id (Cron), service, nsca_args (Arguments), server_id (Server), nsca_model (NSCA Model), nsca_function (Method), allow_void_result (Allow void result)
  • nsca.server · new modelname (Hostname), port, password, check_ids (Checks), check_count, node_hostname (Hostname of this node), config_dir_path (Configuration directory), config_file_path (Configuration file), encryption_method (Encryption method)

Text generated by AI (DeepSeek) from reading the Odoo 16.0 code on GitHub; it may contain mistakes, so check the code before deciding. View the code on GitHub

Availability by version

Reviewed: 2026-11-03
Confirmed (verified in repository and branch) Estimated (unverified) No information

Confirmation status: 4 confirmed, 5 with no information of 9 versions.

Sources · Odoo 16.0

Confirmed on 2026-11-03 in branch 16.0 of OCA/server-tools.

terminal Installation and usage

OCA documentation · Odoo 16.0

To use this module, you need to install a NSCA client.

On Debian/Ubuntu:

$ sudo apt-get install nsca-client

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
  • Create NSCA checks in the menu Configuration / Technical / NSCA Client / Checks
  • 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:

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.

No verified information in OCA: Usage.

info

Data imported from GitHub: this sheet reflects the latest catalog review, not a live lookup. Always check the module documentation and staging before installing in production.