NTP Check on Windows Servers with NCPA agents
Posted: Sat Mar 07, 2020 2:45 am
Hello
On the monitored windows 2012 Servers
The plugin check_ntp_time.c'is placed Under C:\Program Files (x86)\Nagios\NCPA\plugins
Then when testing from NagiosXI to see if we can get the offset time from NTP
/usr/local/nagios/libexec/check_ncpa.py -H remotehost -t code-P 5693 -M 'plugins/check_ntp_time.c' -a "-u '-H NTPServerIP -w 60 -c 120'"
Resulting this
UNKNOWN: Error occurred while running the plugin. Use the verbose flag for more details.
Same result if executing
plugins/check_ntp_peer.c
or /check_time.c
Here is the listener log from the server hosting the NCPA agent
2020-03-07 02:38:42,243:ERROR:app:Exception on /api/agent/plugins/check_ntp_peer.c/-u/'-H NTPServerIP -w 60 -c 120' [GET]
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\flask\app.py", line 1817, in wsgi_app
File "C:\Python27\lib\site-packages\flask\app.py", line 1477, in full_dispatch_request
File "C:\Python27\lib\site-packages\flask\app.py", line 1381, in handle_user_exception
File "C:\Python27\lib\site-packages\flask\app.py", line 1475, in full_dispatch_request
File "C:\Python27\lib\site-packages\flask\app.py", line 1461, in dispatch_request
File "C:\ncpa\agent\listener\server.py", line 154, in token_auth_decoration
File "C:\ncpa\agent\listener\server.py", line 931, in api
File "C:\ncpa\agent\listener\nodes.py", line 251, in run_check
File "C:\ncpa\agent\listener\pluginnodes.py", line 99, in execute_plugin
File "C:\Python27\lib\site-packages\gevent\subprocess.py", line 586, in __init__
File "C:\Python27\lib\site-packages\gevent\subprocess.py", line 555, in __init__
File "C:\Python27\lib\site-packages\gevent\subprocess.py", line 899, in _execute_child
WindowsError: [Error 193] %1 is not a valid Win32 application
Any suggestion on how to acceive the same goal in different way that can work?
On the monitored windows 2012 Servers
The plugin check_ntp_time.c'is placed Under C:\Program Files (x86)\Nagios\NCPA\plugins
Then when testing from NagiosXI to see if we can get the offset time from NTP
/usr/local/nagios/libexec/check_ncpa.py -H remotehost -t code-P 5693 -M 'plugins/check_ntp_time.c' -a "-u '-H NTPServerIP -w 60 -c 120'"
Resulting this
UNKNOWN: Error occurred while running the plugin. Use the verbose flag for more details.
Same result if executing
plugins/check_ntp_peer.c
or /check_time.c
Here is the listener log from the server hosting the NCPA agent
2020-03-07 02:38:42,243:ERROR:app:Exception on /api/agent/plugins/check_ntp_peer.c/-u/'-H NTPServerIP -w 60 -c 120' [GET]
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\flask\app.py", line 1817, in wsgi_app
File "C:\Python27\lib\site-packages\flask\app.py", line 1477, in full_dispatch_request
File "C:\Python27\lib\site-packages\flask\app.py", line 1381, in handle_user_exception
File "C:\Python27\lib\site-packages\flask\app.py", line 1475, in full_dispatch_request
File "C:\Python27\lib\site-packages\flask\app.py", line 1461, in dispatch_request
File "C:\ncpa\agent\listener\server.py", line 154, in token_auth_decoration
File "C:\ncpa\agent\listener\server.py", line 931, in api
File "C:\ncpa\agent\listener\nodes.py", line 251, in run_check
File "C:\ncpa\agent\listener\pluginnodes.py", line 99, in execute_plugin
File "C:\Python27\lib\site-packages\gevent\subprocess.py", line 586, in __init__
File "C:\Python27\lib\site-packages\gevent\subprocess.py", line 555, in __init__
File "C:\Python27\lib\site-packages\gevent\subprocess.py", line 899, in _execute_child
WindowsError: [Error 193] %1 is not a valid Win32 application
Any suggestion on how to acceive the same goal in different way that can work?