<commit_before>Nagios-to-Alerta Gateway
========================

[![Build Status](https://travis-ci.org/alerta/nagios-alerta.png)](https://travis-ci.org/alerta/nagios-alerta)

Consolidate Nagios alerts from across multiple sites into a single "at-a-glance" console.

Transform this ...

![nagios](/docs/images/nagios3-v3.png?raw=true)

Into this ...

![alerta](/docs/images/nagios3-alerta-v3.png?raw=true)

Installation
------------

    $ git clone https://github.com/alerta/nagios3-alerta.git
    $ cd nagios3-alerta
    $ make
    $ sudo make install
    $ sudo service nagios3 restart

Alerts
------

To forward host and service check results to Alerta, modify `/etc/nagios3/nagios.cfg` as follows:
```
broker_module=/usr/lib/nagios3/alerta-neb.o http://localhost:8080
```

To provide the API key if authentication is enabled on the alerta server:
```
broker_module=/usr/lib/nagios3/alerta-neb.o http://localhost:8080 key=INSERT_API_KEY_HERE<commit_msg>Upadate README for Nagios 4<commit_after>Nagios-to-Alerta Gateway
========================

[![Build Status](https://travis-ci.org/alerta/nagios-alerta.png)](https://travis-ci.org/alerta/nagios-alerta)

Consolidate Nagios alerts from across multiple sites into a single "at-a-glance" console. Nagios 3 and Nagios 4 are now supported.

Transform this ...

![nagios](/docs/images/nagios3-v3.png?raw=true)

Into this ...

![alerta](/docs/images/nagios3-alerta-v3.png?raw=true)

Installation (Nagios 3)
------------

    $ git clone https://github.com/alerta/nagios-alerta.git
    $ cd nagios-alerta
    $ make
    $ sudo make install
    $ sudo service nagios3 restart

Installation (Nagios 4)
------------

    $ git clone https://github.com/alerta/nagios-alerta.git
    $ cd nagios-alerta
    $ make nagios4
    $ sudo make install
    $ sudo service nagios restart

Alerts
------

To forward host and service check results to Alerta, modify `/etc/nagios3/nagios.cfg` as follows:
```
broker_module=/usr/lib/nagios3/alerta-neb.o http://localhost:8080
```

To provide the API key if authentication is enabled on the alerta server:
```
broker_module=/usr/lib/nagios3/alerta-neb.o http://localhost:8080 key=INSERT_API_KEY_HERE
{'fraction_non_alphanumeric': 0.16475447452960074, 'fraction_numerical': 0.018357044515832952, 'mean_word_length': 3.64818763326226, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7598882', 'n_tokens_mistral': 806, 'n_tokens_neox': 770, 'n_words': 166}