Hi,
I'm trying to monitor process on a Cisco ACI using a Linux script.
the script is quite basic:
#!/usr/bin/perl
$stat=`ps -A | grep nginx| wc -l`;
$exit=`echo $?`;
if ( $exit == 0 ) {
print "Message: Running nginx: $stat\n";
print "Statistic: $stat\n";
exit 0;
}
print "Message: ERROR: Can't check running nginx instances. Check the syntax of command (ps) in script. \n";
exit 1;
I can SSH to the device, i can create a script in /tmp and i can run the script and i have the correct behavior.
The only issue is when i execute the script from SAM, i have the following error :
Checking of directory existence failed. %
I have set the Script Working Directory: to /tmp.
I have also successfully test to create a file in /tmp using a scp command and from the command shell itself.
Have you any idea about this issue ?
Cheers