Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

License: AGPL-3

NSCA Client

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.

Installation

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

On Debian/Ubuntu:

$ sudo apt-get install nsca-client

Configuration

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

nsca_client/static/description/server.png
  • Create NSCA checks in the menu Configuration / Technical / NSCA Client / Checks

nsca_client/static/description/check.png
  • 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.

Usage

Try me on Runbot

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed feedback.

Credits

Images

  • Daniel Foré: Icon (Elementary theme, GPL).

Contributors

Maintainer

Odoo Community Association

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.

Metadata

Release files for odoo11-addon-nsca-client 11.0.1.0.0.99.dev11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for odoo11-addon-nsca-client 11.0.1.0.0.99.dev11
File Interpreter ABI Platform
odoo11_addon_nsca_client-11.0.1.0.0.99.dev11-py2.py3-none-any.whl Python 2, Python 3 none any Details

Release files / odoo11_addon_nsca_client-11.0.1.0.0.99.dev11-py2.py3-none-any.whl

Download URL odoo11_addon_nsca_client-11.0.1.0.0.99.dev11-py2.py3-none-any.whl
Size 105.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
12410afb46f1dedb5a50170bc5530335e61e2af30f46ff288c307331117d1006
BLAKE2b-256 checksum
How to use checksums
3b635e16e7d9b05512b25d5f90d9d3f303920841d802db88e9c8593b96d01347
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Security for odoo11-addon-nsca-client 11.0.1.0.0.99.dev11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page