<commit_before>OpsMgr
=============

This project installs Nagios, ElasticSearch, Logstash and Kibana (ELK stack), and the opsmgr command line and user interface (as an OpenStack Horizon extension) on the cluster controller nodes that have been deployed with os-services.   Nagios is automatically configured to monitor the Openstack services running in the cluster.  Kibana dashboards are provided to monitor the logs generated by Openstack and Ceph. In addition OpsMgr is fully extensible via plugins to support additional open Ops tools (besides Nagios and ELK) and additional types of resources (besides OpenStack services) in the future.

In a typical Private Cloud scenario each node in the cluster is pre-conditioned by the cluster-genesis project which provides bare metal operating system installation services and then it invokes a solution specific service which in this case is provided by the os-services project.  This latter project guides the installation and configuration of Openstack and then orchestrates the installation of the OpsMgr stack of services for operational management.     

The os-services orchestration of OpsMgr is achieved by setting the following variables:

    > export DEPLOY_OPSMGR=yes
    > export ANSIBLE_HOST_KEY_CHECKING=False
    > export KIBANA_PASSWORD=<PASSWORD>
     
And then running the following scripts:

    > ./scripts/bootstrap-opsmgr.sh             
    > ./scripts/create-cluster-opsmgr.sh 

The bootstrap-opsmgr.sh script provides Openstack meta data that will be used by the caller, the os-services project, to create LXC containers for ELK.   This is accomplished by copying environment configuration files to /etc/openstack_deploy/env.d/ and is performed during the bootstrap phase of os-services installation.  The caller, os-services, uses this information to invoke openstack-ansible playbooks to create LXC containers.
Then, on the os-services create-cluster phase the corresponding script for OpsMgr is called.
That script will perform the following sequence of steps:
- execution of "predeploy" Ansible playbook that integrates OpsMgr with OpenStack-Ansible and installs and configures ELK on top of the containers created in the bootstrap phase
- execution of mainstream "opsmgr" Ansible playbook to deploy the opsmgr service and dashboards (within OpenStack Horizon containers) and completely installs Nagios server (also on containers) and configures haproxy and database
- execution of "provisioning" plugin playbook to deploy the endpoint services for Nagios (NRPE) and ELK (Beaver) and to push all necessary configuration at the endpoints that will be managed by the OpsMgr stack

Extensibility for OpsMgr can be easily achieved by providing additional "predeploy" and "provisioning" plugin playbooks.

The scripts above may be invoked manually to resolve errors, particularly network timeout related errors.

The default credentials for the integrated Ops applications are:

    Nagios user: nagios
    Nagios password: <PASSWORD>
    Kibana user: kibana

The kibana password if not set by the KIBANA_PASSWORD environment variable is randomly generated and can be found by looking at /etc/openstack_deploy/user_secrets_opsmgr.yml

It is recommended that the user changes these passwords after initial install, using these tools' documented practices.

If a different default value is desired, please set or modify the following Ansible variables prior to installing OpsMgr:

    - For Nagios:
    nagios_group: nagios (all configuration for Nagios can be changed by users belonging to this group)
    nagios_user:  nagios
    nagios_pass:  <PASSWORD>
    Location: playbooks/roles/nagios/defaults/main.yml (or use standard Ansible override mechanisms: vars, group_vars, extra_vars, etc.)

    - For ELK:
    kibana_service_user: kibana
    kibana_service_group: root (similarly to Nagios, this control which users can change Kibana configuration)
    Location: predeploy/elk/roles/kibana/defaults/main.yml (or use standard Ansible override mechanisms: vars, group_vars, extra_vars, etc.)

Additional OpsMgr deployment default parameters can be overridden as well. For options please check this file:
playbooks/defaults/main.yml

Related projects
----------------

    > cluster-genesis<commit_msg>Fixing formatting issues with README.rst<commit_after>OpsMgr
=============

