Check WMI Plus » All Posts https://edcint.co.nz/checkwmiplus/forums/feed Wed, 22 Jan 2025 09:55:37 +0000 https://bbpress.org/?v=2.6.9 en-AU https://edcint.co.nz/checkwmiplus/forums/topic/checkservice-wmi-status-override/#post-993 <![CDATA[Reply To: checkservice WMI status override]]> https://edcint.co.nz/checkwmiplus/forums/topic/checkservice-wmi-status-override/#post-993 Sun, 25 Aug 2024 19:39:14 +0000 63jw7PTiR8_XKJRA I’ve managed to resolve the permissions issue, so the services now show status OK.

In the security descriptor SDDL for the service, I had only granted:

CC — SERVICE_QUERY_CONFIG (request service settings)
LC — SERVICE_QUERY_STATUS (service status polling)
RC — READ_CONTROL
RP — SERVICE_START

I also needed to grant:
LO — SERVICE_INTERROGATE

I also granted enumeration of dependent services although it was not necessary for this instance:
SW — SERVICE_ENUMERATE_DEPENDENTS

The complete DACL entry I appended was as follows (SID truncated):
(A;;CCLCSWRPLORC;;;S-1-5-21-…)

Sam

]]>
https://edcint.co.nz/checkwmiplus/forums/topic/checkservice-wmi-status-override/#post-991 <![CDATA[checkservice WMI status override]]> https://edcint.co.nz/checkwmiplus/forums/topic/checkservice-wmi-status-override/#post-991 Sun, 25 Aug 2024 16:07:18 +0000 63jw7PTiR8_XKJRA Hi,

I am using a standard user account with Check WMI Plus. The user has access to the WMI namespace and I’ve updated scmanager SDDL service permissions to include a group containing the user account. This gives access to most services.

When I run checkservice with “.”, I couldn’t see the SQL Server instance in the output, so I applied updated the SDDL for the service like I had for scmanager and I can now see it in the output.

The service shows it is running with automatic startup, but the Status property is showing “UNKNOWN”. I’ve confirmed with wbemtest that the user account is also returning UNKNOWN. Testing it with a local administrator account returns OK which means I’m likely missing some additional permissions for remote non-admin-user checks which I can’t figure out.

This leads me to see if instead it is possible to override when a service is considered bad? I would like to still mark a service as OK if it is running with automatic startup and ignore the status.

./check_wmi_plus.pl -H x.x.x.x -m checkservice -A /etc/check_wmi_plus/id-token -a ‘MSSQL\$XYZ’
OK – Found 1 Services(s), 0 OK and 1 with problems (0 excluded). ‘MSSQL$XYZ’ (MSSQL$XYZ) is Running (UNKNOWN).|’Total Service Count’=1; ‘Service Count OK State’=0; ‘Service Count Problem State’=1; ‘Excluded Service Count’=0;

Thanks,

Sam

  • This topic was modified 4 months, 4 weeks ago by 63jw7PTiR8_XKJRA. Reason: Formatting
]]>
https://edcint.co.nz/checkwmiplus/forums/topic/check-cpu-usage-processess-90/#post-985 <![CDATA[Reply To: check cpu usage processess >90%]]> https://edcint.co.nz/checkwmiplus/forums/topic/check-cpu-usage-processess-90/#post-985 Tue, 15 Aug 2023 00:29:00 +0000 admin Try

check_wmi_plus.pl -H i -u u -p p -m checkproc -s cpuabove -a % -w 90 -exc _AvgCPU=@0:2

This is from the sample commands on this page

Nagios Service Definitions

  • This reply was modified 1 year, 5 months ago by admin.
  • This reply was modified 1 year, 5 months ago by admin.
]]>
https://edcint.co.nz/checkwmiplus/forums/topic/check-cpu-usage-processess-90/#post-984 <![CDATA[check cpu usage processess >90%]]> https://edcint.co.nz/checkwmiplus/forums/topic/check-cpu-usage-processess-90/#post-984 Wed, 09 Aug 2023 12:42:34 +0000 trentasis Hi,

I’m trying to monitor processes with more than 90% usage, I have tried using command:

check_wmi_plus.pl -H i -u u -p p-m checkproc -s cpu -a % -exc _AvgCPU=@0:90 -w _ItemCount=2 -t 59

and this returns a warning like
WARNING (Sample Period 21 sec) – [Triggered by _ItemCount>2] – Found 3 Instance(s) of “%” running. CPU_Idle(PID=0)=100.0% CPU_sqlservr(PID=1360)=100.0% CPU__Total(PID=0)=100.0% |’Process Count’=3;2; ‘Avg Utilisation CPU_Idle’=100.0%; ‘Avg Utilisation CPU_sqlservr’=100.0%; ‘Avg Utilisation CPU__Total’=100.0%;

