.. _nep_monitoring_core:


*****************
 Monitoring Core
*****************

Package ``nep-monitoring-core`` adds self-monitoring capabilities to a NetEye. It enables NetEye to:

- Find the main components of the current Infrastructure
- Monitor them using a predefined set of checks

This Package is the first of a series: it covers only NetEye Core module functionalities. To monitor other NetEye modules, other NEPs are required.
This Package will also act as a common base for other NetEye Monitoring-related Packages, therefore it is required to successfully monitor other NetEye modules.


Minimum supported environment
=============================
This package can be installed on systems running the software described below. Systems with equivalent components are also suitable for installation.

================= ===============
Required software Requirements
================= ===============
NetEye            Version ``4.20+``
NetEye  modules   ``Core``
================= ===============


Package requirements
====================

Service and Host Template shipped with package ``nep-monitoring-core`` require the following nep:

- nep-common

If the NetEye deployments that will receive Package ``nep-common`` is a clustered environment, additional preparations must be done.


Setup instructions
==================
If all requirements are met, you can now install this package. To manually set up the ``nep-monitoring-core`` package, just use ``nep-setup`` utility to install it.

.. code:: bash

    nep-setup install nep-monitoring-core


Post-Setup steps
----------------
Package ``nep-monitoring-core`` has self-populating capabilities.
To create the required monitoring objects, just run the automations provided by this Package.

1. Run the following Import Sources
    - NetEye infrastructure endpoints Source
    - NetEye infrastructure child zones Source
2. Run the following Sync Rules in the reported order:
    - NetEye infrastructure endpoints Rule
    - NetEye infrastructure child zones Rule

This will create the required objects for NetEye Monitoring.
Then, the generated Host Objects' properties must be updated to reflect the current configuration of the NetEye infrastructure:

1. Open Director
2. Locate Host Object *NetEye Master zone Endpoint*
3. Edit Custom Property *Installed modules*, selecting all the installed NetEye modules
4. If it is a Clustered NetEye deployment
    1. Search *NetEye Cluster node* inside the Host Objects: all cluster nodes will be found
    2. Edit Custom Property *Local Services* and select all the eventually installed NetEye Local services

After this, all the required services will be automatically assigned to the right Host Objects.

Then, the new configuration can be safely deployed.


Automatic Object's update
=========================

Automations provided by this Package can be freely used to generate and refresh all the required monitoring objects.
NetEye deployments are not updated often, but the automations can be eventually scheduled by the End User in the ``Jobs`` section of Director Automations.


Available Objects
=================

Automations provided with this Package can take care of everything themselves. Therefore, is not suggested to the End User to manually use Objects from this Package that are not Import Sources or Sync Rules.

This section contains a description of all the Objects from this package that can be used to build your own monitoring environment.


Director Objects
----------------
This package contains the following Director Objects:

**Host Templates**

The following Host Templates can be used to freely create Host Objects.
Remember to not edit these Host Templates because they will be restored/updated at the next NEP package update.

======================================== ===========
Host Template name                       Description
======================================== ===========
nx-ht-neteye-endpoint-master-cluster     Defines the NetEye Master Endpoint (``icinga2-master instance``) in a Clustered NetEye deployment
nx-ht-neteye-endpoint-master-simple      Defines the NetEye Master Endpoint (``icinga2-master instance``) in a Single-node NetEye deployment
nx-ht-neteye-endpoint-satellite-cluster  On a Clustered NetEye deployment, represents a Cluster Node
nx-ht-neteye-endpoint-satellite-simple   Represents a NetEye Satellite in both single deployment or HA deployment
nx-ht-neteye-voting-node                 On a Clustered NetEye deployment, represents a Voting Node
======================================== ===========

**Service Templates**

The following Service Templates can be used to freely create Service Objects, Service Apply Rules or Service Sets.
Remember to not edit these Service Templates because they will be restored/updated at the next NEP Package update.

============================================ ============ ===========
Template name                                Run on Agent Description
============================================ ============ ===========
nx-st-agent-icinga-cluster-performance       Yes          Check returns performance data for the current Icinga instance and connected endpoints
nx-st-agent-icinga-cluster-zone-performance  Yes          Measures the performance of an Icinga Cluster
nx-st-agent-icinga-ido-performance           Yes          Measures the performances of an Icinga IDO Connection
nx-st-agent-icinga-instance-performance      Yes          Measures the performances of an Icinga Instance
nx-st-agent-linux-cluster-crm-state          Yes          Checks the status of a Pacemaker based cluster using crm_mon
nx-st-agent-linux-drbd9-replica-health-state Yes          Checks the replication status of a DRBD Cluster node
nx-st-agentless-database-mysql-health        No           Checks various performances of a remote MySQL/MariaDB DBMS or Database
nx-st-agentless-byssh-disk-free-space        No (By SSH)  Checks Disk space usage on a Linux computer through a SSH channel
nx-st-agentless-byssh-unit-state             No (By SSH)  Checks SystemD-based unit status on a Linux computer through a SSH channel
nx-st-agentless-byssh-unit-state-no-enable   No (By SSH)  Checks SystemD-based unit status on a Linux computer through a SSH channel
============================================ ============ ===========


**Service Sets**

The following Service Sets can be used to freely monitor Host Objects.
Remember to not edit these Service Sets because they will be restored/updated at the next NEP Package update.

========================================= ===========
Service Set name                          Description
========================================= ===========
nx-ss-mysql-database-basic-performance    Perform basic mopnitoring of a MySQL/MariaDB Database
nx-ss-mysql-dbms-basic-performance        Perform basic mopnitoring of a MySQL/MariaDB DBMS
nx-ss-neteye-cluster-node-state           Monitor a PCS Cluster based node
nx-ss-neteye-core-cluster-state           Monitor NetEye Core Module on a Clustered NetEye Deployment
nx-ss-neteye-core-state                   Monitor NetEye Core Module on a Single-node NetEye Deployment
nx-ss-neteye-endpoint-basic-performance   Monitor basic performances of a NetEye Satellite
nx-ss-neteye-icinga2-satellite-state      Monitor Icinga2 performances on a NetEye Satellite
nx-ss-neteye-lampo-state                  Monitor NetEye Lampo service on a Single-node NetEye Deployment
nx-ss-neteye-linux-pcs-state              Monitor the status of cluster services on a PCS Cluster based node
========================================= ===========


**Automations**

The following Automations can be used to populate and maintain the monitored Host Objects.

============= ======================================== ===========
Type          Automation Name                          Description
============= ======================================== ===========
Import source NetEye infrastructure child zones Source Get all the available Icinga Cluster Zones
Import source NetEye infrastructure endpoints Source   Get all the available Icinga Endpoints
Sync rule     NetEye infrastructure child zones Rule   Enables monitoring of Cluster Zones through the right Service Templates
Sync rule     NetEye infrastructure endpoints Rule     Creates all the Host Objects represeting the NetEye Deployment
============= ======================================== ===========


ITOA Dashboards
---------------

The Package does not provide any ITOA Dashboard


Package's objects list
----------------------

.. csv-table::
    :file: objects_list.csv
    :header-rows: 1