This article describes how to monitor Windows machines “private” services such as CPU load, Disk usage, Memory usage, Services, etc. For this, we required to install an NSClient++ addon on the Windows machine. The addon acts a proxy between the Windows machine and Nagios and monitors actual services by communicating with the check_nt plugin. The check_nt plugin already installed on the Nagios Monitoring Server, if you followed our Nagios installation guide.
We assume that you’ve already installed and configured Nagios server according to our following guides.
- How to Install Nagios 4.0.1 on RHEL/CentOS 6.x/5.x and Fedora 19/18/17
- Add Linux Host to Nagios Monitoring Server
To monitor Windows Machines you will need to follow several steps and they are:
- Install NSClient++ addon on the Windows Machine.
- Configure Nagios Server for monitoring Windows Machine.
- Add new host and service definitions for Windows machine monitoring.
- Restart the Nagios Service.
To make this guide simple and easier, a few of configuration already done for you in the Nagios installation.
- A check_nt command definition already added to the command.cfg file. This definition command is used by check_nt plugin to monitor Windows services.
- A windows-server host template already created in the templates.cfg file. This template allows you to add new Windows host definitions.
The above two files “command.cfg” and “templates.cfg” files can be found at /usr/local/nagios/etc/objects/ directory. You can modify and add your own definitions that suits your requirement. But, I’d recommend you to follow the instructions described in this article and you will be successfully monitoring your windows host in less than 20 minutes.
Step 1: Installing NSClient++ Agent on Windows Machine
Please use the below instructions to install NSClient++ Agent on the Remote Windows Host. First download the latest stable version NSClient++ 0.3.1 addon source files, which can be found at below link.
Once you’ve downloaded latest stable version, unzip the NSClient++ files into a new C:\NSClient++ directory.
Now open a MS-DOS command prompt from the Start Screen –> Run –> type ‘cmd‘ and press enter and change to the C:\NSClient++ directory.
C:\NSClient++
Next, register the NSClient++ service on the system with the following command.
nsclient++ /install
Finally, install the NSClient++ systray with the following command.
nsclient++ SysTray
Open the Windows Services Manager and right click on NSClient go to Properties and then ‘Log On‘ tab and click the check box that says “Allow service to interact with the desktop“. If it isn’t already allowed, please check the box to allow it to.
Open NSC.INI file located at C:\NSClient++ directory and uncomment all the modules defined in the “modules” section, except for CheckWMI.dll and 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
Uncomment the “allowed_hosts” in the “Settings” section and define the IP address of your Nagios Monitoring Server or leave it blank to allow any hosts to connect.
[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
Uncomment the “port” in the “NSClient” section and set to default port ‘12489‘. Make sure to open ‘12489‘ port on Windows Firewall.
[NSClient] ;# NSCLIENT PORT NUMBER ; This is the port the NSClientListener.dll will listen to. port=12489
Finally start the NSClient++ service with the following command.
nsclient++ /start
If your properly installed and configured, you should see a new icon in the system tray in yellow circle with a black ‘M‘ inside.
Step 2: Configuring Nagios Server and Add Windows Hosts
Now Login into Nagios Server and add some object definitions in Nagios configuration files to monitor new Windows machine. Open windows.cfg file for editing with Vi editor.
[root@tecmint]# vi /usr/local/nagios/etc/objects/windows.cfg
A sample Windows host definition already defined for the Windows machine, you can simply change the host definition like host_name, alias, and address fields to appropriate values of your Windows machine.
############################################################################### ############################################################################### # # 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 }
Following services are already added and enabled in windows.cfg file. If you wish to add some more other service definitions that needs to be monitored, you can simple add those definitions to same configuration file. Make sure to change the host_name for these all services with host_name defined in the above step.
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 }
Lastly, uncomment the windows.cfg file in /usr/local/nagios/etc/nagios.cfg.
[root@tecmint]# vi /usr/local/nagios/etc/nagios.cfg
# Definitions for monitoring a Windows machine cfg_file=/usr/local/nagios/etc/objects/windows.cfg
Finally, verify the Nagios configuration files for any erros.
[root@tecmint]# /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
If the verification process throws any error messages, fix those errors until the verification process completes without any error messages. Once’ you fix those errors, restart the Nagios service.
[root@tecmint]# service nagios restart Running configuration check...done. Stopping nagios: done. Starting nagios: done.
That’s it. Now go to Nagios Monitoring Web interface at “http://Your-server-IP-address/nagios” or “http://FQDN/nagios” and Provide the username “nagiosadmin” and password. Check that the Remote Windows Host was added and is being monitored.
That’s it! for now, in my up-coming article I will show you how to add Printer and Switches to Nagios Monitoring Server. If you’re having any difficulties while adding Windows host to Nagios. Please do comment your queries via comment section, till then stay tuned to Tecmint.com for more such kind of valuable articles.
If these steps used to work they don’t work anymore:
Next, register the NSClient++ service on the system with the following command.
Finally, install the NSClient++ systray with the following command.
You never truly wrote an article on how to add a printer and switch to Nagios Core, did you? Because you said you would.
If I want to add more than 1 windows server?
@Nirzar,
Follow the same instructions to Add another Windows host to Nagios Server…
I have installed Nagios and configured the localhost Linux host and windows hosts. I want to know how I can configure email alerts if the host is down or any other errors.
Hi,
Can we install Nagios on windows?
If yes, please let know it.
Thanks
@Sai,
Yes, you can install Nagios on Windows OS as well, just head over to Nagios download page and download it.
How to add multiple windows servers in /usr/local/nagios/etc/objects/windows.cfg?
Can we use
","
for hostname separation.please suggest.
@Sandy,
Please define each host definition in windows.cfg file as explained in this article.
It appears as though you do not have permission to view information for any of the hosts you requested. I did everything as advised but no change or host added and I just get this message.
Can You able to monitor database as well I need help on Monitor SQL server Database in Nagios Core
@Mangesh,
What you want to monitor about MySQL a Port or Queries? check this script – https://github.com/tart/tart-monitoring
Thanks for your Quick Reply. My SQL server Available in other Windows server and I am configuring or trying to monitor it through NAgios core server. Can you help me in proper steps
@Mangesh,
Sure, but we need a at least 2-3 days to install, test and document it on Tecmint.com.
Ok. No Problem…Thank you very much for your quick feedback always and great help
Hi team, thanks for this wonderful Article. As mentioned above there are only few services you mentioned in define service.
Do you have list of all such services apart from other..
@Mangesh,
You can check a list of services for Windows here – https://www.nagios.com/solutions/windows-service-monitoring/
Hi, how to add windows exchange server in nagios? like i wanna monitor the queues and database availability etc.?
thanks,
Hi guys,
I would like to know how to add another windows server host after adding first window host as the article above completed. please help me
@Pravut,
Follow the same instruction to add another or multiple Windows systems to Nagios Server.
in step 1, I get it in step 2 what that I need to change for my understanding is in step 2 by changing the command vi /usr/local/nagios/etc/objects/windows.cfg as windows2.cfg, windows3.cfg, instead and within this file also change hostname, ip address to the new host.
Is it correct?
Sorry for my newbie Nagios and Linux.
Okay, I got it and now I can add additional another host, services into windows.cfg file already.
can you please tell me how ?
How do i monitor Windows services running under a different user account.i.e not the local system account
Hi Ravi, Thanks for your wonderful article. I have added windows host to Linux monitoring server but I have got critcal – Socket timeout in Nagios. What would be the issue? If I try to verify configuration.
===============================================
[root@hostingdbsrv1 ~]# /usr/lib64/nagios/plugins/check_nrpe -H 192.168.216.4
CHECK_NRPE: Socket timeout after 10 seconds.
===============================================
Please find the following error for your reference.
[root@hostingdbs ~]# nmap 192.168.216.4
Starting Nmap 5.51 ( http://nmap.org ) at 2017-01-30 14:31 IST
Nmap scan report for percare2.i3lhosting.com (192.168.216.4)
Host is up (0.0011s latency).
Not shown: 999 filtered ports
PORT STATE SERVICE
53/tcp closed domain
hi, i want to add another windows machine in nagios, but i have a error when i restart nagios service.
@Sait,
Could you share with us, what error you getting while adding another Windows machine to Nagios?
Hi Ravi, thanks for that great article, one question, my window server is in different network and Linux server network is in different network, nagios is installed in Linux OS machine. will it work ??
@Faruk,
No issue, as far as Nagios monitoring server able to reach both servers on their listening TCP ports, it will work without any issues..
Hi Getting below error while running “nsclient++ SysTray”
error:
Invalid command line argument: SysTray
Usage: -version, -about, -install, -uninstall, -start, -stop, -encrypt
Usage: [-noboot] [arguments]
we are waiting so longer about next article how to add Printer and Switches to Nagios Monitoring Server ?
@Siva,
Have some more patience, your request for the article has been accepted and under process, give us some time to arrange a article on the same..
Thanks :) Well detailed i did not have any trouble configuring it
hi .
can you please tell me how to add windows local host through nagios web interface.
and how to access nagios server through ssh ??
please help me out m stuck in between.
Thanks,
Manish Chandra
Hi Ravi,
I am unable to monitor the File Server Resource Manager service which is running on Windows 2012 server operating system via Nagios. The service name is srmsvc
@Bheem,
Sorry, no idea about that srmsvc service..
Update the client details rest is worked for me. Thanks for the port.
check_nt show incorrect total of ram. how can i repair it? thank
NSClient++ 0.3.1??? really? that’s from 2008. can this tutorial be updated please?
I have done all the above steps and restart the nagios service but the services are showing as UNKNOWN.Is that Firewall blocking this service?
or anything else……??????
@Vijay,
Check the hosts.cfg and services.cfg file are properly configured for remote hosts under Nagios and also make sure to check that port 5666 is allowed…
Hi, I need to add Solaris 11 and Solaris 10 hosts on nagios monitoring which I host on Linux. Can somebody help me? Thanks
Hello,
Could you please guide me how do i add multiple windows servers on nagios?
Regards,
Vikram
@Vikram,
I think same instructions will work with minor changes..I mean you can create separate file like windows.cfg, here you can define all your Windows machines IP address with proper settings and in services.cfg file define check commands for services..
Hi Ravi,
I would like to monitor the tomcat based application so please suggest how to install tomcat plugins on centos through command line
@Sanjay,
Never tried, but I will try to include tomcat instructions…stay tuned..
Hi Ravi,
Please try and help to me
Hello Ravi Saive,
I add Window host “Window Server 2008″. when run isn’t working and alert status information “add alert message could not fetch information from server”. Can you give me the way how to fix it, please?
Thanks you in advance,
Sam Smith
Hi Ravi ,
I’m using nagios 4 and need to monitor remote window hosts as well local hosts, nagios fetching local hosts data perfectly but could not fetch for remote,could you please let me know what should be checked at nagios server and lInux firewall .Nagios server is behind shorewall firewall .
Thanks
@Shoeb,
Have you opened port 5666 on remote host firewall? is you added Nagios Monitoring IP in remote hosts nrpe.cfg file under xinetd?
Hi Ravi,
How to remove hosts from Nagios server. Please help me.
Regards,
V Venkateswarlu
@Venkat,
Just remove the whatever entries you’ve added for the host in hosts.cfg and services.cfg file, and restart the nagios to take new changes..
Hello Ravi,
I have added host “Window Server 2008R2”. After “add alert message could not fetch information from server”. So, please help to solve this…
Thanks in Advance,
I have the sam Problem, How to fix it ???
Smith
@Sam,
Have you opened needed port 12489 for communication with Nagios server on the Windows Firewall?
Hi Ravi,
Yeah, I have opened and allow for port 12489 ready and I have follow your step correctly too. Do you have any solution, please help…
Thanks Thanks,
Sam Smith,
Hello Ravi,
I am monitoring 20,000 windows server using NSclint++ 3.x in Nagios but usually on most of the windows servers i am getting this kind of alerts (“No data was received from host!”) for CPU and Memory service check , some time this alert will recover automatically and some time it is not, I guess this is false alert.
Will you please advice me the best method/solution to fix this issue and alert ?
Thanks is advance.
Regards,
Jonus Joseph
@Jonus,
It seems something related to network issue..the Nagios server didn’t received any data from host..
Hello Ravi,
I got the solution for this issue on same day
we need to increase the timout value in check_nt. command,
I have done the same and issue is resolved now.
-Jonus Joseph
@Jonus,
Great work..finally its working fine now without any problems?
Yes Ravi i have fixed the issue and it is working fine without any problem , thank you very much.
-Jonus Joseph
I think you forgot to create a configuration to windows template so then the host can refer to the template to execute some commands. CMIIW.
Hi,
after i configure this, i have found issue below. How to fix it? Please help to support this. thanks
Drive Space
CRITICAL 11-22-2014 22:01:40 0d 11h 49m 8s 3/3 (Return code of 127 is out of bounds – plugin may be missing)
CPU Load
CRITICAL 11-22-2014 22:02:41 0d 11h 48m 9s 3/3 (Return code of 127 is out of bounds – plugin may be missing)
Explorer
CRITICAL 11-22-2014 22:03:38 0d 11h 47m 11s3/3 (Return code of 127 is out of bounds – plugin may be missing)
Memory Usage
CRITICAL 11-22-2014 22:04:36 0d 11h 46m 12s3/3 (Return code of 127 is out of bounds – plugin may be missing)
NSClient++ Version
CRITICAL 11-22-2014 22:05:36 0d 11h 45m 13s 3/3 (Return code of 127 is out of bounds – plugin may be missing)
Uptime
CRITICAL 11-22-2014 22:06:33 0d 11h 44m 15s 3/3 (Return code of 127 is out of bounds – plugin may be missing)
W3SVC
CRITICAL 11-22-2014 21:57:33 0d 11h 43m 16s 3/3 (Return code of 127 is out of bounds – plugin may be missing)
@Steve,
Most likely due to file permissions, make sure your plugin directory “/usr/local/nagios/libexec” owned by Nagios user and have proper permissions to execute.
@Ravi Saive,
The first I, wanna to say thanks you for your reply… and the second I have follow your guide step by step but when I check in “/usr/local/nagios/libexec” show below:
[root@localhost libexec]# ll
total 6988
-rwxr-xr-x. 1 nagios nagios 179258 Nov 21 18:19 check_apt
-rwxr-xr-x. 1 nagios nagios 2252 Nov 21 18:19 check_breeze
-rwxr-xr-x. 1 nagios nagios 179683 Nov 21 18:19 check_by_ssh
lrwxrwxrwx. 1 root root 9 Nov 21 18:19 check_clamd -> check_tcp
-rwxr-xr-x. 1 nagios nagios 137005 Nov 21 18:19 check_cluster
-r-sr-xr-x. 1 root nagios 175282 Nov 21 18:19 check_dhcp
-rwxr-xr-x. 1 nagios nagios 174413 Nov 21 18:19 check_dig
-rwxr-xr-x. 1 nagios nagios 193388 Nov 21 18:19 check_disk
-rwxr-xr-x. 1 nagios nagios 9290 Nov 21 18:19 check_disk_smb
-rwxr-xr-x. 1 nagios nagios 189067 Nov 21 18:19 check_dns
-rwxr-xr-x. 1 nagios nagios 85051 Nov 21 18:19 check_dummy
-rwxr-xr-x. 1 nagios nagios 3350 Nov 21 18:19 check_file_age
-rwxr-xr-x. 1 nagios nagios 6316 Nov 21 18:19 check_flexlm
lrwxrwxrwx. 1 root root 9 Nov 21 18:19 check_ftp -> check_tcp
-rwxr-xr-x. 1 nagios nagios 175384 Nov 21 18:19 check_hpjd
-rwxr-xr-x. 1 nagios nagios 335868 Nov 21 18:19 check_http
-r-sr-xr-x. 1 root nagios 181947 Nov 21 18:19 check_icmp
-rwxr-xr-x. 1 nagios nagios 146131 Nov 21 18:19 check_ide_smart
-rwxr-xr-x. 1 nagios nagios 15124 Nov 21 18:19 check_ifoperstatus
-rwxr-xr-x. 1 nagios nagios 12601 Nov 21 18:19 check_ifstatus
lrwxrwxrwx. 1 root root 9 Nov 21 18:19 check_imap -> check_tcp
-rwxr-xr-x. 1 nagios nagios 6888 Nov 21 18:19 check_ircd
lrwxrwxrwx. 1 root root 9 Nov 21 18:19 check_jabber -> check_tcp
-rwxr-xr-x. 1 nagios nagios 157666 Nov 21 18:19 check_ldap
lrwxrwxrwx. 1 root root 10 Nov 21 18:19 check_ldaps -> check_ldap
-rwxr-xr-x. 1 nagios nagios 158068 Nov 21 18:19 check_load
-rwxr-xr-x. 1 nagios nagios 5989 Nov 21 18:19 check_log
-rwxr-xr-x. 1 nagios nagios 21481 Nov 21 18:19 check_mailq
-rwxr-xr-x. 1 nagios nagios 144237 Nov 21 18:19 check_mrtg
-rwxr-xr-x. 1 nagios nagios 145290 Nov 21 18:19 check_mrtgtraf
-rwxr-xr-x. 1 nagios nagios 190840 Nov 21 18:19 check_mysql
-rwxr-xr-x. 1 nagios nagios 175310 Nov 21 18:19 check_mysql_query
-rwxr-xr-x. 1 nagios nagios 157374 Nov 21 18:19 check_nagios
lrwxrwxrwx. 1 root root 9 Nov 21 18:19 check_nntp -> check_tcp
lrwxrwxrwx. 1 root root 9 Nov 21 18:19 check_nntps -> check_tcp
-rwxr-xr-x. 1 nagios nagios 179778 Nov 21 18:19 check_nt
-rwxr-xr-x. 1 nagios nagios 184113 Nov 21 18:19 check_ntp
-rwxr-xr-x. 1 nagios nagios 173118 Nov 21 18:19 check_ntp_peer
-rwxr-xr-x. 1 nagios nagios 171363 Nov 21 18:19 check_ntp_time
-rwxr-xr-x. 1 nagios nagios 212335 Nov 21 18:19 check_nwstat
-rwxr-xr-x. 1 nagios nagios 8779 Nov 21 18:19 check_oracle
-rwxr-xr-x. 1 nagios nagios 160109 Nov 21 18:19 check_overcr
-rwxr-xr-x. 1 nagios nagios 164211 Nov 21 18:19 check_pgsql
-rwxr-xr-x. 1 nagios nagios 183658 Nov 21 18:19 check_ping
lrwxrwxrwx. 1 root root 9 Nov 21 18:19 check_pop -> check_tcp
-rwxr-xr-x. 1 nagios nagios 186937 Nov 21 18:19 check_procs
-rwxr-xr-x. 1 nagios nagios 157567 Nov 21 18:19 check_real
-rwxr-xr-x. 1 nagios nagios 9582 Nov 21 18:19 check_rpc
-rwxr-xr-x. 1 nagios nagios 1453 Nov 21 18:19 check_sensors
lrwxrwxrwx. 1 root root 9 Nov 21 18:19 check_simap -> check_tcp
-rwxr-xr-x. 1 nagios nagios 247834 Nov 21 18:19 check_smtp
-rwxr-xr-x. 1 nagios nagios 251233 Nov 21 18:19 check_snmp
lrwxrwxrwx. 1 root root 9 Nov 21 18:19 check_spop -> check_tcp
-rwxr-xr-x. 1 nagios nagios 155395 Nov 21 18:19 check_ssh
lrwxrwxrwx. 1 root root 9 Nov 21 18:19 check_ssmtp -> check_tcp
-rwxr-xr-x. 1 nagios nagios 141073 Nov 21 18:19 check_swap
-rwxr-xr-x. 1 nagios nagios 230757 Nov 21 18:19 check_tcp
-rwxr-xr-x. 1 nagios nagios 156545 Nov 21 18:19 check_time
lrwxrwxrwx. 1 root root 9 Nov 21 18:19 check_udp -> check_tcp
-rwxr-xr-x. 1 nagios nagios 168557 Nov 21 18:19 check_ups
-rwxr-xr-x. 1 nagios nagios 137947 Nov 21 18:19 check_uptime
-rwxr-xr-x. 1 nagios nagios 136097 Nov 21 18:19 check_users
-rwxr-xr-x. 1 nagios nagios 2937 Nov 21 18:19 check_wave
-rwxr-xr-x. 1 nagios nagios 131526 Nov 21 18:19 negate
-rwxr-xr-x. 1 nagios nagios 125772 Nov 21 18:19 urlize
-rwxr-xr-x. 1 nagios nagios 1895 Nov 21 18:19 utils.pm
-rwxr-xr-x. 1 nagios nagios 2791 Nov 21 18:19 utils.sh
[root@localhost libexec]#
So, How to check plugin directory and permission of user allow or not?
Please help me to solve it. Thanks you!
@Steve,
I see the in the plugin directory “/usr/local/nagios/libexec” some of the files are owned by root user. so that means that the nagios user don’t have proper permissions to execute those files, better assign those files to nagios using following command.
Windows client has been added but all services in services tab shows critical
When I added windows host to Nagios, it work. But it doesn’t check process such as cpu, memory etc…. I need your help!
@Sophearak,
Please check the instructions correctly, as we alredy included the steps to monitor cpu and memory in the article..
Hi,
This the grate article. Help many person like me.
I want know can we add hosts as MAC ID instead of IP address?
Recently 4 days back one of my remote server has stopped for 1 day, but i didn’t see the HOST DOWN alert in the nagios as well as no notification mail. But i can able to see Current users and some other alerts that are working fine..
i have checked uptime in the remote server today that is showing like ‘up 4 days 6:21, 8 users, load average: 0.26, 0.42, 0.44, but this is not updated in the Nagios it is still showing like—–> ‘UP (for 32d 3h 36m 35s)’ even i have restarted nagios also..
Can you help me what is the problem?
This is the command for Ping i have written in the commands.cfg
# ‘check_ping’ command definition
define command{
command_name check_ssh_ping
command_line /usr/local/nagios/libexec/check_by_ssh -H $HOSTADDRESS$ -C “/usr/local/nagios/libexec/check_ping -H $HOSTADDRESS$ -w 100.0,80% -c 150.0,100% -p 5”
}
Great! i have not get any problem to follow this instruction.
Hi Ravi,
I have a one question. i have installed nrpe client in one linux sever and have monitoring service and server in the host server..
Now i need to install a new pulgin in client machine it is not available on the below mentioned location. an you please tell me the steps how to install a new pulgin in the client machine.
/usr/local/nagios/libexec in this location.
Thanks in advance.
This means your client plugin installation was unsuccessful. Please try to follow instructions carefully.
Thanks for reply. I have installed client pulgin,it was installed successfully i am able to monitor .But i need to monitor a new service like file utilisation of the client in host. For that we dont have a perdefined plugin so i have download a plugin from the google.. how to install nee service plugin.
Thanks in advance.
Why you need a additional plugin, just use default check_disk plugin to achieve this.
Hi,
Ravi gr8 Artical but After installing nagios and opening web page I get below error when clicking any of the tab in homepage of nagios core
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, root@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.2.15 (CentOS) Server at 10.7.70.196 Port 80
It seems that your nagios configuration is incorrect. You should check your error logs for the problem. Another problem is, may be your SELinux is enabled, If yes, just run the following command to grant permission on the nagios folder.
Hi,
Could you please help me with changing the port on a remote Windows host? I need to monitor 8 remote hosts at one particular site, so I need to come in on different ports to access the 8 machines. Is there a way to change the port the NSClient listens on from 12489? I have added “port – 12490” and restarted all the services etc but this doesn’t seem to work.
You can change the NSClient++ port by editing the NSC.ini file and change port number from 12489 to 12490 and restart the NSClient++ service. And also at Nagios server commmads.cfg file, make changes as shown.
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg , i try the following command it reply /usr/local/nagios/bin/nagios no such files or directory . so i manually create directory even it replay same msg.
It seems your installation is incomplete, please follow the instructions correctly
Hello Ravi Saive,
Can you help me to unlock the Nagios password?
Please run the following command to reset/unlock Nagios password.
HI
I need monitor Windows log file and a parse a particular word from there. My Nagios in CentOS 6. Based on that parsed word, have to show the server is on/off in Nagios dashboard. Can you please help on that ?
Thanks
Arun
Hi Ravi,
Please guide how can we add multiple windows or Linux Host in Nagios Server.
I will write a detailed article on how to add Linux and Windows hosts to Nagios Server in my upcoming article.
Hi Ravi,
I note yet see your new article about ” how to add Linux and Windows hosts to Nagios Server” Could you help share link in comment, please?
Thanks in advance!
@Steve,
At the bottom of the this article, you will find links to how to add Linux and Windows host to Nagios monitoring server.
https://www.tecmint.com/install-nagios-in-linux/
Hello every one
i have installed the nagios but mail notification is not working. and how add the second machine in the server.
i have added …
vi /usr/local/nagios/etc/objects/windows.cfg using by the command…
define host{
use windows-server ; Inherit default values from a Windows server template (make sure you keep this line!)
host_name winserver
alias My Windows Server
address 192.168.50.01 192.168.50.10
}
but its not showing second one …
please help me about the issue !
Thanks
chandoo
Please install SMTP services on your Linux system to get email notifications about Nagios.
how add the second machine in the server
Hello,
My nagios server is publicly accessible on the internet. and I would like to monitor windows hosts which are in private network ex: 192.168.0.0. In such cases what is the better solution.
Please Help me.
Hello,
I followed your instructions and set Nagios to monitor one of my Windows machine, it works great. So thank you so…much. My problem is when I try to monitor a another windows machine, it does not work.
These are the steps I followed,
1) Created a new .CFG file called newhost.cfg and added the details related to that machine.
2) Edited the nagios.cfg file to append the newhost.cfg file.
3) Installed NSClient++ and did the necessary configurations.
But finally i’m getting this error when I try to restart the nagios service.
Running configuration check… CONFIG ERROR! Restart aborted. Check your Nagios configuration.
May be some configuration problem, will try at my end and update you..
Hi Ravi, after adding Windows host in Nagios server getting CRITICAL – Socket timeout after 20 seconds error for all services expect ping, need your help in solving this issue.
Hi
These instructions are great but when I tried to install the NSClient++ from the download link on a virtual machine I get the following error message
“The installation is not supported by this processor type”
Does anyone have a solution for this?
what if i want to add another windows host for monitoring?thanks
Just add the host entry in hosts file and define their services in services.cfg file.
excuse me! please give me more details.
where are the hosts file and the services.cfg?
and how to add one more host
thanks i really appriciate
Hi ..
After I downloaded NSCP-0.4.1.73-x64 and setup it require ip of nagios server and password but I don’t understand about pasword .What is password ? ANd I also get error : “NSClient – ERROR: Invalid password” . Can you help me ?
Thanks
Sarith
Hello, I’m having issues also with this “Invalid password” when the password is correct but still this error occur.
Is there any working NSClient you can give?
hi sir, i am also getting the same problem of invalid password when i try to see added host on my nagios server…… its a serious problem. all passwords are correct but still a problem..
for password like error just do one thing that,
uncomment the password in NSC.ini
Hi Ravi,
Do you have any userful plugins to monitor windows hosts’ interfaces traffic for nagios?
I had used the check_traffic.sh tools , but it was not work well for me.
I need the one can automatically discover the interfaces and monitor those.
Any suggestion is appriciate for me.
No idea man! but will look out for something better, give me some time.
You can also used the combo: Glances on the Windows host and CheckGlances on the Nagios server.
Have a look on it here: https://github.com/nicolargo/checkglances