Checking windows processes no processes with more than 90% are seen, please anybody can give detail what is wrong in this command and get only when process is more 90%?

Thanks

]]>
https://edcint.co.nz/checkwmiplus/forums/topic/wmic_server-setup/#post-981 <![CDATA[Reply To: wmic_server setup]]> https://edcint.co.nz/checkwmiplus/forums/topic/wmic_server-setup/#post-981 Sat, 18 Mar 2023 09:28:04 +0000 ShakeZpear forgot: aiowmi version 0.2.3

]]>
https://edcint.co.nz/checkwmiplus/forums/topic/wmic_server-setup/#post-979 <![CDATA[Reply To: wmic_server setup]]> https://edcint.co.nz/checkwmiplus/forums/topic/wmic_server-setup/#post-979 Sat, 18 Mar 2023 09:14:40 +0000 ShakeZpear I am stuck in a similar but slightly different situation – but none of the above solved the problem of wmic_server not starting.

The primary visible symptom is following “last message” of the starting server:

“ImportError: cannot import name ‘UUID’ from ‘uuid’ (/opt/commoc/lib/python3/aiowmi/uuid.py)”

Versions:

Ubuntu 20.04
Python3: 3.8.10
gunicorn 20.0.4

The wmic_server.yaml ist the unchanged sample file.

I am stuck with my intellectual abilities here 🙂

Thanks for any help.

Complete Stack trace:

nice[1255306]: [INFO] Starting gunicorn 20.0.4
nice[1255306]: [1255306] [INFO] Listening at: http://127.0.0.1:2313 (1255306)
nice[1255306]: [1255306] [INFO] Using worker: sync
nice[1255310]: [1255310] [INFO] Booting worker with pid: 1255310
nice[1255310]: [ERROR] Exception in worker process
nice[1255310]: Traceback (most recent call last):
nice[1255310]: File “/usr/lib/python3/dist-packages/gunicorn/arbiter.py”, line 583, in spawn_worker
nice[1255310]: worker.init_process()
nice[1255310]: File “/usr/lib/python3/dist-packages/gunicorn/workers/base.py”, line 119, in init_process
nice[1255310]: self.load_wsgi()
nice[1255310]: File “/usr/lib/python3/dist-packages/gunicorn/workers/base.py”, line 144, in load_wsgi
nice[1255310]: self.wsgi = self.app.wsgi()
nice[1255310]: File “/usr/lib/python3/dist-packages/gunicorn/app/base.py”, line 67, in wsgi
nice[1255310]: self.callable = self.load()
nice[1255310]: File “/usr/lib/python3/dist-packages/gunicorn/app/wsgiapp.py”, line 49, in load
nice[1255310]: return self.load_wsgiapp()
nice[1255310]: File “/usr/lib/python3/dist-packages/gunicorn/app/wsgiapp.py”, line 39, in load_wsgiapp
nice[1255310]: return util.import_app(self.app_uri)
nice[1255310]: File “/usr/lib/python3/dist-packages/gunicorn/util.py”, line 383, in import_app
nice[1255310]: mod = importlib.import_module(module)
nice[1255310]: File “/usr/lib/python3.8/importlib/__init__.py”, line 127, in import_module
nice[1255310]: return _bootstrap._gcd_import(name[level:], package, level)
nice[1255310]: File “<frozen importlib._bootstrap>”, line 1014, in _gcd_import
nice[1255310]: File “<frozen importlib._bootstrap>”, line 991, in _find_and_load
nice[1255310]: File “<frozen importlib._bootstrap>”, line 975, in _find_and_load_unlocked
nice[1255310]: File “<frozen importlib._bootstrap>”, line 671, in _load_unlocked
nice[1255310]: File “<frozen importlib._bootstrap_external>”, line 848, in exec_module
nice[1255310]: File “<frozen importlib._bootstrap>”, line 219, in _call_with_frames_removed
nice[1255310]: File “/opt/commoc/bin/wmic_server/wmic_server.py”, line 5, in <module>
nice[1255310]: from flask import Flask, jsonify, request, make_response
nice[1255310]: File “/usr/lib/python3/dist-packages/flask/__init__.py”, line 21, in <module>
nice[1255310]: from .app import Flask
nice[1255310]: File “/usr/lib/python3/dist-packages/flask/app.py”, line 60, in <module>
nice[1255310]: from .sessions import SecureCookieSessionInterface
nice[1255310]: File “/usr/lib/python3/dist-packages/flask/sessions.py”, line 22, in <module>
nice[1255310]: from .json.tag import TaggedJSONSerializer
nice[1255310]: File “/usr/lib/python3/dist-packages/flask/json/tag.py”, line 47, in <module>
nice[1255310]: from uuid import UUID
nice[1255310]: ImportError: cannot import name ‘UUID’ from ‘uuid’ (/opt/commoc/lib/python3/aiowmi/uuid.py)
nice[1255310]: [2023-03-18 10:05:45 +0100] [1255310] [INFO] Worker exiting (pid: 1255310)
nice[1255306]: [2023-03-18 10:05:45 +0100] [1255306] [INFO] Shutting down: Master
nice[1255306]: [2023-03-18 10:05:45 +0100] [1255306] [INFO] Reason: Worker failed to boot.
Mar 18 10:05:46 ubu2004commoc-installtest systemd[1]: wmic_server.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
Mar 18 10:05:46 ubu2004commoc-installtest systemd[1]: wmic_server.service: Failed with result ‘exit-code’.
Mar 18 10:05:46 ubu2004commoc-installtest systemd[1]: wmic_server.service: Scheduled restart job, restart counter is at 4.
Mar 18 10:05:46 ubu2004commoc-installtest systemd[1]: Stopped WMIC Server.

]]>
https://edcint.co.nz/checkwmiplus/forums/topic/problem-with-charsets-and-windows-2008/#post-964 <![CDATA[Problem with charsets and Windows 2008]]> https://edcint.co.nz/checkwmiplus/forums/topic/problem-with-charsets-and-windows-2008/#post-964 Thu, 16 Feb 2023 12:55:50 +0000 trentasis Hi, I’m having a problem where my wmic client makes a petition to wmicserver but receives a message with the wrong Charset.

