Go to All Forums

Add Linux process uptime metric under the Process tab => Processes

Sometime it's important to know to know a particular process uptime, in seconds (days, minutes, etc..)
Then value can be compared with the threshold time values set in process Threshold Profile for settings a status and/or executing IT automation task.

The logic example 

 - If process runs longer than 10 hours then set status Trouble and execute and optional automation taks (e.g. kill the process)

Time can be easily calculated from the ps STIME column - for example:

# ps -ef | grep postgres | awk '{print$5}' | xargs -I{} date --date='{}' +"%s"

1605312000
1605551580
1605551580
1605398400
1605398400
1605398400
1605398400
1605312000
1605312000
1605312000
1605312000
1605312000
1605559380

 

Like (2) Reply
Replies (1)

Hi evgeny ,

The uptime of a process can be monitored via plugins. Please download the plugin from our GitHub repository and follow the instructions given in the Readme file.

Once the monitor is added, you can configure thresholds and associate automations to auto-remediate the threshold breach.

Also, we will look at the feasibility of bringing the process uptime metric under the Processes tab. Although we can't assure a timeline, we will ensure this is done at the earliest.

 

Regards,

Sriram

Like (0) Reply

Was this post helpful?