Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/10-Knowledge-Base.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ For this reason you will find a list of Icinga knowledge base entries below. Ent
| [IWKB000005](knowledgebase/IWKB000005.md) | powershell.exe : Failed to start service 'Icinga PowerShell Service (icingapowershell)'. |
| [IWKB000006](knowledgebase/IWKB000006.md) | The user you are running this command as does not have permission to access the Windows Update ComObject "Microsoft.Update.Session". |
| [IWKB000007](knowledgebase/IWKB000007.md) | Icinga Director Self-Service API fails with errors. [Error]: The remote host for address "..." could not be resolved [Error]: Failed to connect to your Icinga Director at "...". Please try again. |
| [IWKB000008](knowledgebase/IWKB000008.md) | The EventLog contains many `Perflib`, `PerfNet` and `PerfProc` errors/warnings with EventId `1008`, `2002` and `2004` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions doc/knowledgebase/IWKB000008.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Icinga Knowledge Base - IWKB000008

## Short Message

The EventLog contains many `Perflib`, `PerfNet` and `PerfProc` errors/warnings with EventId `1008`, `2002` and `2004`

## Example Exception

![EventLog PerfLib](../images/04_knowledgebase/IWKB000008/01_EventLog_Error.png)

## Reason

We are using an internal .NET Class to create Performance Counter objects, as this allows us to use the englisch naming for `Processor` for example, instead of many different localization for categories or counter names.

By doing so, we ensure that Icinga for Windows can be used on any Windows machine, regardless of language settings.

The issue on this method is, that even while we only load the `Processor` Performance Category for example, the method will try to initialise all Performance Counter categories available on the system. Regular users, including the `NetworkService`, do not have enough permissions to access the `WmiApRpl` for example, resulting in aboves error message. Running the plugins as `Administrator` or in `System` context is not causing issues, as the required permissions to access these objects are available.

## Solution

At the moment there is no solution available to resolve this issue. Permissions to these counters cannot be granted. Disabling these Performance Counter endpoints is not suitable as well, because it might break different applications and it is also **not** adviced to run the Icinga Agent or checks in `LocalSystem` context for security reasons.

Right now a workaround would be the experimental feature [Forward Checks to Internal API](..\experimental\01-Forward-checks-to-internal-API.md), which is not yet ready for production.

As Performance Counter libraries are loaded during startup, they will only occur once you start the Icinga for Windows service with this daemon. Every single check executed afterwards will use Performance Counter libraries, but the current shell session has already loaded required components and therefor only access objects we want.

As a result, no additional errors or warnings are added to the EventLog.