This is the message in question:

OK – Found 1 Services(s), 1 OK and 0 with problems (0 excluded). ‘Administraci▒n de licencias de Escritorio remoto’ (TermServLicensing) is Running.|’Total Service Count’=1; ‘Service Count OK State’=1;;1; ‘Service Count Problem State’=0; ‘Excluded Service Count’=0;

As you can see… Administraci▒n accents fail.

Do you know a solution for this?

Windows is in Spanish.

]]>
https://edcint.co.nz/checkwmiplus/forums/topic/wmic_server-setup/#post-945 <![CDATA[Reply To: wmic_server setup]]> https://edcint.co.nz/checkwmiplus/forums/topic/wmic_server-setup/#post-945 Wed, 28 Dec 2022 08:37:26 +0000 superskunk Bella Mario sei un grande! i used Mario’s suggestion and now the service works like a charm. Thanks a lot.

]]>
https://edcint.co.nz/checkwmiplus/forums/topic/wmic_server-setup/#post-931 <![CDATA[Reply To: wmic_server setup]]> https://edcint.co.nz/checkwmiplus/forums/topic/wmic_server-setup/#post-931 Tue, 06 Dec 2022 11:32:19 +0000 bisontim I solved with User inside the service definition and adding the full path to nice and unicorn.
This is my procedure:
which gunicorn
/home/administrator/.local/bin/gunicorn

So I put into wmic_server.service:

[Unit]
Description=WMIC Server

[Service]
User=administrator
Restart=always
# we need the pythonpath to contain the aiowmi directory and the directory where the wmic_server.py is located

# Update the following placeholders before using this file
# AIOWMI_INSTALL_DIR
# WMIC_SERVER_INSTALL_DIR
# WMIC_SERVER_CONFIG

ExecStart=/usr/bin/nice /home/administrator/.local/bin/gunicorn -b 127.0.0.1:2313 –pythonpath /etc/wmic_server,/etc/wmic_server/aiowmi/contrib/wmic_server –threads 1 wmic_server:app
ExecStop=/usr/bin/pkill -f “wmic_server:app”

# Optionally, use these additional settings
# WMIC_SERVER_CONFIG_DIRECTORY defaults to WMIC_SERVER_INSTALL_DIR
# Environment=WMIC_SERVER_CONFIG=WMIC_SERVER_CONFIG_DIRECTORY/wmic_server.yaml
# Environment=WMIC_SERVER_DEBUG=1

[Install]
WantedBy=multi-user.target

And it works.
Furthermore, you have to subsitute the placeholder AIOWMI_INSTALL_DIR and WMIC_SERVER_INSTALL_DIR in the ExecStart, not to use them as variables.

Bye
Mario

  • This reply was modified 2 years, 1 month ago by bisontim.
]]>
https://edcint.co.nz/checkwmiplus/forums/topic/check_wmi_plus-1-68-configure-wmic-server-running-over-https/#post-922 <![CDATA[check_wmi_plus (1.68) configure WMIC server running over HTTPS]]> https://edcint.co.nz/checkwmiplus/forums/topic/check_wmi_plus-1-68-configure-wmic-server-running-over-https/#post-922 Fri, 02 Dec 2022 05:13:26 +0000 sijo With the check_wmi_plus (1.68), how is it possible to connect WMIC server hosted over HTTPS 443 port.

In the **check_wmi_plus.conf** entered the configuration as below, but its not working

$wmic_server_uri=’https://192.168.59.90/wmic&#8217;;

How is it possible to provide the HTTPS certificate information.?

]]>