Operating System Monitoring - Objects filters
In some cases it might be required to configure operating system objects - for example file systems - which are to be included or excluded from the Operating System monitoring process. As of SAP Host Agent 721 PL31 , you can configure that the operating system objects are monitored in the osfilter.conf file. This file is located within the configuration directory of SAP Host Agent : /usr/sap/hostctrl/exe/config.d (on UNIX) or C:\Program Files\SAP\hostctrl\exe\config.d\ (on Windows).
- The file can contain several rules to read line by line
- The syntax of one line is the following:
[+/-]: ( ) ( )... - There are 2 types of rule: Including rules specified by [+] and excluding rules specified by [-]
- Including rules can omit the [+] sign .
- All lines starting with a # sign are ignored and considered as comment lines.
- If neither rules nor a specific
are specified , then all Objects of this type are included within the operating system monitoring process. - As soon as one single rule is defined, the matching process is executed according to the following rules:
specifies a string supporting special wildcards signs:
* : Matches any character (0 or many occurrence)
? : Matches exactly one occurrence of any character
! : Negates the match only if specified at the begin of the pattern- All Including [+] rules are processed using an OR operator.
- Each
- The first matching exclude [-] rule excludes the object from the process without further processing.
This means in general that you can choose between two generic approaches which return the same results:
- Define only include rules which matches the object you would like to monitor.
- Define include rules and exclude afterwards the object you want to exclude explicitly.
There are advantages and disadvantages when using approach 1 or 2. You can decide on the best approach only based on the requirements of the use case.
Filesystem
In general, the Filesystem object supports the following attributes : mount , device , type
- mount matches the mount point name of the file system
- device matches the device specified
- type matches the file system type
You can find all attributes executing the command mount or df on Linux, for example:
Here an example of a configuration file for file systems:
You can test the file system filters e.g. with the following command:
Process
In general, the Process object supports the following attributes: cmd, user
- cmd matches the command line of the process
- user matches the user name of the process
You can find all attributes executing the ps command on Linux, for example:
Here an example of a configuration file for processes:
You can test the process filters e.g. with the following command:
Conversion from saposcol FileSystem filter
If customers already use the saposcol functionality specified in SAP Note 498112 , we offer a conversion tool called convertoscolfilter .
You can run this tool as follows:
By default, the tool prints the converted filter in stdout. You can override this behavior by providing the argument -out with the to be used.
If the file provided to -out already exists, a new file called.new is created. Then the tool prints the following message:
If the file provided to -out already exists, a new file called
No comments:
Post a Comment