<commit_before>.. _monitoring-guidelines:

Recommendations for Monitoring the HPC Platform
===============================================

Setting Up Ganglia Server
-------------------------

On Master Node
^^^^^^^^^^^^^^

- Create ``/opt/vm/monitor.xml`` for deploying the storage VM (:download:`Available here <monitor.xml>`)

- Create disk image for the monitor VM::

    qemu-img create -f qcow2 monitor.qcow2 80G

- Define the VM::

    virsh define monitor.xml

On Deploy VM
^^^^^^^^^^^^

- Add the monitor server to ``/opt/metalware/etc/genders``, an example entry is below::

    # SERVICES
    monitor1 monitor,services,cluster,domain

- Create ``/var/lib/metalware/repo/config/monitor1.yaml`` with the following network and server definition::

    networks:
      pri:
        ip: 10.10.0.5
      
      mgt:
        defined: false
    
    ganglia:
      is_server: true

- Add the following to ``/var/lib/metalware/repo/config/domain.yaml``::

    ganglia:
      server: 10.10.0.5
      is_server: false

- Additionally, add the following to the ``setup:`` namespace list in ``/var/lib/metalware/repo/config/domain.yaml``:::

    - /opt/alces/install/scripts/ganglia.sh

- Download the ``ganglia.sh`` script to the above location::

    mkdir -p /opt/alces/install/scripts/
    cd /opt/alces/install/scripts/
    wget https://raw.githubusercontent.com/alces-software/knowledgebase/master/epel/7/ganglia/ganglia.sh

- Follow :ref:`client-deployment` to setup the compute nodes


<commit_msg>Added Nagios setup<commit_after>.. _monitoring-guidelines:

Recommendations for Monitoring the HPC Platform
===============================================

Setting Up Monitor Server (Ganglia & Nagios)
--------------------------------------------

On Master Node
^^^^^^^^^^^^^^

- Create ``/opt/vm/monitor.xml`` for deploying the storage VM (:download:`Available here <monitor.xml>`)

- Create disk image for the monitor VM::

    qemu-img create -f qcow2 monitor.qcow2 80G

- Define the VM::

    virsh define monitor.xml

On Deploy VM
^^^^^^^^^^^^

- Add the monitor server to ``/opt/metalware/etc/genders``, an example entry is below::

    # SERVICES
    monitor1 monitor,services,cluster,domain

- Create ``/var/lib/metalware/repo/config/monitor1.yaml`` with the following network and server definition::

    networks:
      pri:
        ip: 10.10.0.5
      
      mgt:
        defined: false
    
    ganglia:
      is_server: true
      
    nagios:
      is_server: true

- Add the following to ``/var/lib/metalware/repo/config/domain.yaml``::

    ganglia:
      server: 10.10.0.5
      is_server: false
    nagios:
      is_server: false

- Additionally, add the following to the ``setup:`` namespace list in ``/var/lib/metalware/repo/config/domain.yaml``:::

    - /opt/alces/install/scripts/ganglia.sh
    - /opt/alces/install/scripts/nagios.sh

- Download the ``ganglia.sh`` and ``nagios.sh`` scripts to the above location::

    mkdir -p /opt/alces/install/scripts/
    cd /opt/alces/install/scripts/
    wget https://raw.githubusercontent.com/alces-software/knowledgebase/master/epel/7/ganglia/ganglia.sh
    wget https://raw.githubusercontent.com/alces-software/knowledgebase/master/epel/7/nagios/nagios.sh

- Follow :ref:`client-deployment` to setup the compute nodes

This will setup minimal installations of both Ganglia and Nagios. All nodes within the domain will be built to connect to these services such that they can be monitored. It is possible to expand upon the metrics monitored and notification preferences.
{'fraction_non_alphanumeric': 0.16233766233766234, 'fraction_numerical': 0.01101072840203275, 'mean_word_length': 3.021566401816118, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6533493', 'n_tokens_mistral': 1121, 'n_tokens_neox': 1056, 'n_words': 304}