diff --git a/docs/checks/commands/check_eventlog.md b/docs/checks/commands/check_eventlog.md index a8f22a75..5e203f0a 100755 --- a/docs/checks/commands/check_eventlog.md +++ b/docs/checks/commands/check_eventlog.md @@ -6,28 +6,28 @@ comment: auto-generated by make docs, do not edit Checks the Windows eventlog entries. Basically, this check wraps this WMI query: -SELECT - ComputerName, - LogFile, - Category, - EventCode, - EventIdentifier, - EventType, - Message, - SourceName, - Type, - TimeWritten, - TimeGenerated -FROM - Win32_NTLogEvent - -See https://learn.microsoft.com/en-us/previous-versions/windows/desktop/eventlogprov/win32-ntlogevent for + + SELECT + ComputerName, + LogFile, + Category, + EventCode, + EventIdentifier, + EventType, + Message, + SourceName, + Type, + TimeWritten, + TimeGenerated + FROM + Win32_NTLogEvent + +See [here](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/eventlogprov/win32-ntlogevent) for a description of the provided fields. Filter conditions on id are added to the WHERE clause of the WMI query when possible, the filter is still applied to the returned events. - - [Argument Defaults](#argument-defaults) - [Attributes](#attributes) - [Examples](#examples) diff --git a/docs/checks/commands/check_logfile.md b/docs/checks/commands/check_logfile.md index 2b5ea8e6..7e7f70e5 100644 --- a/docs/checks/commands/check_logfile.md +++ b/docs/checks/commands/check_logfile.md @@ -5,18 +5,18 @@ comment: auto-generated by make docs, do not edit Checks logfiles or any other text format file for errors or other general patterns - In order to use this plugin, you need to enable 'CheckLogFile' in the '[/modules]' section of the snclient_local.ini. +In order to use this plugin, you need to enable 'CheckLogFile' in the '[/modules]' section of the snclient_local.ini. - Also, to avoid security issues, you need to set 'allowed pattern' in the '[/settings/check/logfile]' - section of the snclient_local.ini to a comma separated list of allowed glob patterns. +Also, to avoid security issues, you need to set 'allowed pattern' in the '[/settings/check/logfile]' +section of the snclient_local.ini to a comma separated list of allowed glob patterns. + +Example: - Example: [/settings/check/logfile] allowed pattern = /var/log/** # This allows all files recursively in /var/log/ allowed pattern += /opt/logs/*.log # This allows all files with .log extension in /opt/logs/ - See https://github.com/bmatcuk/doublestar#patterns for details on the pattern syntax. - +See [here](https://github.com/bmatcuk/doublestar#patterns) for details on the pattern syntax. - [Argument Defaults](#argument-defaults) - [Attributes](#attributes) diff --git a/docs/checks/commands/check_memory.md b/docs/checks/commands/check_memory.md index 6b8d1e4e..f5c6073f 100644 --- a/docs/checks/commands/check_memory.md +++ b/docs/checks/commands/check_memory.md @@ -7,14 +7,12 @@ Checks the memory usage on the host. There are several types of memory that can be checked: - physical: physical memory - swap: swap memory (pagefile on Windows) - committed: committed memory as shown in the Windows task manager (Windows only, basically this is the physical + swap) - virtual: available Windows virtual address space (Windows only) +- physical: physical memory +- swap: swap memory (pagefile on Windows) +- committed: committed memory as shown in the Windows task manager (Windows only, basically this is the physical + swap) +- virtual: available Windows virtual address space (Windows only) -read more on Windows virtual address space: - - https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex +Read more on Windows virtual address space [here](https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex). - [Argument Defaults](#argument-defaults) - [Attributes](#attributes) diff --git a/docs/checks/commands/check_multi.md b/docs/checks/commands/check_multi.md index d1f5f137..d5eae22b 100644 --- a/docs/checks/commands/check_multi.md +++ b/docs/checks/commands/check_multi.md @@ -5,27 +5,28 @@ comment: auto-generated by make docs, do not edit Runs multiple checks and aggregates their status, output and performance data. - By default 'CheckMulti' is enabled, but you can disable it in the '[/modules]' section of the snclient_local.ini. - You can also set 'max checks' in the '[/settings/check/multi]' section of the snclient_local.ini, which limits - the number of checks that can be configured. +By default 'CheckMulti' is enabled, but you can disable it in the '[/modules]' section of the snclient_local.ini. +You can also set 'max checks' in the '[/settings/check/multi]' section of the snclient_local.ini, which limits +the number of checks that can be configured. - When using the inline mode, you can only use available commands (run 'check_index' to get a full list). +When using the inline mode, you can only use available commands (run 'check_index' to get a full list). - You can also define custom check sections in the config file, for example: - [/settings/check/multi/mycheck] - command[alias1] = check_process process=123 - command[alias2] = check_process process=345 +You can also define custom check sections in the config file, for example: - This can be executed with 'check_multi "config=mycheck"'. + [/settings/check/multi/mycheck] + command[alias1] = check_process process=123 + command[alias2] = check_process process=345 - It's also possible to use custom scripts in the config section, for example: - [/settings/check/multi/myscript] - command[alias1] = /path/to/plugin1 - command[alias2] = /path/to/plugin2 - command[alias3] = /path/to/plugin3 +This can be executed with 'check_multi "config=mycheck"'. - This can be executed with 'check_multi "config=myscript"'. +It's also possible to use custom scripts in the config section, for example: + [/settings/check/multi/myscript] + command[alias1] = /path/to/plugin1 + command[alias2] = /path/to/plugin2 + command[alias3] = /path/to/plugin3 + +This can be executed with 'check_multi "config=myscript"'. - [Argument Defaults](#argument-defaults) - [Attributes](#attributes) diff --git a/docs/checks/commands/check_wmi.md b/docs/checks/commands/check_wmi.md index 75036377..10d9c5a7 100644 --- a/docs/checks/commands/check_wmi.md +++ b/docs/checks/commands/check_wmi.md @@ -5,8 +5,7 @@ comment: auto-generated by make docs, do not edit Check status and metrics by running WMI queries. - In order to use this plugin, you need to enable 'CheckWMI' in the '[/modules]' section of the snclient_local.ini. - +In order to use this plugin, you need to enable 'CheckWMI' in the '[/modules]' section of the snclient_local.ini. - [Argument Defaults](#argument-defaults) - [Examples](#examples) diff --git a/pkg/snclient/check_eventlog.go b/pkg/snclient/check_eventlog.go index 91e5a66f..2c3b38b6 100644 --- a/pkg/snclient/check_eventlog.go +++ b/pkg/snclient/check_eventlog.go @@ -27,27 +27,27 @@ func (l *CheckEventlog) Build() *CheckData { description: `Checks the Windows eventlog entries. Basically, this check wraps this WMI query: -SELECT - ComputerName, - LogFile, - Category, - EventCode, - EventIdentifier, - EventType, - Message, - SourceName, - Type, - TimeWritten, - TimeGenerated -FROM - Win32_NTLogEvent -See https://learn.microsoft.com/en-us/previous-versions/windows/desktop/eventlogprov/win32-ntlogevent for + SELECT + ComputerName, + LogFile, + Category, + EventCode, + EventIdentifier, + EventType, + Message, + SourceName, + Type, + TimeWritten, + TimeGenerated + FROM + Win32_NTLogEvent + +See [here](https://learn.microsoft.com/en-us/previous-versions/windows/desktop/eventlogprov/win32-ntlogevent) for a description of the provided fields. Filter conditions on id are added to the WHERE clause of the WMI query when possible, -the filter is still applied to the returned events. -`, +the filter is still applied to the returned events.`, implemented: Windows, result: &CheckResult{ State: CheckExitOK, diff --git a/pkg/snclient/check_logfile.go b/pkg/snclient/check_logfile.go index e75cb474..40a3683d 100644 --- a/pkg/snclient/check_logfile.go +++ b/pkg/snclient/check_logfile.go @@ -64,18 +64,18 @@ func (c *CheckLogFile) Build() *CheckData { name: "check_logfile", description: `Checks logfiles or any other text format file for errors or other general patterns - In order to use this plugin, you need to enable 'CheckLogFile' in the '[/modules]' section of the snclient_local.ini. +In order to use this plugin, you need to enable 'CheckLogFile' in the '[/modules]' section of the snclient_local.ini. - Also, to avoid security issues, you need to set 'allowed pattern' in the '[/settings/check/logfile]' - section of the snclient_local.ini to a comma separated list of allowed glob patterns. +Also, to avoid security issues, you need to set 'allowed pattern' in the '[/settings/check/logfile]' +section of the snclient_local.ini to a comma separated list of allowed glob patterns. + +Example: - Example: [/settings/check/logfile] allowed pattern = /var/log/** # This allows all files recursively in /var/log/ allowed pattern += /opt/logs/*.log # This allows all files with .log extension in /opt/logs/ - See https://github.com/bmatcuk/doublestar#patterns for details on the pattern syntax. -`, +See [here](https://github.com/bmatcuk/doublestar#patterns) for details on the pattern syntax.`, detailSyntax: "%(line | chomp | cut=200)", // cut after 200 chars listCombine: "\n", okSyntax: "%(status) - %(count) line(s) found", diff --git a/pkg/snclient/check_memory.go b/pkg/snclient/check_memory.go index 01bd9d1b..49054dad 100644 --- a/pkg/snclient/check_memory.go +++ b/pkg/snclient/check_memory.go @@ -43,14 +43,12 @@ func (l *CheckMemory) Build() *CheckData { There are several types of memory that can be checked: - physical: physical memory - swap: swap memory (pagefile on Windows) - committed: committed memory as shown in the Windows task manager (Windows only, basically this is the physical + swap) - virtual: available Windows virtual address space (Windows only) +- physical: physical memory +- swap: swap memory (pagefile on Windows) +- committed: committed memory as shown in the Windows task manager (Windows only, basically this is the physical + swap) +- virtual: available Windows virtual address space (Windows only) -read more on Windows virtual address space: - - https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex`, +Read more on Windows virtual address space [here](https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/ns-sysinfoapi-memorystatusex).`, implemented: ALL, hasInventory: ListInventory, result: &CheckResult{ diff --git a/pkg/snclient/check_multi.go b/pkg/snclient/check_multi.go index 76f423d8..bd9f1dc5 100644 --- a/pkg/snclient/check_multi.go +++ b/pkg/snclient/check_multi.go @@ -68,27 +68,28 @@ func (l *CheckMulti) Build() *CheckData { name: "check_multi", description: `Runs multiple checks and aggregates their status, output and performance data. - By default 'CheckMulti' is enabled, but you can disable it in the '[/modules]' section of the snclient_local.ini. - You can also set 'max checks' in the '[/settings/check/multi]' section of the snclient_local.ini, which limits - the number of checks that can be configured. +By default 'CheckMulti' is enabled, but you can disable it in the '[/modules]' section of the snclient_local.ini. +You can also set 'max checks' in the '[/settings/check/multi]' section of the snclient_local.ini, which limits +the number of checks that can be configured. - When using the inline mode, you can only use available commands (run 'check_index' to get a full list). +When using the inline mode, you can only use available commands (run 'check_index' to get a full list). - You can also define custom check sections in the config file, for example: - [/settings/check/multi/mycheck] - command[alias1] = check_process process=123 - command[alias2] = check_process process=345 +You can also define custom check sections in the config file, for example: - This can be executed with 'check_multi "config=mycheck"'. + [/settings/check/multi/mycheck] + command[alias1] = check_process process=123 + command[alias2] = check_process process=345 - It's also possible to use custom scripts in the config section, for example: - [/settings/check/multi/myscript] - command[alias1] = /path/to/plugin1 - command[alias2] = /path/to/plugin2 - command[alias3] = /path/to/plugin3 +This can be executed with 'check_multi "config=mycheck"'. - This can be executed with 'check_multi "config=myscript"'. -`, +It's also possible to use custom scripts in the config section, for example: + + [/settings/check/multi/myscript] + command[alias1] = /path/to/plugin1 + command[alias2] = /path/to/plugin2 + command[alias3] = /path/to/plugin3 + +This can be executed with 'check_multi "config=myscript"'.`, implemented: ALL, result: &CheckResult{ State: CheckExitOK, diff --git a/pkg/snclient/check_wmi.go b/pkg/snclient/check_wmi.go index e3d4a0ea..ce346f89 100644 --- a/pkg/snclient/check_wmi.go +++ b/pkg/snclient/check_wmi.go @@ -32,8 +32,7 @@ func (l *CheckWMI) Build() *CheckData { name: "check_wmi", description: `Check status and metrics by running WMI queries. - In order to use this plugin, you need to enable 'CheckWMI' in the '[/modules]' section of the snclient_local.ini. -`, +In order to use this plugin, you need to enable 'CheckWMI' in the '[/modules]' section of the snclient_local.ini.`, implemented: Windows, args: map[string]CheckArgument{ "query": {value: &l.query, description: "The WMI query to execute"},