Service check showing wrong information

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
user1234
Posts: 15
Joined: Wed May 16, 2018 1:55 am

Service check showing wrong information

Post by user1234 »

Hello.
I have service check for many servers to check if any windows updates are waiting to install.
Service just running powershell script.
After install updates and server restart, Nagios with service check showing that still updates are present to install.

But in fact there is no updates.
Additionally when i run the same script directly from windows machine then script showing that there is no updates.

To sum up running same script from nagios check service and directly from windows machine showing two different results.
But after few days also nagios showing correct info that there is no waiting updates.
Screens in attachment.
Clients are windows server 2012,2016,2019.

Code: Select all

System:
Nagios XI Version : 5.4.13
localhost.localdomain 2.6.32-696.3.2.el6.x86_64 x86_64
CentOS release 6.9 (Final)
Gnome is not installed
Vmware image, no proxy, no ssl
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Service check showing wrong information

Post by scottwilkerson »

Your doc is showing the "Last check" time as "2019-11-14 14:49:12"

are you sure active checks are enabled for this service?

You can view this on the Advanced Tab of the service status detail page under "Service Attributes"

also, what frequency (check interval) is this check running?

Can you click "Force an immediate check" on the service status detail page under Quick Actions to force an update?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
user1234
Posts: 15
Joined: Wed May 16, 2018 1:55 am

Re: Service check showing wrong information

Post by user1234 »

Yes,doc showing old date because i did screens few days before do post on forum, but problem is persistent.

"Force an immediate check" - nothing changed - i'm using this option often to other services and working excellent.
Service check every 6hours.

Code: Select all

Service State:	 Warning
Duration:	83d 10h 52m 58s
Service Stability:	Unchanging (stable)
Last Check:	2019-12-04 03:23:59
Next Check:	2019-12-04 09:23:59
Active checks was disabled.
I enabled it,but it dont change anything, still showing that are waiting updates.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Service check showing wrong information

Post by scottwilkerson »

On the Windows Update page in your doc, I see "* some settings are managed by your organization"

Is it possible that certain updates are being blocked by policy and aren't showing up in the GUI?

If you run the check_windows_updates.ps1 script on the server directly what does it output?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
user1234
Posts: 15
Joined: Wed May 16, 2018 1:55 am

Re: Service check showing wrong information

Post by user1234 »

I've manage settings for updates also, nothing blocked.
You have output script in doc file in first post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Service check showing wrong information

Post by scottwilkerson »

I mean can you just run the script from a powershell command on the windows machine and show the output, that is not in the doc
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
user1234
Posts: 15
Joined: Wed May 16, 2018 1:55 am

Re: Service check showing wrong information

Post by user1234 »

It is on attached doc - second page at top.
Script showing that are no updates.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Service check showing wrong information

Post by scottwilkerson »

user1234 wrote:It is on attached doc - second page at top.
Script showing that are no updates.
Sorry about that, I see it now.

I'm not familiar with this plugin but have a few questions, did it create a check_windows_updates-cache.xml and check_windows_update.log file in the scripts directory?

Also, I'm sure this is obvious, but you are 100% sure this is the same machine 10.83.72.153?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
user1234
Posts: 15
Joined: Wed May 16, 2018 1:55 am

Re: Service check showing wrong information

Post by user1234 »

Can we do remote session and I will show you everything in 5min?
I have this problem for many servers, this one is only example.
Powershell just giving output to nsclient with number of updates => 0 , 1 ,2 ,3 etc.
As you see from screen powershell giving output 0 , but if i invoke same script directly from nagios then output is different.

After few days it showing correct output every time.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Service check showing wrong information

Post by scottwilkerson »

user1234 wrote:Can we do remote session and I will show you everything in 5min?
I have this problem for many servers, this one is only example.
Powershell just giving output to nsclient with number of updates => 0 , 1 ,2 ,3 etc.
As you see from screen powershell giving output 0 , but if i invoke same script directly from nagios then output is different.

After few days it showing correct output every time.
Before a remote gets setup, we need to escalate this to a ticket, please open a ticket at
https://support.nagios.com/tickets/

You can reference this thread as context.

Thanks
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked