Page 2 of 2

Re: Services returning unknown on windows server 2012

Posted: Fri Apr 29, 2016 12:47 pm
by SaltyBear
tgriep wrote:It is hard to see your screen captures but it looks like some of the service definitions are using a number 1 instead of a lower case l
Take a look at that and see if that is the case, if so change the 1 to a l and that should fix it for you.
Then that will probably be the case, in every guide it looks like a 1 :o
I will change it asap and report back here if it fixed it.

Re: Services returning unknown on windows server 2012

Posted: Fri Apr 29, 2016 1:11 pm
by tgriep
No problem, just post what you find.
Darn Fonts.....

Re: Services returning unknown on windows server 2012

Posted: Fri Apr 29, 2016 1:30 pm
by SaltyBear
tgriep wrote:No problem, just post what you find.
Darn Fonts.....
That was indeed the problem, the services work now :D
I have another problem though, on LAN A the testclient (also visible on the screencaps) went from UP to DOWN but he is definetly up since I am using it right now.
He appeared UP at the start and remained that way for a few days until suddenly it went down but all services report working. The only error I get is a "PING CRITICAL - Packet loss = 100%"
Since it worked at first, any idea why it is reporting a critical ping thus classifying the server as down when he is definetly up?
And thanks a lot for helping me find my stopit error :D

Re: Services returning unknown on windows server 2012

Posted: Fri Apr 29, 2016 1:36 pm
by tgriep
Check the firewall on the Windows server and see if someone turned on blocking of ICMP requests and that is causing the issue.

Re: Services returning unknown on windows server 2012

Posted: Mon May 02, 2016 2:47 am
by SaltyBear
I have 2 new questions

1. How can I monitor nagios A with nagios B and reverse?

2. We are not using the standard port 22 for SSH, how can I tell nagios to check for SSH on the port we use and not on the standard port? Because of this the check is failing for it now. Please note that every server uses a different port, so it can't be a global value change and has to be just for this server.

Re: Services returning unknown on windows server 2012

Posted: Mon May 02, 2016 9:43 am
by tgriep
1. You can install the Linux Agent "NRPE" on each server and use that to monitor each other for Drive Space, Memory, services, etc...
Take a look at this link and see if this is what you need.
https://exchange.nagios.org/directory/A ... or/details

2. Without knowing which check you are using I can only guess but if you are using the check_ssh plugin, you can specify the port by using the -p option.
Most plugins, if you run them from the command line with the --help option, it will print out it's options and usage for those options.

Re: Services returning unknown on windows server 2012

Posted: Mon May 02, 2016 4:51 pm
by SaltyBear
tgriep wrote:1. You can install the Linux Agent "NRPE" on each server and use that to monitor each other for Drive Space, Memory, services, etc...
Take a look at this link and see if this is what you need.
https://exchange.nagios.org/directory/A ... or/details

2. Without knowing which check you are using I can only guess but if you are using the check_ssh plugin, you can specify the port by using the -p option.
Most plugins, if you run them from the command line with the --help option, it will print out it's options and usage for those options.
Do I also need to edit the actual command or just the service I defined for the servers?
And yes, it's the basic check_ssh one that I am using.

Re: Services returning unknown on windows server 2012

Posted: Mon May 02, 2016 4:54 pm
by tgriep
If the port is different for every server, you will have to edit every service check with the port.

Re: Services returning unknown on windows server 2012

Posted: Tue May 03, 2016 3:30 am
by SaltyBear
tgriep wrote:If the port is different for every server, you will have to edit every service check with the port.
It is working now, I also added a pfsense firewall to nagios A and it's automatically monitoring "PING" and "SSH"
SSH however is giving an error because you can't ssh pfsense but I never added these services manually so how can I make it stop monitoring ssh to get rid of the error?

Your link also isn't really helping me with how to monitor each nagios with the other one, I'm quite confused on this matter.

Re: Services returning unknown on windows server 2012

Posted: Tue May 03, 2016 10:37 am
by rkennedy
You're going to need to clear out the service definition for the SSH check, and then run service nagios restart