Mike: Hello I have a question regarding Nagios monitoring tool. We have many servers added to our Nagios and we are getting repeated notification short time high CPU Usage like for 5-6 seconds. Is there anyway we can configure the CPU_Check service to only notify as Critical when the CPU usage goes above 90% for continuously around 5-10 minutes rather than alerting for 5 seconds? This is only happening for one of the SQL server when it goes up 90% during a specific time.
Hi, thanks. One question. where can i find a log file of nsclient, that records all of it? on the server that I am monitoring? Will it be generated automatically or should I create it manually?
Hello, I have done the same as you did but in my case it doesnt show any windows host in the web console. On nagios server everything is good . Run check runs smooth but in windows side it is showing the error in the log file Failed to query performance counters: PdhCollectQuery failed : 8000075d5: no data to return.
I have triggered the command check_nrpe.exe on Windows agent in the command prompt under program files nsclient directory. It is giving an output of No connection could be made because the target machine actively refused it. Whereas I am able to ping both the machines with IP and domain both.
Dear rech arkit , i did the same as you , i have the same results but finally in the interface nothing is shown only the localhost 127.0.0.1 ... please help !
@@FerielMufti95 Did you add the new .cfg file in /usr/local/nagios/etc/objects/ path. after that you have to add the same config file into nagios.cfg file. reload nagios service
@@TechArkit i have added windowsserver.cfg then i uncommented servers.cfg and i back to commented the added line of windowsserver.cfg as you did , i did 2 services CPU and DISK USAGE SPACE , i have repeated the tuto 5 times still having the same problem every thing is okay as you but finally ipaddress/nagios shows only localhost , no added host is shown !
After installing NSClient in Windows machine example is below to monitor NSClient Version. /usr/local/nagios/libexec/check_nt -H 192.168.48.200 -p 12489 -v CLIENTVERSION -s password MSSQL Service status check is below /usr/local/nagios/libexec/check_nt -H 192.168.48.200 -p 12489 -v SERVICESTATE -s password -l MSSQLSERVER
What is this Error....? Error: Unable to locate host 'WIN-R1689TR4KSC' for service 'CPU Usage' Error: Could not register service (config file '/usr/local/nagios/etc/objects/windowsserver.cfg', starting on line 60) Error processing object config files!
@@TechArkit problem is my setup is not running when i put password to agent software's ini file. Can't find where to put that password on Nagios side. Other than this your guide is very good, ty.
In service definition you have to add the password, ensure there is no special characters in password , which is little complicated while passing password. For Host and service definition template download it from my github repo github.com/techtutorials ./check_nt -H HOSTNAME -s PASSWORD check_command check_nt!password!MEMUSE!-w 90 -c 95
Nagios Tutorial, Monitoring windows Server using Nagios.
Playlist: ruclips.net/p/PL8cE5Nxf6M6btAOnxwxzz4qP0OWvjOsHL
Thanks, this helped me correct an issue I was having.
Thanks DJ Merl. Please subscribe for more upcoming useful videos.
Thanks @Ravi.
Thanks
Mike:
Hello I have a question regarding Nagios monitoring tool.
We have many servers added to our Nagios and we are getting repeated notification short time high CPU Usage like for 5-6 seconds.
Is there anyway we can configure the CPU_Check service to only notify as Critical when the CPU usage goes above 90% for continuously around 5-10 minutes rather than alerting for 5 seconds?
This is only happening for one of the SQL server when it goes up 90% during a specific time.
Increase retry number and increase the max_attempts.
Hi sir I am getting connection refused could not fetch information from server after enabling the nsclient configuration
Add Nagios server IP address in Allowed_hosts =
@@TechArkit Thanks sir got it the ip was different in that area
Hi, thanks. One question. where can i find a log file of nsclient, that records all of it? on the server that I am monitoring? Will it be generated automatically or should I create it manually?
For example, if I restart the service from the server, that save the info in the same machine (log)...
I did it as is, but the host not showing in Nagios, what could the possible issue?
You have to add into Nagios, Installing NSClinet wont automatically add into monitoring. You have to add manually.
In the video, the host is set to register = 0. As soon as I set my host to register = 1, it showed up in Nagios.
@@mikethrane You can register based on requirement.
@@mikethrane thank you so much you helped me !!!!!!!!!!!!!!!!!!!! ia had the same issue !!!!!!
Hi..I like your tutorial...its well explained. Can you please tell me how to monitor pagefile utilization in windows via nagios?
check_nt!password!COUNTER!-l "\\Paging File(_Total)\\% Usage","Paging File usage is %.2f %%" -w 90 -c 95
Above is the command.
Refer this config file. github.com/techarkit/nagios/blob/master/windows_server.cfg
@@TechArkit Thank you very much... its perfectly working...
bro, I am following your tutorial. we need depth grafana monitor tutorial. kindly start the course.
Hi veerabathiran, It will take time to start this course since few courses are in pipeline. Docker is the next series.
Hello,
I have done the same as you did but in my case it doesnt show any windows host in the web console.
On nagios server everything is good . Run check runs smooth but in windows side it is showing the error in the log file
Failed to query performance counters: PdhCollectQuery failed : 8000075d5: no data to return.
Looks Like Nagios agent issue.
@@TechArkit how could it be resolved ? Any idea ?
I have triggered the command check_nrpe.exe on Windows agent in the command prompt under program files nsclient directory. It is giving an output of
No connection could be made because the target machine actively refused it.
Whereas I am able to ping both the machines with IP and domain both.
Dear rech arkit , i did the same as you , i have the same results but finally in the interface nothing is shown only the localhost 127.0.0.1 ... please help !
Check the host definition and service definition in another .cfg file.
@@TechArkit which cfg file ?
@@FerielMufti95 Did you add the new .cfg file in /usr/local/nagios/etc/objects/ path. after that you have to add the same config file into nagios.cfg file. reload nagios service
@@TechArkit yes i did still the same problem no added host is shown on the interface , like i didn't add any host !!
@@TechArkit i have added windowsserver.cfg then i uncommented servers.cfg and i back to commented the added line of windowsserver.cfg as you did , i did 2 services CPU and DISK USAGE SPACE , i have repeated the tuto 5 times still having the same problem every thing is okay as you but finally ipaddress/nagios shows only localhost , no added host is shown !
How to monitor a windows service and restart
After installing NSClient in Windows machine example is below to monitor NSClient Version.
/usr/local/nagios/libexec/check_nt -H 192.168.48.200 -p 12489 -v CLIENTVERSION -s password
MSSQL Service status check is below
/usr/local/nagios/libexec/check_nt -H 192.168.48.200 -p 12489 -v SERVICESTATE -s password -l MSSQLSERVER
What is this Error....?
Error: Unable to locate host 'WIN-R1689TR4KSC' for service 'CPU Usage'
Error: Could not register service (config file '/usr/local/nagios/etc/objects/windowsserver.cfg', starting on line 60)
Error processing object config files!
Check Line number 60. Looks Like there is no host defined with above name.
@@TechArkit yes there is define please look once config
define host {
use generic-host
host_name WIN-R1689TR4KSC
alias WebApplication Server | Located in Itahari Nepal | contact: System Admin
address 10.10.1.101
max_check_attempts 5
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 0
notification_period 24x7
notifications_enabled 1
icon_image win_server.png
statusmap_image win_server.png
register 0
contacts nagiosadmin
contact_groups admins
}
how to add multiple windows hosts?
You can copy the same file and create one more file and change ip & hostname
can you please post to us the services configuration because they still unknown !
Please check this github repo all the configs are available over there github.com/techarkit/nagios
sir I want to do certification on Nagios can you plz tell from where I can do this.
ruclips.net/video/ZMCfgJkIz3I/видео.html follow this playlist and practice.
Config verify on the video says 1 host but it should be 2 hosts...
Yes, due to an technical reasons while editing video one clip was trimmed. Thanks for identifying. Anyway steps are same.
@@TechArkit problem is my setup is not running when i put password to agent software's ini file. Can't find where to put that password on Nagios side. Other than this your guide is very good, ty.
In service definition you have to add the password, ensure there is no special characters in password , which is little complicated while passing password. For Host and service definition template download it from my github repo github.com/techtutorials
./check_nt -H HOSTNAME -s PASSWORD
check_command check_nt!password!MEMUSE!-w 90 -c 95
i found System uptime - 0 days (s) hour(s) 0 minute(s) `|uptime=0 any solution ?
Wait 15 minutes and see
@@TechArkit same problem :(
@@mohamedbensoussia6758 which means NSClient is not communicating with Nagios Server.