|
| 1 | +NAGIOS XI |
| 2 | + |
| 3 | +Create a virtual machine with 4GB ram on GCP |
| 4 | + |
| 5 | +Install docker on it |
| 6 | + |
| 7 | +sudo apt-get update |
| 8 | +sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common |
| 9 | + |
| 10 | +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - |
| 11 | +sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" |
| 12 | +sudo apt-get update ; clear |
| 13 | +sudo apt-get install -y docker-ce |
| 14 | +sudo service docker start |
| 15 | + |
| 16 | +RUN the below image to create a container for nagiosxi |
| 17 | + |
| 18 | +docker run -d -p 80:80 --name nagiosxi lerndevops/nagios:xi5.5.6 |
| 19 | + |
| 20 | +It is a heavy image, it will take time to create the container |
| 21 | + |
| 22 | +take externalip:80 to access nagiosxi frontend |
| 23 | +> click on access nagiosxi |
| 24 | +> set the timezone to new delhi |
| 25 | +> press next |
| 26 | +> USername=> nagiosadmin |
| 27 | +> password => nagiosadmin |
| 28 | +> give email address |
| 29 | + |
| 30 | +> click finish install |
| 31 | + |
| 32 | +> Click on login to Nagios XI |
| 33 | +> give username : nagiosadmin |
| 34 | + password as nagiosadmin |
| 35 | + |
| 36 | +> agree on agreement and click on submit |
| 37 | + |
| 38 | +On host summary you will see 1 host, that it is monitoring itself |
| 39 | + |
| 40 | +Setup complete. |
| 41 | + |
| 42 | +Scenario 1: monitor a lInux host |
| 43 | +*************************** |
| 44 | + |
| 45 | +for nagios server to monitor any other host machine, we have to first make chnages on the host machine |
| 46 | +we have to install NRPE plugin on the linux slave/host machine |
| 47 | + |
| 48 | +For that : |
| 49 | + |
| 50 | +go to configure --> configure wizards --> select linux server |
| 51 | + |
| 52 | +provide external ip of slave VM |
| 53 | + |
| 54 | +select os as ubuntu |
| 55 | + |
| 56 | +press next |
| 57 | + |
| 58 | +Click on Agent installation instructions |
| 59 | + |
| 60 | +Execute following steps from the document |
| 61 | + |
| 62 | +Installing The Agent |
| 63 | +Download the Linux NRPE agent to the /tmp directory on the Linux server you wish to monitor. |
| 64 | +cd /tmp |
| 65 | +wget https://assets.nagios.com/downloads/nagiosxi/agents/linux-nrpe-agent.tar.gz |
| 66 | +Unpack the installation archive you just downloaded: |
| 67 | +tar xzf linux-nrpe-agent.tar.gz |
| 68 | +Enter the newly created agent subdirectory: |
| 69 | +cd linux-nrpe-agent |
| 70 | + |
| 71 | +Run the wrapper script as root (if using Ubuntu you'll need to either run sudo -i to run as root or run the |
| 72 | +command with sudo in front): |
| 73 | +./fullinstall |
| 74 | + |
| 75 | +It will take some time to update |
| 76 | + |
| 77 | + |
| 78 | +Go back to nagios xi |
| 79 | + |
| 80 | +configure wixard--> linux server--> give details--press next -- |
| 81 | + |
| 82 | +explain monitoring settings |
| 83 | + |
| 84 | + |
| 85 | +ALLOW FROM on VM2 |
| 86 | +give as : 0.0.0.0/0 ==> give all addresses |
| 87 | + |
| 88 | +Agent/slave set up is done |
| 89 | + |
| 90 | +Go to nagios xi front end and click on finish |
| 91 | + |
| 92 | +go to HOME |
| 93 | + |
| 94 | +2 host will be avialble now |
| 95 | + |
| 96 | +click on the new google host |
| 97 | + |
| 98 | +on right side you can generate report, send email |
| 99 | +you can group the servers als |
| 100 | + |
| 101 | + |
| 102 | +*********************** |
| 103 | + |
| 104 | +Scenario2: |
| 105 | + |
| 106 | +Service level monitoring |
| 107 | + |
| 108 | +Go to slave machine and install nginx server onit, not container, its webserver we are installing |
| 109 | + |
| 110 | +# apt-get install nginx -y |
| 111 | + |
| 112 | +# ps -ef|grep nginx |
| 113 | + |
| 114 | +will give nginx is up and running |
| 115 | + |
| 116 | +this nginx service we want to monitor from nagiosxi |
| 117 | + |
| 118 | +for this |
| 119 | + |
| 120 | +go to configure wizrd--> select service tcp/UDP port |
| 121 | + |
| 122 | +Server address : give ip address of slave server where nginx is running |
| 123 | + |
| 124 | +server port : http |
| 125 | + |
| 126 | +Custom server port : |
| 127 | + |
| 128 | +port number : 80 |
| 129 | +port/application name : nginx webserver |
| 130 | +press next |
| 131 | +press finsih |
| 132 | + |
| 133 | + |
| 134 | +it will take time to reflect |
| 135 | + |
| 136 | +Scenario3: bring down nagios webserver and see if really the data and service are being monitored or not |
| 137 | + |
| 138 | +Go to VM2 --slave machine and stop nginx server |
| 139 | + |
| 140 | +# service nginx stop |
| 141 | + |
| 142 | +now got o nagiosxi and click on service nginx webserver |
| 143 | + |
| 144 | + |
| 145 | +Click on force immediate check |
| 146 | + |
| 147 | +status will be Critical |
| 148 | + |
| 149 | +Click on acknowledge this problem |
| 150 | + |
| 151 | +you name and time will be given |
| 152 | + |
| 153 | +This is port level monitoring or service level monitoring |
| 154 | + |
| 155 | +*********** |
| 156 | + |
| 157 | +Service 4: Monitor a URL |
| 158 | + |
| 159 | +got o configure wizard --> select website URL |
| 160 | + |
| 161 | +give url as www.google.com |
| 162 | + |
| 163 | +press next |
| 164 | + |
| 165 | + |
| 166 | +we will check the url status here |
| 167 | + |
| 168 | +clcik on fisinsh |
| 169 | + |
| 170 | +go to home and see 3 hosts will be there |
| 171 | + |
| 172 | +you can also configure your url also for monitoring firends |
| 173 | + |
| 174 | +********** |
| 175 | + |
| 176 | +Go to reports section on top.. you can schedule reports also , send reports |
| 177 | +download pdf format of reports |
| 178 | +send as email |
| 179 | + |
| 180 | + |
| 181 | +You cna also create dashboards |
| 182 | +manage dashlets to see specific data |
| 183 | + |
| 184 | + |
| 185 | + |
| 186 | + |
| 187 | + |
| 188 | + |
| 189 | + |
| 190 | + |
| 191 | + |
| 192 | + |
| 193 | + |
| 194 | +click on finish |
| 195 | + |
| 196 | + |
| 197 | + |
| 198 | + |
| 199 | + |
0 commit comments