![]() In service definition, make changes according to your need, here i have kept remaining setting as it is. Host_name winserver The name we're giving to this hostĪlias Windows Server A longer name associated with the hostĪddress 192.168.1.22 IP address of the Windows host Use windows-server Inherit default values from a template # Definitions for monitoring a Windows ~]# vi /usr/local/nagios/etc/objects/windows.cfg Search for windows string and uncommment the below line Uncomment the Windows Configuration in nagios configuration ~]# vi /usr/local/nagios/etc/nagios.cfg Step 3: Configuring Nagios host and service It will be a yellow circle with a black ‘M’ inside. If you made above changes properly, a new icon should appear in your system tray. To start the NSClient service run the following command. Optionally require a password for clients by changing the ‘password’ option in the section In seciton, make sure the ‘port’ option is uncommented and set to ‘12489’Ĥ. In section, uncomment the ‘allowed_hosts’ option and add the IP address of the Nagios server addressģ. In section, uncomment all the modules, except for CheckWMI.dll and RemoteConfiguration.dllĢ. = Now right click on NSClient go to Properties and in ‘Log On‘ tab and click the check box “Allow service to interact with the desktop“ and click “Apply” and “Ok”.Įdit the NSC.INI file (located in the C:\NSClient directory) and make the following changes:ġ. = Open a command prompt and execute the below commads to install the NSClient agent = Unzip the NSClient files into a new C:\NSClient directory = Download the latest stable version of the NSClient addon from NSClinet Agent is act as proxy agent between windows and nagios. Step 1: Install Prerequisites Package on Windows machine Please follow the below steps to add the windows hosts in nagios. Here we are going to see how to monitor windows machines using Nagios tools. That’s it!! Monit has started the apache services automatically without any human intervention. info : 'apache' process is running with pid 1704 info : 'apache' start: /etc/init.d/httpd Httpd (pid 1704) is ~]# tail -f /var/log/monit Wait for 2 mins our monit tool will automatically start the apache service.Īfter 2 mins check the apache status and ~]# /etc/init.d/httpd status error : 'apache' process is not runningĬheck the same in web interface, the apache will show the “Does not exist” status. Stopping httpd: # /etc/init.d/httpd status Stop the apache daemon to test our monit tool is working or ~]# /etc/init.d/httpd stop Now check your monit web interface, the newly added apache service is start monitor by monit. Start program = "/etc/init.d/httpd start" Here i am going to use my apache server and this will be monitor by monit tool for every 2 ~]# vi /etc/nfĬheck process apache with pidfile /var/run/httpd.pid ![]() Now it’s the time to add your critical service to monitor. Now open your web browser and type you will be asked to enter the username and passowrd.Ĭheck the monit log for more ~]# tail -f /var/log/monit ![]() Starting monit: # /etc/init.d/httpd ~]# chkconfig -level 35 monit ~]# chkconfig -level 35 httpd on Step 3: Start the monit and apache ~]# /etc/init.d/monit start Step 1: Install prerequisites ~]# yum install -y monit httpd ![]() Here i have already installed EPEL repository, if you need to install then please type epel in search box and follow the steps to perform the same. Monit tool is available in EPEL repository. It’s a daemon that wakes up every once in a while, goes through a list of things it is configured to check, and if something is not as it should be, takes a corrective action. Monit is a utility for managing and monitoring processes, files, directories and devices on a Unix system. ![]()
0 Comments
Leave a Reply. |