mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Adds support for auto loading third-party module eventlog messages
This commit is contained in:
parent
2e225e1ce5
commit
483356136c
1 changed files with 9 additions and 0 deletions
|
|
@ -29,6 +29,15 @@ function Use-Icinga()
|
|||
Import-IcingaLib '\' -Init -Custom;
|
||||
Import-IcingaLib '\' -Init;
|
||||
|
||||
$EventLogMessages = Invoke-IcingaNamespaceCmdlets -Command 'Register-IcingaEventLogMessages*';
|
||||
foreach ($entry in $EventLogMessages.Values) {
|
||||
foreach ($event in $entry.Keys) {
|
||||
Add-IcingaHashtableItem -Hashtable $global:IcingaEventLogEnums `
|
||||
-Key $event `
|
||||
-Value $entry[$event] | Out-Null;
|
||||
}
|
||||
}
|
||||
|
||||
if ($LibOnly -eq $FALSE) {
|
||||
Register-IcingaEventLog;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue