Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check Windows Event Logs in Subfolders #1185

Open
cosmicgumbo opened this issue Jul 18, 2024 · 0 comments
Open

Check Windows Event Logs in Subfolders #1185

cosmicgumbo opened this issue Jul 18, 2024 · 0 comments

Comments

@cosmicgumbo
Copy link

The NCPA built-in Windows log check only works with logs at the root of Event Viewer, not under any subfolders. Issue #948 describes this for a certain log, but it appears to be with any log in a subfolder.

See forum post: https://support.nagios.com/forum/viewtopic.php?p=357809

I have tried variations but they have not worked
./check_ncpa.py -H <hostname> -P 5693 -t '<your token>' -M 'logs' -q 'name=Laserfiche-Directory Service-Server/Operational
./check_ncpa.py -H <hostname> -P 5693 -t '<your token>' -M 'logs' -q 'name=Laserfiche-Directory Service-Server%4Operational'

This appears to be similar to how the 2 different Powershell commands Get-WinEvent vs Get-EventLog
Get-WinEvent -LogName "Laserfiche-Directory Service-Server/Operational" -MaxEvents 1 - returns the desired result

Get-EventLog -AsString -List - this returns only the root level logs and does not recognize those in subfolders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants