<commit_before>.. _15_nagios:

Monitoring: Nagios
==================

Monitoring Basics
-----------------


* What types of resources should we monitor?

.. rst-class:: build

  * Load
  * Disk usage
  * Memory/Swap usage
  * Services: ssh, httpd, etc

What is Nagios?
---------------

* Open source monitoring system
* Monitors Services

  * HTTP, SSH, ICMP, processor, load, etc

* Sends notifications of outages
* Offers a web interface

History of Nagios
-----------------

* Created in 1999 by <NAME>
* Originally called "NetSaint" but was challenged for the trademark

  * Stands for *"Nagios Ain't Gonna Insist On Sainthood"*

* Icinga is a fork of Nagios created in 2009

  * Development process problems, lack of new features

* Nagios Plugins site

  * Community run site now called `Monitoring Plugins`_
  * Community collection of Nagios Plugins

.. _Monitoring Plugins: https://www.monitoring-plugins.org/

Components of Nagios
--------------------

* Core server process

  * Core logic for monitoring
  * Keeps track of service states
  * Starts service checks

* CGI Web interface

  * Simple web interface which connects to the core server process via sockets

Components of Nagios
--------------------

* Plugins

  * Scripts written to gather monitoring information
  * Typically written in Perl, but can be written in about anything
  * Has an API that you follow to create your own plugin

* NRPE/NSCA

  * Daemons that actually execute the plugin on a server
  * NRPE: Active checking daemon
  * NSCA: Passive checking daemon

Passive vs. Active
------------------

.. image:: ../_static/nrpe.png
  :align: center
  :width: 90%

.. figure:: ../_static/nsca.png
  :align: center
  :width: 90%

  Images from nagios.org documentation site

Active: NRPE<commit_msg>clarify nrpe/nsca slide<commit_after>.. _15_nagios:

Monitoring: Nagios
==================

Monitoring Basics
-----------------


* What types of resources should we monitor?

.. rst-class:: build

  * Load
  * Disk usage
  * Memory/Swap usage
  * Services: ssh, httpd, etc

What is Nagios?
---------------

* Open source monitoring system
* Monitors Services

  * HTTP, SSH, ICMP, processor, load, etc

* Sends notifications of outages
* Offers a web interface

History of Nagios
-----------------

* Created in 1999 by <NAME>
* Originally called "NetSaint" but was challenged for the trademark

  * Stands for *"Nagios Ain't Gonna Insist On Sainthood"*

* Icinga is a fork of Nagios created in 2009

  * Development process problems, lack of new features

* Nagios Plugins site

  * Community run site now called `Monitoring Plugins`_
  * Community collection of Nagios Plugins

.. _Monitoring Plugins: https://www.monitoring-plugins.org/

Components of Nagios
--------------------

* Core server process

  * Core logic for monitoring
  * Keeps track of service states
  * Starts service checks

* CGI Web interface

  * Simple web interface which connects to the core server process via sockets

Components of Nagios
--------------------

* Plugins

  * Scripts written to gather monitoring information
  * Typically written in Perl, but can be written in about anything
  * Has an API that you follow to create your own plugin

* NRPE/NSCA

  * Daemons that handle remote checks
  * NRPE: Active checking daemon
  * NSCA: Passive checking daemon (just listens for data)

Passive vs. Active
------------------

.. image:: ../_static/nrpe.png
  :align: center
  :width: 90%

.. figure:: ../_static/nsca.png
  :align: center
  :width: 90%

  Images from nagios.org documentation site

Active: NRPE
{'fraction_non_alphanumeric': 0.13312866313145408, 'fraction_numerical': 0.007814680435389338, 'mean_word_length': 2.780590717299578, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '746153', 'n_tokens_mistral': 1099, 'n_tokens_neox': 1016, 'n_words': 425}