Use Case:
Consider a Java process being monitored by our server monitoring agent. Every time the process is restarted, the process arguments might change. During this scenario, the process will be marked as Down and it wont be changed to the Up status even after the process being restarted successfully.
Problem Statement:
The user has to delete the existing Java process and add the same process again with the newly discovered arguments in order to mark it up for monitoring.
Solution:
With an update to the latest version of the Linux agent 16.4.0, we have extended support for providing Regular Expressions (RegEx) to match a set of process arguments.
For the above case, let's assume the initial argument for the Java process was like:
/usr/bin/java -Dosgi.requiredJavaVersion=1.8 -start_time 1504249532
On restarting the process, it gets altered to the following:
/usr/bin/java -Dosgi.requiredJavaVersion=1.8 -start_time 124830290
A sample Regex that can be used for this case is as follows:
(.*)start_time\s?([0-9]{1,10})
where,
(.*) - matches anything
\s - matches white space
0-9 - a single character in the range between 0 and 9
1,10 - matches between 1 and 10 as many times as possible
Once RegEx is enabled, the Linux monitoring agent will match the running process argument with the configured RegEx and determine the status of the process.
RegEx is supported for Windows Process also. Please ensure the Windows agent version is 19.5.0 and above.
Related Articles
Steps to install Linux monitoring agent in custom platforms/distributions
If you want to install the Site24x7 Server Monitoring agent in platforms/flavors other than Debian, Ubuntu, CentOS, RedHat, Madriva, Fedora, Suse, Amazon Linux, Gentoo, CoreOS, Raspberry Pi (requires Python 3 and above), ARM Processor (requires ...
How to fix a SSL connection error when downloading the Site24x7 Linux server monitoring agent installer
In a few scenarios, when you try to download the Site24x7 Linux server monitoring agent installer, an SSL connection failure error message will display. Follow the instructions below based on your use case to fix this error. Prerequisite: For ...
FAQs related to Windows Service monitoring
After installing APM Insight Windows service monitoring agent , if you don't see data in the Site24x7 console, or if you are unable to add monitors, kindly follow the below given steps to troubleshoot. If few monitors are not getting added: Check for ...
Configure a proxy for a Linux server monitoring agent during installation
When you install Site24x7's Linux server monitoring agent, use one of the below mentioned commands depending upon your proxy configuration requirements. Scenario 1: Proxy with authentication bash Site24x7InstallScript.sh -i -key=<DEVICE_KEY> ...
Monitor a specific Linux process
Monitor specific processes running on your Linux server. Follow the below steps to monitor a specific Linux process: Log In and go to Server Select the desired server monitor In the monitor details page, go to Processes > Discover Processes. This ...