This project installs Nagios, ElasticSearch, Logstash and Kibana (ELK stack), and the opsmgr
command line and user interface (as an OpenStack Horizon extension) on the cluster controller
nodes that have been deployed with os-services. Nagios is automatically configured to monitor the
Openstack services running in the cluster. Kibana dashboards are provided to monitor the logs
generated by Openstack and Ceph. In addition OpsMgr is fully extensible via plugins to support
additional open Ops tools (besides Nagios and ELK) and additional types of resources
(besides OpenStack services) in the future.

In a typical Private Cloud scenario each node in the cluster is pre-conditioned by the
cluster-genesis project which provides bare metal operating system installation services
and then it invokes a solution specific service which in this case is provided by the os-services
project. This latter project guides the installation and configuration of Openstack and then
orchestrates the installation of the OpsMgr stack of services for operational management.

The os-services orchestration of OpsMgr is achieved by setting the following variables::

   > export DEPLOY_OPSMGR=yes
   > export ANSIBLE_HOST_KEY_CHECKING=False
   > export KIBANA_PASSWORD=<PASSWORD>
     
And then running the following scripts::

   > ./scripts/bootstrap-opsmgr.sh    
   > ./scripts/create-cluster-opsmgr.sh 

The bootstrap-opsmgr.sh script provides Openstack meta data that will be used by the caller, the
os-services project, to create LXC containers for ELK. This is accomplished by copying environment
configuration files to /etc/openstack_deploy/env.d/ and is performed during the bootstrap
phase of os-services installation. The caller, os-services, uses this information to invoke
openstack-ansible playbooks to create LXC containers. Then, on the os-services create-cluster phase
the corresponding script for OpsMgr is called.

That script will perform the following sequence of steps:

  * execution of "predeploy" Ansible playbook that integrates OpsMgr with OpenStack-Ansible
    and installs and configures ELK on top of the containers created in the bootstrap phase
  
  * execution of mainstream "opsmgr" Ansible playbook to deploy the opsmgr service and dashboards
    (within OpenStack Horizon containers) and completely installs Nagios server (also on 
    containers) and configures haproxy and database
  
  * execution of "provisioning" plugin playbook to deploy the endpoint services for Nagios (NRPE)
    and ELK (Beaver) and to push all necessary configuration at the endpoints that will be managed
    by the OpsMgr stack

Extensibility for OpsMgr can be easily achieved by providing additional "predeploy" and
"provisioning" plugin playbooks.

The scripts above may be invoked manually to resolve errors, particularly network timeout
related errors.

The default credentials for the integrated Ops applications are::

    Nagios user: nagios
    Nagios password: <PASSWORD>
    Kibana user: kibana

When the cluster is deployed by the genesis-cluster project, the default kibana password is 
'<PASSWORD>'. When running from os-services or the scripts in this project, the kibana password if
not set by the KIBANA_PASSWORD environment variable is randomly generated and can be found by
looking at /etc/openstack_deploy/user_secrets_opsmgr.yml

It is recommended that the user changes these passwords after initial install, using these tools'
documented practices.

If a different default value is desired, please set or modify the following Ansible variables prior to installing OpsMgr:

For Nagios::

    nagios_group: nagios (all configuration for Nagios can be changed by users belonging to this group)
    nagios_user:  nagios
    nagios_pass:  <PASSWORD>
    Location: playbooks/roles/nagios/defaults/main.yml (or use standard Ansible override mechanisms: vars, group_vars, extra_vars, etc.)

For ELK::

    kibana_service_user: kibana
    kibana_service_group: root (similarly to Nagios, this control which users can change Kibana configuration)
    Location: predeploy/elk/roles/kibana/defaults/main.yml (or use standard Ansible override mechanisms: vars, group_vars, extra_vars, etc.)

Additional OpsMgr deployment default parameters can be overridden as well. For options please check
this file: playbooks/defaults/main.yml

Related projects
----------------
::

    > cluster-genesis
{'fraction_non_alphanumeric': 0.04513769854873729, 'fraction_numerical': 0.0, 'mean_word_length': 4.639175257731959, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 22, 'https://': 0, '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': '3563042', 'n_tokens_mistral': 2227, 'n_tokens_neox': 2182, 'n_words': 1104}