You can use EPAgent or Infrastructure Agent to monitor OS related metrics. In my env i am using below script to monitor
Open process.
cat openfile.pl
#!/bin/perl
## Unix Field Pack for EPAgent
## Version 1.1 Apr 2018
## Ranganathan
#
use Sys::Hostname;
# warnings and strict commented out
# use warnings;
# use strict;
my $error_log = "./logs/df_a_errors.log";
my $firsttime=1;
my @IOmetrics = ("OFILE","NAME");
my @IOtypes = ("IntCounter","StringEvent");
eval {
my $host = hostname;
$error_log = "./logs/ps_a_errors.${host}.log";
my $openfile_command="lsof -u \$USER |wc -l|";
open(open_f,$openfile_command) || die "Error when executing \"$openfile_command\": $!";
while (<open_f>) {
chomp;
my @list = split(" ");
for(my $i=0;$i<scalar(@list);$i++) {
print qq{<metric type="$IOtypes[$i]" name="OPENFILES|${host}:$IOmetrics[$i]" value="$list[$i]"/>\n};
}
}
close(open_f);
print qq{<metric type="IntCounter" name="OPENFILES:Success" value="2"/>\n}
};
if ( $@ ) {
# write the error message to an error log for troubleshooting
open(ERROR_LOG,">>$error_log") || die "Error when opening file \"$error_log\": $!";
print ERROR_LOG localtime() . " - " . $@;
close(ERROR_LOG);
# gives the end user the opportunity to monitor the open_f plugin
print qq{<metric type="IntCounter" name="open_f:Success" value="1"/>\n};
}