We need to monitor a specific instance of a processes on Linux servers. We Created profile in AC using 'Name+Command Line' where the entry is a regex
/processname.*--pid-file=/opt/folder/subfolder/
Tested, this finds exactly one process and the correct process.
Trying to use MCS to copy this profile from a single server to my group, MCS appears to function as expected, with apparently correct settings visible when checking in OC, using MCS panel.
However, when verifying the configuration deployed in AC (so that I can test the profile's operation) there doesn't appear to be a valid profile as command line is not filled in.
Why is this occurring?
AC input and the MCS processes configuration input GUIs are different.
Although in the AC there is only one line input for Name + Command line, in the MCS profile you need to set the command line in the "command line" entry and the name of the profile in process name.
If the command line is empty the profile will not be created correctly.
So instead of using the command line in the "Process Name" and leaving the command line empty:
Use instead Name and command line in separate lines:
Note:
To verify the correct name and command line the probe detects, please just copy the details of the monitored process from the values shown by the probe itself.
In the example below this verification is made with the nimbus process on a cent-os robot for the nimbus process:
In summarizing, for deploying a processes monitoring using a regex to match a particular command line to a group using MCS, the following steps should be followed:
(The limitation of the MCS Template is that it is only a template that serves for generating a CFG file at a probe level. So we cannot test the result of the regex in the MCS GUI itself (unlike the IM and AC GUIS)
For this reason, it is correct to first test a particular regex in the probe itself and see if it returns the correct result. Then, create an MCS profile with those details. Considering using name/command line in separate inputs in MCS.
Also, as a general MCS best practice, it is always recommended to test an example device profile first, and then if it looks good, copy it at a group level.)
STEPS:
1. First Deploy MCS Setup Processes (enhanced) to the entire MCS Group
(Do this step only if you do not want to use the default settings)
Setup Processes Profile Type Default Settings:
• Check Interval - 60 seconds
• Processes to Exclude - Idle
• Log Level - 0 Fatal
• Log Size - 100 KB
• CPU Sample Cells - 5
• Global CPU Sampling - Checked
• Process Memory (Windows) - Page File
• Find CPU Usage per Process (Windows) - Checked
• Virtual Memory - Checked
• Resident Memory (UNIX) - Checked
As described in processes MCS Profile Type Configuration (broadcom.com)
2. Then use AC or IM to test a particular pattern matching/Regex result using the Test utility. If you'd like to verify the exact details detected by the probe for a particular command line check the value shown by the probe itself.
3. Once the name and command line are verified to be working in the probe GUI create a Device processes (Enhanced) MCS profile, paying attention to setting the command line in the "command line" entry and the name of the profile in "process name".
4. Once the device level profile is deployed, go back to AC and verify if the profile is deployed as expected.
5. If the device profile satisfies the expectations, copy the profile from the device to the target group and what is worked for the example server it will work for all servers in the group that have the same process name + command line running.