RHEL/CentOS 8/7, Fedora 30 എന്നിവയിൽ Nagios 4.4.5 എങ്ങനെ ഇൻസ്റ്റാൾ ചെയ്യാം
നാഗിയോസ് ഒരു മികച്ച ഓപ്പൺ സോഴ്uസ് മോണിറ്ററിംഗ് ടൂളാണ്, നിങ്ങൾ നിങ്ങളുടെ ഡാറ്റാ സെന്ററിലായാലും ചെറിയ ലാബുകളിലായാലും നിങ്ങളുടെ എല്ലാ യന്ത്രങ്ങളും/നെറ്റ്uവർക്കുകളും എപ്പോഴും നിരീക്ഷിക്കുന്നതിന് കൂടുതൽ സമഗ്രമായ നിരീക്ഷണ അന്തരീക്ഷം ഇത് നിങ്ങൾക്ക് നൽകുന്നു.
നാഗിയോസ് ഉപയോഗിച്ച്, നിങ്ങളുടെ റിമോട്ട് ഹോസ്റ്റുകളെയും അവരുടെ സേവനങ്ങളെയും ഒരു വിൻഡോയിൽ വിദൂരമായി നിരീക്ഷിക്കാനാകും. ഇത് മുന്നറിയിപ്പുകൾ കാണിക്കുകയും നിങ്ങളുടെ സെർവറുകളിൽ എന്തെങ്കിലും തെറ്റ് സംഭവിക്കുകയാണെങ്കിൽ അത് സൂചിപ്പിക്കുകയും അത് ചില പ്രശ്നങ്ങൾ ഉണ്ടാകുന്നതിന് മുമ്പ് അത് കണ്ടെത്താൻ ഞങ്ങളെ സഹായിക്കുന്നു. പ്രവർത്തനരഹിതമായ സമയവും ബിസിനസ്സ് നഷ്ടവും കുറയ്ക്കാൻ ഇത് ഞങ്ങളെ സഹായിക്കുന്നു.
അടുത്തിടെ, നാഗിയോസ് അതിന്റെ ഏറ്റവും പുതിയ പതിപ്പായ നാഗിയോസ് കോർ 4.4.5 ഉം നാഗിയോസ് പ്ലഗിനുകളുടെ ഏറ്റവും പുതിയ സ്ഥിരമായ പതിപ്പായ 2.2.1 ഓഗസ്റ്റ് 20, 2019 ന് പുറത്തിറക്കി.
ഈ ലേഖനം RHEL 8/7/6, CentOS 8/7/6, Fedora 26-30 വിതരണങ്ങളിൽ ഉറവിടത്തിൽ നിന്ന് (ടാർബോൾ) ഏറ്റവും പുതിയ നാഗിയോസ് കോർ 4.4.5 എങ്ങനെ ഇൻസ്റ്റാൾ ചെയ്യാം എന്നതിനെക്കുറിച്ചുള്ള ലളിതമായ നിർദ്ദേശങ്ങളുമായി നിങ്ങളെ നയിക്കാൻ ഉദ്ദേശിച്ചുള്ളതാണ്.
30 മിനിറ്റിനുള്ളിൽ നിങ്ങൾ നിങ്ങളുടെ ലോക്കൽ മെഷീൻ നിരീക്ഷിക്കും, ഇന്നത്തെ മിക്ക ലിനക്സ് സെർവറുകളിലും 100% പ്രവർത്തിക്കുന്ന അടിസ്ഥാന ഇൻസ്റ്റാളേഷൻ മാത്രം വിപുലമായ ഇൻസ്റ്റാളേഷൻ നടപടിക്രമമില്ല.
ദയവായി ശ്രദ്ധിക്കുക: ഇവിടെ കാണിച്ചിരിക്കുന്ന ഇൻസ്റ്റലേഷൻ നിർദ്ദേശങ്ങൾ CentOS 7.5 Linux വിതരണത്തെ അടിസ്ഥാനമാക്കി എഴുതിയതാണ്.
നാഗിയോസ് 4.4.5, നാഗിയോസ് പ്ലഗിൻ 2.2.1 എന്നിവ ഇൻസ്റ്റോൾ ചെയ്യുന്നു
നിങ്ങൾ ഈ നിർദ്ദേശങ്ങൾ ശരിയായി പാലിക്കുകയാണെങ്കിൽ, ഇനിപ്പറയുന്ന വിവരങ്ങൾ നിങ്ങൾക്ക് ലഭിക്കും.
- നാഗിയോസും അതിന്റെ പ്ലഗിന്നുകളും /usr/local/nagios ഡയറക്uടറിക്ക് കീഴിൽ ഇൻസ്റ്റാൾ ചെയ്യപ്പെടും.
- നിങ്ങളുടെ പ്രാദേശിക മെഷീന്റെ (ഡിസ്ക് ഉപയോഗം, സിപിയു ലോഡ്, നിലവിലെ ഉപയോക്താക്കൾ, മൊത്തം പ്രക്രിയകൾ മുതലായവ) കുറച്ച് സേവനങ്ങൾ നിരീക്ഷിക്കാൻ നാഗിയോസ് കോൺഫിഗർ ചെയ്യപ്പെടും.
- Nagios വെബ് ഇന്റർഫേസ് http://localhost/nagios എന്നതിൽ ലഭ്യമാകും
ഉറവിടത്തോടൊപ്പം നാഗിയോസ് 4.4.5 ഇൻസ്റ്റാൾ ചെയ്യുന്നതിന് മുമ്പ് നമുക്ക് Apache, PHP എന്നിവയും gcc, glibc, glibc-common, GD ലൈബ്രറികളും അതിന്റെ വികസന ലൈബ്രറികളും ഇൻസ്റ്റാൾ ചെയ്യേണ്ടതുണ്ട്. അങ്ങനെ ചെയ്യുന്നതിന്, നമുക്ക് yum ഡിഫോൾട്ട് പാക്കേജ് ഇൻസ്റ്റാളർ ഉപയോഗിക്കാം.
yum install -y httpd httpd-tools php gcc glibc glibc-common gd gd-devel make net-snmp -------------- On Fedora -------------- dnf install -y httpd httpd-tools php gcc glibc glibc-common gd gd-devel make net-snmp
userradd കമാൻഡും nagcmd ഗ്രൂപ്പ് അക്കൗണ്ടും ഉപയോഗിച്ച് ഒരു പുതിയ നാഗിയോസ് ഉപയോക്താവിനെ സൃഷ്ടിച്ച് ഒരു പാസ്uവേഡ് സജ്ജമാക്കുക.
useradd nagios groupadd nagcmd
അടുത്തതായി, usermod കമാൻഡ് ഉപയോഗിച്ച് nagcmd ഗ്രൂപ്പിലേക്ക് nagios ഉപയോക്താവിനെയും അപ്പാച്ചെ ഉപയോക്താവിനെയും ചേർക്കുക.
usermod -G nagcmd nagios usermod -G nagcmd apache
നിങ്ങളുടെ Nagios ഇൻസ്റ്റാളേഷനും അതിന്റെ എല്ലാ ഭാവി ഡൗൺലോഡുകൾക്കുമായി ഒരു ഡയറക്ടറി സൃഷ്ടിക്കുക.
mkdir /root/nagios cd /root/nagios
ഇപ്പോൾ wget കമാൻഡ് ഉപയോഗിച്ച് ഏറ്റവും പുതിയ Nagios Core 4.4.5, Nagios പ്ലഗിനുകൾ 2.2.1 പാക്കേജുകൾ ഡൗൺലോഡ് ചെയ്യുക.
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.4.5.tar.gz wget https://nagios-plugins.org/download/nagios-plugins-2.2.1.tar.gz
ഡൗൺലോഡ് ചെയ്uത പാക്കേജുകൾ നമുക്ക് ടാർ കമാൻഡ് ഉപയോഗിച്ച് ഇനിപ്പറയുന്ന രീതിയിൽ എക്uസ്uട്രാക്uറ്റ് ചെയ്യേണ്ടതുണ്ട്.
tar -xvf nagios-4.4.5.tar.gz tar -xvf nagios-plugins-2.2.1.tar.gz
നിങ്ങൾ ടാർ കമാൻഡ് ഉപയോഗിച്ച് ഈ ടാർബോളുകൾ എക്uസ്uട്രാക്റ്റ് ചെയ്യുമ്പോൾ, ആ ഡയറക്uടറിയിൽ രണ്ട് പുതിയ ഫോൾഡറുകൾ ദൃശ്യമാകും.
ls -l total 13520 drwxrwxr-x 18 root root 4096 Aug 20 17:43 nagios-4.4.5 -rw-r--r-- 1 root root 11101966 Aug 20 17:48 nagios-4.4.5.tar.gz drwxr-xr-x 15 root root 4096 Apr 19 12:04 nagios-plugins-2.2.1 -rw-r--r-- 1 root root 2728818 Apr 19 12:04 nagios-plugins-2.2.1.tar.gz
ഇപ്പോൾ, ആദ്യം നമ്മൾ നാഗിയോസ് കോർ കോൺഫിഗർ ചെയ്യും, അങ്ങനെ ചെയ്യുന്നതിന് നമ്മൾ നാഗിയോസ് ഡയറക്ടറിയിലേക്ക് പോയി കോൺഫിഗർ ഫയൽ പ്രവർത്തിപ്പിക്കേണ്ടതുണ്ട്, എല്ലാം ശരിയാണെങ്കിൽ, അത് അവസാനം ഔട്ട്പുട്ട് സാമ്പിൾ ഔട്ട്പുട്ടായി കാണിക്കും. താഴെ കാണുക.
cd nagios-4.4.5/ ./configure --with-command-group=nagcmd
Creating sample config files in sample-config/ ... *** Configuration summary for nagios 4.4.5 2019-08-20 ***: General Options: ------------------------- Nagios executable: nagios Nagios user/group: nagios,nagios Command user/group: nagios,nagcmd Event Broker: yes Install ${prefix}: /usr/local/nagios Install ${includedir}: /usr/local/nagios/include/nagios Lock file: /run/nagios.lock Check result directory: /usr/local/nagios/var/spool/checkresults Init directory: /lib/systemd/system Apache conf.d directory: /etc/httpd/conf.d Mail program: /usr/bin/mail Host OS: linux-gnu IOBroker Method: epoll Web Interface Options: ------------------------ HTML URL: http://localhost/nagios/ CGI URL: http://localhost/nagios/cgi-bin/ Traceroute (used by WAP): /usr/bin/traceroute Review the options above for accuracy. If they look okay, type 'make all' to compile the main program and CGIs.
കോൺഫിഗർ ചെയ്uതതിന് ശേഷം, ഞങ്ങൾ എല്ലാ ബൈനറികളും കംപൈൽ ചെയ്ത് ഇൻസ്റ്റാൾ ചെയ്യേണ്ടതുണ്ട്, ഒപ്പം ഇൻസ്റ്റാൾ കമാൻഡ് ഉണ്ടാക്കുകയും വേണം, അത് നിങ്ങളുടെ മെഷീനിൽ ആവശ്യമായ എല്ലാ ലൈബ്രറികളും ഇൻസ്റ്റാൾ ചെയ്യും, ഞങ്ങൾക്ക് തുടരാം.
make all make install
*** Compile finished *** If the main program and CGIs compiled without any errors, you can continue with testing or installing Nagios as follows (type 'make' without any arguments for a list of all possible options): make test - This runs the test suite make install - This installs the main program, CGIs, and HTML files make install-init - This installs the init script in /lib/systemd/system make install-daemoninit - This will initialize the init script in /lib/systemd/system make install-groups-users - This adds the users and groups if they do not exist make install-commandmode - This installs and configures permissions on the directory for holding the external command file make install-config - This installs *SAMPLE* config files in /usr/local/nagios/etc You'll have to modify these sample files before you can use Nagios. Read the HTML documentation for more info on doing this. Pay particular attention to the docs on object configuration files, as they determine what/how things get monitored! make install-webconf - This installs the Apache config file for the Nagios web interface make install-exfoliation - This installs the Exfoliation theme for the Nagios web interface make install-classicui - This installs the classic theme for the Nagios web interface
ഇനിപ്പറയുന്ന കമാൻഡ് നാഗിയോസിനായുള്ള init സ്ക്രിപ്റ്റുകൾ ഇൻസ്റ്റാൾ ചെയ്യും.
make install-init
കമാൻഡ് ലൈനിൽ നിന്ന് നാഗിയോസ് പ്രവർത്തിക്കുന്നതിന് ഞങ്ങൾ കമാൻഡ്-മോഡ് ഇൻസ്റ്റാൾ ചെയ്യേണ്ടതുണ്ട്.
make install-commandmode
അടുത്തതായി, സാമ്പിൾ നാഗിയോസ് ഫയലുകൾ ഇൻസ്റ്റാൾ ചെയ്യുക, ദയവായി ഇനിപ്പറയുന്ന കമാൻഡ് പ്രവർത്തിപ്പിക്കുക.
make install-config
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc /usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc/objects /usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/nagios.cfg /usr/local/nagios/etc/nagios.cfg /usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/cgi.cfg /usr/local/nagios/etc/cgi.cfg /usr/bin/install -c -b -m 660 -o nagios -g nagios sample-config/resource.cfg /usr/local/nagios/etc/resource.cfg /usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/templates.cfg /usr/local/nagios/etc/objects/templates.cfg /usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/commands.cfg /usr/local/nagios/etc/objects/commands.cfg /usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/contacts.cfg /usr/local/nagios/etc/objects/contacts.cfg /usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/timeperiods.cfg /usr/local/nagios/etc/objects/timeperiods.cfg /usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/localhost.cfg /usr/local/nagios/etc/objects/localhost.cfg /usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/windows.cfg /usr/local/nagios/etc/objects/windows.cfg /usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/printer.cfg /usr/local/nagios/etc/objects/printer.cfg /usr/bin/install -c -b -m 664 -o nagios -g nagios sample-config/template-object/switch.cfg /usr/local/nagios/etc/objects/switch.cfg *** Config files installed *** Remember, these are *SAMPLE* config files. You'll need to read the documentation for more information on how to actually define services, hosts, etc. to fit your particular needs.
നിങ്ങൾ തിരഞ്ഞെടുത്ത എഡിറ്റർ ഉപയോഗിച്ച് “contacts.cfg” ഫയൽ തുറന്ന് ഇമെയിൽ അലേർട്ടുകൾ സ്വീകരിക്കുന്നതിന് നാഗിയോസാഡ്മിൻ കോൺടാക്റ്റ് ഡെഫനിഷനുമായി ബന്ധപ്പെട്ട ഇമെയിൽ വിലാസം സജ്ജമാക്കുക.
# vi /usr/local/nagios/etc/objects/contacts.cfg
############################################################################### ############################################################################### # # CONTACTS # ############################################################################### ############################################################################### # Just one contact defined by default - the Nagios admin (that's you) # This contact definition inherits a lot of default values from the 'generic-contact' # template which is defined elsewhere. define contact{ contact_name nagiosadmin ; Short name of user use generic-contact ; Inherit default values from generic-contact template (defined above) alias Nagios Admin ; Full name of user email [email ; *** CHANGE THIS TO YOUR EMAIL ADDRESS **** }
ബാക്കെൻഡിലെ എല്ലാ കോൺഫിഗറേഷനുകളും ഞങ്ങൾ പൂർത്തിയാക്കി, ഇപ്പോൾ ഞങ്ങൾ ഇനിപ്പറയുന്ന കമാൻഡ് ഉപയോഗിച്ച് നാഗിയോസിനായുള്ള വെബ് ഇന്റർഫേസ് കോൺഫിഗർ ചെയ്യും. താഴെയുള്ള കമാൻഡ് നാഗിയോസിനായുള്ള വെബ് ഇന്റർഫേസ് കോൺഫിഗർ ചെയ്യുകയും ഒരു വെബ് അഡ്മിൻ ഉപയോക്താവിനെ \nagiosadmin സൃഷ്ടിക്കുകയും ചെയ്യും.
make install-webconf
ഈ ഘട്ടത്തിൽ, ഞങ്ങൾ \nagiosadmin എന്നതിനായി ഒരു പാസ്uവേഡ് സൃഷ്uടിക്കും. ഈ കമാൻഡ് എക്uസിക്യൂട്ട് ചെയ്uത ശേഷം, ദയവായി ഒരു പാസ്uവേഡ് രണ്ടുതവണ നൽകുകയും അത് ഓർമ്മിക്കുക, കാരണം നിങ്ങൾ നാഗിയോസ് വെബ് ഇന്റർഫേസിൽ ലോഗിൻ ചെയ്യുമ്പോൾ ഈ പാസ്uവേഡ് ഉപയോഗിക്കും.
htpasswd -s -c /usr/local/nagios/etc/htpasswd.users nagiosadmin New password: Re-type new password: Adding password for user nagiosadmin
പുതിയ ക്രമീകരണങ്ങൾ പ്രാബല്യത്തിൽ വരുത്തുന്നതിന് അപ്പാച്ചെ പുനരാരംഭിക്കുക.
service httpd start [On RHEL/CentOS 6] systemctl start httpd.service [On RHEL/CentOS 7/8 and Fedora]
ഞങ്ങൾ /root/nagios-ൽ നാഗിയോസ് പ്ലഗിനുകൾ ഡൗൺലോഡ് ചെയ്uതു, അവിടെ പോയി കോൺഫിഗർ ചെയ്uത് ഇൻസ്റ്റാൾ ചെയ്യുക.
cd /root/nagios cd nagios-plugins-2.2.1/ ./configure --with-nagios-user=nagios --with-nagios-group=nagios make make install
ഇപ്പോൾ നാമെല്ലാവരും നാഗിയോസ് കോൺഫിഗറേഷൻ പൂർത്തിയാക്കി, അത് സ്ഥിരീകരിക്കാനുള്ള സമയവും അങ്ങനെ ചെയ്യുന്നതിന് ദയവായി ഇനിപ്പറയുന്ന കമാൻഡ് ചേർക്കുക. എല്ലാം സുഗമമായി നടന്നാൽ, താഴെയുള്ള ഔട്ട്uപുട്ടിന് സമാനമായി അത് കാണിക്കും.
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.4.5 Copyright (c) 2009-present Nagios Core Development Team and Community Contributors Copyright (c) 1999-2009 Ethan Galstad Last Modified: 2019-08-20 License: GPL Website: https://www.nagios.org Reading configuration data... Read main config file okay... Read object config files okay... Running pre-flight check on configuration data... Checking objects... Checked 8 services. Checked 1 hosts. Checked 1 host groups. Checked 0 service groups. Checked 1 contacts. Checked 1 contact groups. Checked 24 commands. Checked 5 time periods. Checked 0 host escalations. Checked 0 service escalations. Checking for circular paths... Checked 1 hosts Checked 0 service dependencies Checked 0 host dependencies Checked 5 timeperiods Checking global event handlers... Checking obsessive compulsive processor commands... Checking misc settings... Total Warnings: 0 Total Errors: 0 Things look okay - No serious problems were detected during the pre-flight check
റീബൂട്ടുകളിൽ ഉടനീളം നാഗിയോസ് പ്രവർത്തിക്കാൻ, chkconfig, systemctl കമാൻഡ് എന്നിവയ്uക്കൊപ്പം nagios, httpd എന്നിവ ചേർക്കേണ്ടതുണ്ട്.
chkconfig --add nagios chkconfig --level 35 nagios on chkconfig --add httpd chkconfig --level 35 httpd on
systemctl enable nagios systemctl enable httpd
പുതിയ ക്രമീകരണങ്ങൾ പ്രാബല്യത്തിൽ വരുത്താൻ നാഗിയോസ് പുനരാരംഭിക്കുക.
service nagios start [On RHEL/CentOS 6] systemctl start nagios.service [On RHEL/CentOS 7/8 and Fedora]
നിങ്ങളുടെ നാഗിയോസ് പ്രവർത്തിക്കാൻ തയ്യാറാണ്, ദയവായി അത് നിങ്ങളുടെ ബ്രൗസറിൽ \http://Your-server-IP-address/nagios അല്ലെങ്കിൽ \http://FQDN/nagios ഉപയോഗിച്ച് തുറന്ന് \nagiosadmin എന്ന ഉപയോക്തൃനാമം നൽകുക. password.
അഭിനന്ദനങ്ങൾ! നിങ്ങൾ നാഗിയോസും അതിന്റെ പ്ലഗിന്നുകളും വിജയകരമായി ഇൻസ്റ്റാൾ ചെയ്യുകയും കോൺഫിഗർ ചെയ്യുകയും ചെയ്തു. നിങ്ങൾ നിരീക്ഷണത്തിലേക്കുള്ള നിങ്ങളുടെ യാത്ര ആരംഭിച്ചിരിക്കുന്നു.
Nagios 3.x-നെ Nagios 4.4.5-ലേക്ക് അപ്uഗ്രേഡ് ചെയ്യുക
നിങ്ങൾ ഇതിനകം നാഗിയോസിന്റെ പഴയ പതിപ്പാണ് പ്രവർത്തിപ്പിക്കുന്നതെങ്കിൽ, നിങ്ങൾക്ക് അത് എപ്പോൾ വേണമെങ്കിലും അപ്uഗ്രേഡ് ചെയ്യാം. അങ്ങനെ ചെയ്യുന്നതിന്, നിങ്ങൾ അതിന്റെ ഏറ്റവും പുതിയ ടാർ ആർക്കൈവ് ഡൗൺലോഡ് ചെയ്uത് ചുവടെ കാണിച്ചിരിക്കുന്നതുപോലെ കോൺഫിഗർ ചെയ്യേണ്ടതുണ്ട്.
service nagios stop wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.4.5.tar.gz tar -zxvf nagios-4.4.5.tar.gz cd nagios-4.4.5 ./configure make all make install service nagios start
ഇപ്പോൾ അത്രയേയുള്ളൂ, എന്റെ വരാനിരിക്കുന്ന ലേഖനങ്ങളിൽ, Nagios മോണിറ്ററിംഗ് സെർവറിലേക്ക് Linux, Windows, പ്രിന്ററുകൾ, സ്വിച്ചുകൾ, ഉപകരണങ്ങൾ എന്നിവ എങ്ങനെ ചേർക്കാമെന്ന് ഞാൻ കാണിച്ചുതരാം. ഇൻസ്റ്റാളുചെയ്യുമ്പോൾ നിങ്ങൾക്ക് എന്തെങ്കിലും പ്രശ്നമുണ്ടെങ്കിൽ, അഭിപ്രായങ്ങൾ വഴി ഞങ്ങളെ ബന്ധപ്പെടുക. അതുവരെ Tecmint-മായി തുടരുകയും കണക്uറ്റ് ചെയ്യുകയും ചെയ്യുക, ഒപ്പം പ്രചരിപ്പിക്കാൻ ഞങ്ങളെ ലൈക്ക് ചെയ്യാനും പങ്കിടാനും മറക്കരുത്.
ഇതും വായിക്കുക:
- നാഗിയോസ് മോണിറ്ററിംഗ് സെർവറിലേക്ക് ലിനക്സ് ഹോസ്റ്റ് എങ്ങനെ ചേർക്കാം
- നാഗിയോസ് മോണിറ്ററിംഗ് സെർവറിലേക്ക് വിൻഡോസ് ഹോസ്റ്റ് എങ്ങനെ ചേർക്കാം