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
34 changes: 17 additions & 17 deletions docs/checks/commands/check_eventlog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions docs/checks/commands/check_logfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 5 additions & 7 deletions docs/checks/commands/check_memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
31 changes: 16 additions & 15 deletions docs/checks/commands/check_multi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions docs/checks/commands/check_wmi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
34 changes: 17 additions & 17 deletions pkg/snclient/check_eventlog.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
12 changes: 6 additions & 6 deletions pkg/snclient/check_logfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
12 changes: 5 additions & 7 deletions pkg/snclient/check_memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
33 changes: 17 additions & 16 deletions pkg/snclient/check_multi.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions pkg/snclient/check_wmi.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down
Loading