Changes between Version 8 and Version 9 of NSM2021/Agenda/icinga_handson_cont


Ignore:
Timestamp:
May 30, 2021, 5:27:53 PM (4 years ago)
Author:
deepthi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NSM2021/Agenda/icinga_handson_cont

    v8 v9  
    88* How to add a service
    99
     10* How to check DNS
     11
     12* How to add an agent
     13
    1014* How to monitor disk space
    1115
    1216* How to check files
    13 
    14 * How to add an agent
    1517
    1618== How to add a host ==
     
    5052Rest is same as before we applied the services to the hosts.
    5153
     54== How to add an Agent==
     55
     56==== Host template for agents ====
     57
     58Agent settings are not available for modification directly on a host object. This requires you to create an “Icinga Agent” template. You could name it exactly like that; it’s important to use meaningful names for your templates.
     59
     60For setting up an agent, Host template should be created using iCinga director as follows,
     61
     62`Icinga director > Hosts > Host Templates`
     63
     64Main Properties will be shown as following
     65
     66[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/NSM2021/Agenda/icinga_handson_cont/agent1_host_template.png, 600)]]
     67
     68In the `Icinga agent and zone settings` , Following options should be selected,
     69
     70[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/NSM2021/Agenda/icinga_handson_cont/agent_host_template2.png, 600)]]
     71
     72'''NOTE : You should click deploy pending changes in Activity log section under Icinga Director'''
     73
     74==== Adding hosts as agents ====
     75
     76''Note : Always try to use meaningful names in configurations''
     77
     78After creating host template for, host can be added as an agent for the system.
     79
     80`Icinga director > Hosts > Host`
     81
     82As following example, the details should be assigned as per the requirement,
     83
     84[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/NSM2021/Agenda/icinga_handson_cont/adding_agent_host.png, 600)]]
     85
     86After apply the deployment, setup preparation for agent has to be done
     87
     88==== Before Executing the agent scripts... ====
     89
     90Before executing the agent scripts in the relevant machines,
     91
     92Icinga2 have to be installed in the Agent as following instructions below,
     93
     94{{{
     95
     96apt-get -y install apt-transport-https wget gnupg
     97
     98wget -O - https://packages.icinga.com/icinga.key | apt-key add -
     99
     100. /etc/os-release; if [ ! -z ${UBUNTU_CODENAME+x} ]; then DIST="${UBUNTU_CODENAME}"; else DIST="$(lsb_release -c| awk '{print $2}')"; fi;
     101
     102echo "deb https://packages.icinga.com/ubuntu icinga-${DIST} main" > /etc/apt/sources.list.d/${DIST}-icinga.list
     103
     104echo "deb-src https://packages.icinga.com/ubuntu icinga-${DIST} main" >> /etc/apt/sources.list.d/${DIST}-icinga.list
     105
     106apt-get update
     107
     108apt-get install icinga2 monitoring-plugins
     109
     110}}}
     111
     112'''Note : Please check the `/etc/hosts` file and verify that the agent is resolving for the FQDNvof master node before executing the agent scripts.'''
     113(Otherwise you will not be able to connect agent hosts with a certificate error)
     114
     115`icinga director > hosts > host >`, click on the agent and agent tab contains the scripts for agent manual configurations.
     116
     117Click on the agent host you added and a tab called Agent will be shown as in the following image,
     118
     119[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/NSM2021/Agenda/icinga_handson_cont/agent_scripts.png, 600)]]
     120
     121You will see two scripts to execute on agent hosts.
     122
     123They are for Agent deployment instructions, you will get Windows Kickstart Script and a command line script for the agents as above in the example.
     124
     125Download them in the the agent hosts and execute the scripts for configurations.
     126
     127`./icinga-agent.sh`
    52128
    53129== How to check disk space ==
     
    66142== How to check files ==
    67143
    68 == How to add an Agent==
    69 
    70 Agent settings are not available for modification directly on a host object. This requires you to create an “Icinga Agent” template. You could name it exactly like that; it’s important to use meaningful names for your templates.