Hi Nagios,
I have an issue when I use 2016 Server and following service:
My Hostgroups.cfg:
define service {
use generic-service
host_name FRONTEND3
service_description Uptime
check_command check_nt!UPTIME
}
define service {
use generic-service
host_name FRONTEND3
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}
Nagios Log:
[1521214108] wproc: host=CTXPS; service=NSClient++ Version; contact=mnl
[1521214108] wproc: early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
[1521214108] wproc: stderr line 01: /bin/sh: 1: usr/bin/mail: not found
[1521214108] wproc: stderr line 02: /usr/bin/printf: skrivefejl: Kanalen blev brudt
[1521214182] SERVICE ALERT: CTXPS;Uptime;WARNING;SOFT;2;could not fetch information from server
I have tried with some servers and I get the same answer: could not fetch information from server. I have no problem with our 2012R2 and 2008 R2. I use the same NSCP-0.5.0.62-x64 on all servers.
Do you have any idea's how I can solve this problem ?
Best Regards
Michael Pierre Nielsen
Nagios Webserver could not fetch information from server
Nagios Webserver could not fetch information from server
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
Forenede Gruppeliv
2500 Valby
Copenhagen
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Nagios Webserver could not fetch information from server
Hello, @michaelpn.
Can you run these commands manually to see if they produce similar errors? Don't forget to replace the Ip address with the FRONTEND3 servers IP.
Can you upload the nsclient.ini file here so I can review it?
Can you run these commands manually to see if they produce similar errors? Don't forget to replace the Ip address with the FRONTEND3 servers IP.
Code: Select all
/usr/local/nagios/libexec/check_nt -H host_ip_address -p 12489 -v UPTIME
/usr/local/nagios/libexec/check_nt -H host_ip_address -p 12489 -v CLIENTVERSION
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Nagios Webserver could not fetch information from server
hi npolovenko,
sorry you get your answer do late. I was on vacation the last two weeks. Yes I have tried your proposal but I still get the same answer:
From shell:
nguser@Nagios:~$ /usr/local/nagios/libexec/check_nt -H 172.31.1.40 -p 12489 -v UPTIME
could not fetch information from server
nguser@Nagios:~$ /usr/local/nagios/libexec/check_nt -H 172.31.1.40 -p 12489 -v CLIENTVERSION
could not fetch information from server
Best Regards
Michael Pierre Nielsen
sorry you get your answer do late. I was on vacation the last two weeks. Yes I have tried your proposal but I still get the same answer:
From shell:
nguser@Nagios:~$ /usr/local/nagios/libexec/check_nt -H 172.31.1.40 -p 12489 -v UPTIME
could not fetch information from server
nguser@Nagios:~$ /usr/local/nagios/libexec/check_nt -H 172.31.1.40 -p 12489 -v CLIENTVERSION
could not fetch information from server
Best Regards
Michael Pierre Nielsen
- Attachments
-
- nsclient.ini
- (1 KiB) Downloaded 853 times
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
Forenede Gruppeliv
2500 Valby
Copenhagen
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Nagios Webserver could not fetch information from server
@michaelpn, Try adding this section in your nsclient.ini file and then restart the service.
Also, are you passing in the password in the command?
Code: Select all
[/settings/NSClient/server]
; ENABLE SSL ENCRYPTION - This option controls if SSL should be enabled.
use ssl = 0
; PERFORMANCE DATA - Send performance data back to Nagios (set this to 0 to remove all performance data).
performance data = 1
; PORT NUMBER - Port to use for check_nt.
port = 12489
Code: Select all
/usr/local/nagios/libexec/check_nt -H host_ip_address -p 12489 -v CLIENTVERSION -s 'password'
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Nagios Webserver could not fetch information from server
Hi npolovenko,
still the same with adding your proposal:
[/settings/NSClient/server]
; ENABLE SSL ENCRYPTION - This option controls if SSL should be enabled.
use ssl = 0
; PERFORMANCE DATA - Send performance data back to Nagios (set this to 0 to remove all performance data).
performance data = 1
; PORT NUMBER - Port to use for check_nt.
port = 12489
nguser@Nagios:~$ /usr/local/nagios/libexec/check_nt -H 172.xx.x.xx -p 12489 -v CLIENTVERSION -s 'xx-xx-xx'
could not fetch information from server
Best Regards
Michael Pierre Nielsen
still the same with adding your proposal:
[/settings/NSClient/server]
; ENABLE SSL ENCRYPTION - This option controls if SSL should be enabled.
use ssl = 0
; PERFORMANCE DATA - Send performance data back to Nagios (set this to 0 to remove all performance data).
performance data = 1
; PORT NUMBER - Port to use for check_nt.
port = 12489
nguser@Nagios:~$ /usr/local/nagios/libexec/check_nt -H 172.xx.x.xx -p 12489 -v CLIENTVERSION -s 'xx-xx-xx'
could not fetch information from server
Best Regards
Michael Pierre Nielsen
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
Forenede Gruppeliv
2500 Valby
Copenhagen
-
- Support Tech
- Posts: 3457
- Joined: Mon May 15, 2017 5:00 pm
Re: Nagios Webserver could not fetch information from server
@michaelpn, Unfortunately, I don't have a 2016 server in the lab. I've tested your config on a 2008 server as well as few other windows machines and both commands worked. Perhaps windows server 2016 is using a different kind of system counters that are not compatible with the NSClient. You could try to upgrade the NSClient to the latest version 0.5.2.35 to see if they fixed this issue already. I also suggest posting on their forum directly https://forums.nsclient.org/. Their developers may already have a solution for this.
Can you share the nsclient.log file with us? Would you consider running these checks using check_nrpe instead of check_nt?
Can you share the nsclient.log file with us? Would you consider running these checks using check_nrpe instead of check_nt?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Nagios Webserver could not fetch information from server
Hi npolovenko,
I have solved the problem myself. It was an IP issue. Sorry for taking your time. Thanks anyway
I have solved the problem myself. It was an IP issue. Sorry for taking your time. Thanks anyway
Michael Pierre
Forenede Gruppeliv
2500 Valby
Copenhagen
Forenede Gruppeliv
2500 Valby
Copenhagen
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Nagios Webserver could not fetch information from server
Glad to hear it is resolved!