നാഗിയോസ് മോണിറ്ററിംഗ് സെർവറിലേക്ക് വിൻഡോസ് ഹോസ്റ്റ് എങ്ങനെ ചേർക്കാം
CPU ലോഡ്, ഡിസ്ക് ഉപയോഗം, മെമ്മറി ഉപയോഗം, സേവനങ്ങൾ മുതലായവ പോലെയുള്ള Windows മെഷീനുകളുടെ സ്വകാര്യ സേവനങ്ങൾ എങ്ങനെ നിരീക്ഷിക്കാമെന്ന് ഈ ലേഖനം വിവരിക്കുന്നു. ഇതിനായി, ഞങ്ങൾ Windows മെഷീനിൽ ഒരു NSClient++ ആഡ്ഓൺ ഇൻസ്റ്റാൾ ചെയ്യേണ്ടതുണ്ട്. ആഡ്uഓൺ വിൻഡോസ് മെഷീനും നാഗിയോസിനും ഇടയിൽ ഒരു പ്രോക്സിയായി പ്രവർത്തിക്കുകയും check_nt പ്ലഗിനുമായി ആശയവിനിമയം നടത്തി യഥാർത്ഥ സേവനങ്ങൾ നിരീക്ഷിക്കുകയും ചെയ്യുന്നു. നിങ്ങൾ ഞങ്ങളുടെ Nagios ഇൻസ്റ്റാളേഷൻ ഗൈഡ് പിന്തുടരുകയാണെങ്കിൽ, നാഗിയോസ് മോണിറ്ററിംഗ് സെർവറിൽ check_nt പ്ലഗിൻ ഇതിനകം ഇൻസ്റ്റാൾ ചെയ്തിട്ടുണ്ട്.
ഞങ്ങളുടെ ഇനിപ്പറയുന്ന ഗൈഡുകൾ അനുസരിച്ച് നിങ്ങൾ ഇതിനകം തന്നെ നാഗിയോസ് സെർവർ ഇൻസ്റ്റാൾ ചെയ്യുകയും കോൺഫിഗർ ചെയ്യുകയും ചെയ്തിട്ടുണ്ടെന്ന് ഞങ്ങൾ അനുമാനിക്കുന്നു.
- RHEL/CentOS 6.x/5.x, Fedora 19/18/17 എന്നിവയിൽ Nagios 4.0.1 എങ്ങനെ ഇൻസ്റ്റാൾ ചെയ്യാം
- നാഗിയോസ് മോണിറ്ററിംഗ് സെർവറിലേക്ക് Linux ഹോസ്റ്റ് ചേർക്കുക
വിൻഡോസ് മെഷീനുകൾ നിരീക്ഷിക്കുന്നതിന് നിങ്ങൾ നിരവധി ഘട്ടങ്ങൾ പാലിക്കേണ്ടതുണ്ട്, അവ ഇവയാണ്:
- Windows മെഷീനിൽ NSClient++ ആഡ്ഓൺ ഇൻസ്റ്റാൾ ചെയ്യുക.
- വിൻഡോസ് മെഷീൻ നിരീക്ഷിക്കുന്നതിനായി നാഗിയോസ് സെർവർ കോൺഫിഗർ ചെയ്യുക.
- Windows മെഷീൻ നിരീക്ഷണത്തിനായി പുതിയ ഹോസ്റ്റ്, സേവന നിർവചനങ്ങൾ ചേർക്കുക.
- നാഗിയോസ് സേവനം പുനരാരംഭിക്കുക.
ഈ ഗൈഡ് ലളിതവും എളുപ്പവുമാക്കുന്നതിന്, നാഗിയോസ് ഇൻസ്റ്റാളേഷനിൽ നിങ്ങൾക്കായി കുറച്ച് കോൺഫിഗറേഷൻ ഇതിനകം ചെയ്തിട്ടുണ്ട്.
- command.cfg ഫയലിലേക്ക് ഒരു check_nt കമാൻഡ് നിർവചനം ഇതിനകം ചേർത്തിട്ടുണ്ട്. Windows സേവനങ്ങൾ നിരീക്ഷിക്കാൻ check_nt പ്ലഗിൻ ഈ നിർവചന കമാൻഡ് ഉപയോഗിക്കുന്നു.
- templates.cfg ഫയലിൽ ഇതിനകം സൃഷ്ടിച്ച ഒരു windows-server ഹോസ്റ്റ് ടെംപ്ലേറ്റ്. പുതിയ Windows ഹോസ്റ്റ് നിർവചനങ്ങൾ ചേർക്കാൻ ഈ ടെംപ്ലേറ്റ് നിങ്ങളെ അനുവദിക്കുന്നു.
മുകളിലുള്ള രണ്ട് ഫയലുകൾ “command.cfg”, “templates.cfg” ഫയലുകൾ /usr/local/nagios/etc/objects/ ഡയറക്ടറിയിൽ കാണാം. നിങ്ങളുടെ ആവശ്യത്തിന് അനുയോജ്യമായ നിങ്ങളുടെ സ്വന്തം നിർവചനങ്ങൾ പരിഷ്കരിക്കാനും ചേർക്കാനും കഴിയും. പക്ഷേ, ഈ ലേഖനത്തിൽ വിവരിച്ചിരിക്കുന്ന നിർദ്ദേശങ്ങൾ പാലിക്കാൻ ഞാൻ നിങ്ങളോട് ശുപാർശ ചെയ്യുന്നു, കൂടാതെ 20 മിനിറ്റിനുള്ളിൽ നിങ്ങളുടെ വിൻഡോസ് ഹോസ്റ്റ് നിങ്ങൾ വിജയകരമായി നിരീക്ഷിക്കും.
ഘട്ടം 1: വിൻഡോസ് മെഷീനിൽ NSClient++ ഏജന്റ് ഇൻസ്റ്റാൾ ചെയ്യുന്നു
റിമോട്ട് വിൻഡോസ് ഹോസ്റ്റിൽ NSClient++ ഏജന്റ് ഇൻസ്റ്റാൾ ചെയ്യാൻ ചുവടെയുള്ള നിർദ്ദേശങ്ങൾ ഉപയോഗിക്കുക. ആദ്യം ഏറ്റവും പുതിയ സ്ഥിരതയുള്ള പതിപ്പ് NSClient++ 0.3.1 ആഡ്uഓൺ സോഴ്uസ് ഫയലുകൾ ഡൗൺലോഡ് ചെയ്യുക, അത് ചുവടെയുള്ള ലിങ്കിൽ കാണാം.
- http://sourceforge.net/projects/nscplus/
നിങ്ങൾ ഏറ്റവും പുതിയ സ്ഥിരതയുള്ള പതിപ്പ് ഡൗൺലോഡ് ചെയ്തുകഴിഞ്ഞാൽ, NSClient++ ഫയലുകൾ ഒരു പുതിയ C:\NSClient++ ഡയറക്ടറിയിലേക്ക് അൺസിപ്പ് ചെയ്യുക.
ഇപ്പോൾ ആരംഭ സ്ക്രീനിൽ നിന്ന് ഒരു MS-DOS കമാൻഡ് പ്രോംപ്റ്റ് തുറക്കുക -> റൺ -> 'cmd' എന്ന് ടൈപ്പ് ചെയ്ത് എന്റർ അമർത്തി C:\NSClient++ ഡയറക്ടറിയിലേക്ക് മാറ്റുക.
C:\NSClient++
അടുത്തതായി, താഴെ പറയുന്ന കമാൻഡ് ഉപയോഗിച്ച് സിസ്റ്റത്തിൽ NSClient++ സേവനം രജിസ്റ്റർ ചെയ്യുക.
nsclient++ /install
അവസാനമായി, ഇനിപ്പറയുന്ന കമാൻഡ് ഉപയോഗിച്ച് NSClient++ systray ഇൻസ്റ്റാൾ ചെയ്യുക.
nsclient++ SysTray
Windows Services Manager തുറന്ന് NSClient-ൽ റൈറ്റ് ക്ലിക്ക് ചെയ്ത് Properties-ലേക്ക് പോകുക, തുടർന്ന് 'ലോഗ് ഓൺ' ടാബിൽ ക്ലിക്ക് ചെയ്യുക, തുടർന്ന് ഡെസ്ക്ടോപ്പുമായി ആശയവിനിമയം നടത്താൻ സേവനത്തെ അനുവദിക്കുക എന്ന് പറയുന്ന ചെക്ക് ബോക്സിൽ ക്ലിക്കുചെയ്യുക. ഇത് ഇതിനകം അനുവദനീയമല്ലെങ്കിൽ, അത് അനുവദിക്കുന്നതിന് ദയവായി ബോക്സ് പരിശോധിക്കുക.
C:\NSClient++ ഡയറക്ടറിയിൽ സ്ഥിതി ചെയ്യുന്ന NSC.INI ഫയൽ തുറന്ന് CheckWMI.dll, RemoteConfiguration.dll എന്നിവ ഒഴികെ മൊഡ്യൂളുകൾ വിഭാഗത്തിൽ നിർവചിച്ചിരിക്കുന്ന എല്ലാ മൊഡ്യൂളുകളും അൺകമെന്റ് ചെയ്യുക.
[modules] ;# NSCLIENT++ MODULES ;# A list with DLLs to load at startup. ; You will need to enable some of these for NSClient++ to work. ; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ; * * ; * N O T I C E ! ! ! - Y O U H A V E T O E D I T T H I S * ; * * ; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! FileLogger.dll CheckSystem.dll CheckDisk.dll NSClientListener.dll NRPEListener.dll SysTray.dll CheckEventLog.dll CheckHelpers.dll ;CheckWMI.dll ; ; RemoteConfiguration IS AN EXTREM EARLY IDEA SO DONT USE FOR PRODUCTION ENVIROMNEMTS! ;RemoteConfiguration.dll ; NSCA Agent is a new beta module use with care! ;NSCAAgent.dll ; LUA script module used to write your own "check deamon" (sort of) early beta. ;LUAScript.dll ; Script to check external scripts and/or internal aliases, early beta. ;CheckExternalScripts.dll ; Check other hosts through NRPE extreme beta and probably a bit dangerous! :) ;NRPEClient.dll
ക്രമീകരണങ്ങൾ വിഭാഗത്തിൽ അനുവദനീയമായ_ഹോസ്റ്റുകൾ അൺകമന്റ് ചെയ്യുക കൂടാതെ നിങ്ങളുടെ നാഗിയോസ് മോണിറ്ററിംഗ് സെർവറിന്റെ IP വിലാസം നിർവചിക്കുക അല്ലെങ്കിൽ ഏതെങ്കിലും ഹോസ്റ്റുകളെ ബന്ധിപ്പിക്കാൻ അനുവദിക്കുന്നതിന് അത് ശൂന്യമായി വിടുക.
[Settings] ;# ALLOWED HOST ADDRESSES ; This is a comma-delimited list of IP address of hosts that are allowed to talk to the all daemons. ; If leave this blank anyone can access the deamon remotly (NSClient still requires a valid password). ; The syntax is host or ip/mask so 192.168.0.0/24 will allow anyone on that subnet access allowed_hosts=172.16.27.41
NSClient വിഭാഗത്തിലെ പോർട്ട് അൺകമന്റ് ചെയ്ത് സ്ഥിരസ്ഥിതി പോർട്ട് '12489' ആയി സജ്ജമാക്കുക. വിൻഡോസ് ഫയർവാളിൽ '12489' പോർട്ട് തുറക്കുന്നത് ഉറപ്പാക്കുക.
[NSClient] ;# NSCLIENT PORT NUMBER ; This is the port the NSClientListener.dll will listen to. port=12489
അവസാനമായി ഇനിപ്പറയുന്ന കമാൻഡ് ഉപയോഗിച്ച് NSClient++ സേവനം ആരംഭിക്കുക.
nsclient++ /start
നിങ്ങൾ ശരിയായി ഇൻസ്uറ്റാൾ ചെയ്uത് കോൺഫിഗർ ചെയ്uതിട്ടുണ്ടെങ്കിൽ, സിസ്റ്റം ട്രേയിൽ മഞ്ഞ സർക്കിളിൽ കറുത്ത 'M' ഉള്ള ഒരു പുതിയ ഐക്കൺ നിങ്ങൾ കാണും.
ഘട്ടം 2: നാഗിയോസ് സെർവർ കോൺഫിഗർ ചെയ്ത് വിൻഡോസ് ഹോസ്റ്റുകൾ ചേർക്കുക
ഇപ്പോൾ നാഗിയോസ് സെർവറിൽ ലോഗിൻ ചെയ്uത് പുതിയ വിൻഡോസ് മെഷീൻ നിരീക്ഷിക്കുന്നതിന് നാഗിയോസ് കോൺഫിഗറേഷൻ ഫയലുകളിൽ ചില ഒബ്uജക്റ്റ് നിർവചനങ്ങൾ ചേർക്കുക. Vi എഡിറ്റർ ഉപയോഗിച്ച് എഡിറ്റ് ചെയ്യുന്നതിനായി windows.cfg ഫയൽ തുറക്കുക.
vi /usr/local/nagios/etc/objects/windows.cfg
വിൻഡോസ് മെഷീനായി ഇതിനകം തന്നെ നിർവചിച്ചിരിക്കുന്ന ഒരു സാമ്പിൾ വിൻഡോസ് ഹോസ്റ്റ് നിർവചനം, നിങ്ങൾക്ക് ഹോസ്റ്റ്_നാമം, അപരനാമം, വിലാസ ഫീൽഡുകൾ എന്നിവ പോലുള്ള ഹോസ്റ്റ് നിർവചനം നിങ്ങളുടെ വിൻഡോസ് മെഷീന്റെ ഉചിതമായ മൂല്യങ്ങളിലേക്ക് മാറ്റാം.
############################################################################### ############################################################################### # # HOST DEFINITIONS # ############################################################################### ############################################################################### # Define a host for the Windows machine we'll be monitoring # Change the host_name, alias, and address to fit your situation define host{ use windows-server ; Inherit default values from a template host_name winserver ; The name we're giving to this host alias My Windows Server ; A longer name associated with the host address 172.31.41.53 ; IP address of the host }
ഇനിപ്പറയുന്ന സേവനങ്ങൾ ഇതിനകം ചേർക്കുകയും windows.cfg ഫയലിൽ പ്രവർത്തനക്ഷമമാക്കുകയും ചെയ്തിട്ടുണ്ട്. നിരീക്ഷിക്കേണ്ട മറ്റ് ചില സേവന നിർവചനങ്ങൾ ചേർക്കാൻ നിങ്ങൾ ആഗ്രഹിക്കുന്നുവെങ്കിൽ, അതേ കോൺഫിഗറേഷൻ ഫയലിലേക്ക് നിങ്ങൾക്ക് ആ നിർവചനങ്ങൾ ചേർക്കാവുന്നതാണ്. മുകളിലെ ഘട്ടത്തിൽ നിർവചിച്ചിരിക്കുന്ന host_name ഉപയോഗിച്ച് ഈ എല്ലാ സേവനങ്ങൾക്കും host_name മാറ്റുന്നത് ഉറപ്പാക്കുക.
define service{ use generic-service host_name winserver service_description NSClient++ Version check_command check_nt!CLIENTVERSION } Add the following service definition to monitor the uptime of the Windows server. define service{ use generic-service host_name winserver service_description Uptime check_command check_nt!UPTIME } Add the following service definition to monitor the CPU utilization on the Windows server and generate a CRITICAL alert if the 5-minute CPU load is 90% or more or a WARNING alert if the 5-minute load is 80% or greater. define service{ use generic-service host_name winserver service_description CPU Load check_command check_nt!CPULOAD!-l 5,80,90 } Add the following service definition to monitor memory usage on the Windows server and generate a CRITICAL alert if memory usage is 90% or more or a WARNING alert if memory usage is 80% or greater. define service{ use generic-service host_name winserver service_description Memory Usage check_command check_nt!MEMUSE!-w 80 -c 90 } Add the following service definition to monitor usage of the C:\ drive on the Windows server and generate a CRITICAL alert if disk usage is 90% or more or a WARNING alert if disk usage is 80% or greater. define service{ use generic-service host_name winserver service_description C:\ Drive Space check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90 } Add the following service definition to monitor the W3SVC service state on the Windows machine and generate a CRITICAL alert if the service is stopped. define service{ use generic-service host_name winserver service_description W3SVC check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC } Add the following service definition to monitor the Explorer.exe process on the Windows machine and generate a CRITICAL alert if the process is not running. define service{ use generic-service host_name winserver service_description Explorer check_command check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe }
അവസാനമായി, /usr/local/nagios/etc/nagios.cfg എന്നതിൽ windows.cfg ഫയൽ അൺകമന്റ് ചെയ്യുക.
vi /usr/local/nagios/etc/nagios.cfg
# Definitions for monitoring a Windows machine cfg_file=/usr/local/nagios/etc/objects/windows.cfg
അവസാനമായി, ഏതെങ്കിലും പിശകുകൾക്കായി Nagios കോൺഫിഗറേഷൻ ഫയലുകൾ പരിശോധിക്കുക.
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Total Warnings: 0 Total Errors: 0 Things look okay - No serious problems were detected during the pre-flight check
സ്ഥിരീകരണ പ്രക്രിയ ഏതെങ്കിലും പിശക് സന്ദേശങ്ങൾ എറിയുകയാണെങ്കിൽ, പിശക് സന്ദേശങ്ങളില്ലാതെ സ്ഥിരീകരണ പ്രക്രിയ പൂർത്തിയാകുന്നതുവരെ ആ പിശകുകൾ പരിഹരിക്കുക. നിങ്ങൾ ആ പിശകുകൾ പരിഹരിച്ചുകഴിഞ്ഞാൽ, നാഗിയോസ് സേവനം പുനരാരംഭിക്കുക.
service nagios restart Running configuration check...done. Stopping nagios: done. Starting nagios: done.
അത്രയേയുള്ളൂ. ഇപ്പോൾ \http://Your-server-IP-address/nagios അല്ലെങ്കിൽ \http://FQDN/nagios എന്നതിലെ നാഗിയോസ് മോണിറ്ററിംഗ് വെബ് ഇന്റർഫേസിലേക്ക് പോയി \nagiosadmin എന്ന ഉപയോക്തൃനാമവും പാസ്uവേഡും നൽകുക. റിമോട്ട് പരിശോധിക്കുക. വിൻഡോസ് ഹോസ്റ്റ് ചേർത്തു, നിരീക്ഷിക്കുന്നു.
അത്രയേയുള്ളൂ! ഇപ്പോൾ, എന്റെ വരാനിരിക്കുന്ന ലേഖനത്തിൽ, നാഗിയോസ് മോണിറ്ററിംഗ് സെർവറിലേക്ക് പ്രിന്ററും സ്വിച്ചുകളും എങ്ങനെ ചേർക്കാമെന്ന് ഞാൻ കാണിച്ചുതരാം. നാഗിയോസിലേക്ക് Windows ഹോസ്റ്റ് ചേർക്കുമ്പോൾ എന്തെങ്കിലും ബുദ്ധിമുട്ടുകൾ നേരിടുന്നുണ്ടെങ്കിൽ. ദയവായി നിങ്ങളുടെ ചോദ്യങ്ങൾ കമന്റ് സെക്ഷൻ വഴി കമന്റ് ചെയ്യുക, അതുവരെ ഇത്തരം വിലപ്പെട്ട ലേഖനങ്ങൾക്കായി linux-console.net-ൽ തുടരുക.