Page 1 of 1

Service check showing wrong information

Posted: Fri Nov 29, 2019 4:42 am
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

Re: Service check showing wrong information

Posted: Mon Dec 02, 2019 11:50 am
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?

Re: Service check showing wrong information

Posted: Wed Dec 04, 2019 2:44 am
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.

Re: Service check showing wrong information

Posted: Wed Dec 04, 2019 7:58 am
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?

Re: Service check showing wrong information

Posted: Wed Dec 04, 2019 8:16 am
by user1234
I've manage settings for updates also, nothing blocked.
You have output script in doc file in first post.

Re: Service check showing wrong information

Posted: Wed Dec 04, 2019 8:19 am
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

Re: Service check showing wrong information

Posted: Wed Dec 04, 2019 8:23 am
by user1234
It is on attached doc - second page at top.
Script showing that are no updates.

Re: Service check showing wrong information

Posted: Wed Dec 04, 2019 8:35 am
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?

Re: Service check showing wrong information

Posted: Wed Dec 04, 2019 8:50 am
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.

Re: Service check showing wrong information

Posted: Wed Dec 04, 2019 8:58 am
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