monitoring Windows system log with NCPA
Posted: Thu Apr 20, 2017 8:02 am
Hi,
We're running NCPA 2.0.3 with Nagios 5.4.0 (Linux) and the check_ncpa.py plugin, version 1.1.0.
I want to monitor Windows event logs with the NCPA. Accessing the logs with NCPA API through a URL is successful. That is:
https://<host>:5693/api/logs?token=<token>&name=Application&severity=ERROR
returns a nice overview of the log entries.
But I am not able to turn this into a service with the check_ncpa.py plugin.
I have tried the following arguments but none work:
Running check_ncpa.py from the command line returns the following:
So... what's the correct path to use to access the Windows system logs through the NCPA's API?
Edit: ncpa_plugin version.
We're running NCPA 2.0.3 with Nagios 5.4.0 (Linux) and the check_ncpa.py plugin, version 1.1.0.
I want to monitor Windows event logs with the NCPA. Accessing the logs with NCPA API through a URL is successful. That is:
https://<host>:5693/api/logs?token=<token>&name=Application&severity=ERROR
returns a nice overview of the log entries.
But I am not able to turn this into a service with the check_ncpa.py plugin.
I have tried the following arguments but none work:
The error message returned is something like The logs () requested does not exist.-t 'token' -P 5693 -M 'api/logs&name=Application&severity=ERROR'
-t 'token' -P 5693 -M 'api/logs?token=token&name=Application&severity=ERROR'
-t 'token' -P 5693 -M 'api/logs/name=Application&severity=ERROR'
-t 'token' -P 5693 -M 'api/logs/name=Application/severity=ERROR'
Running check_ncpa.py from the command line returns the following:
and:/usr/local/nagios/libexec/check_ncpa.py -H <host> -t 'token' -P 5693 -M 'logs/name=Application' --list
error/
path: name=Application
message: The logs requested does not exist. You may be trying to access the 'logs' node.
code: 100
logs:
and:/usr/local/nagios/libexec/check_ncpa.py -H <host> -t 'token' -P 5693 -M 'logs/' --list
logs/
message: No log type selected. Select log types using 'name=<type>'. Example: api/logs?name=System. Multiple log types can be selected.
and:/usr/local/nagios/libexec/check_ncpa.py -H <host> -t 'token' -P 5693 -M '/' --list
root/
processes: []
logs/
message: No log type selected. Select log types using 'name=<type>'. Example: api/logs?name=System. Multiple log types can be selected.
memory/
/usr/local/nagios/libexec/check_ncpa.py -H <host> -t 'token' -P 5693 -M 'api/logs' --list
logs/
message: No log type selected. Select log types using 'name=<type>'. Example: api/logs?name=System. Multiple log types can be selected.
So... what's the correct path to use to access the Windows system logs through the NCPA's API?
Edit: ncpa_plugin version.