Services returning unknown on windows server 2012

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
SaltyBear
Posts: 20
Joined: Mon Apr 25, 2016 6:32 am

Re: Services returning unknown on windows server 2012

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Services returning unknown on windows server 2012

Post by tgriep »

No problem, just post what you find.
Darn Fonts.....
Be sure to check out our Knowledgebase for helpful articles and solutions!
SaltyBear
Posts: 20
Joined: Mon Apr 25, 2016 6:32 am

Re: Services returning unknown on windows server 2012

Post 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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Services returning unknown on windows server 2012

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
SaltyBear
Posts: 20
Joined: Mon Apr 25, 2016 6:32 am

Re: Services returning unknown on windows server 2012

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Services returning unknown on windows server 2012

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
SaltyBear
Posts: 20
Joined: Mon Apr 25, 2016 6:32 am

Re: Services returning unknown on windows server 2012

Post 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.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Services returning unknown on windows server 2012

Post by tgriep »

If the port is different for every server, you will have to edit every service check with the port.
Be sure to check out our Knowledgebase for helpful articles and solutions!
SaltyBear
Posts: 20
Joined: Mon Apr 25, 2016 6:32 am

Re: Services returning unknown on windows server 2012

Post 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.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Services returning unknown on windows server 2012

Post by rkennedy »

You're going to need to clear out the service definition for the SSH check, and then run service nagios restart
Former Nagios Employee
Locked