
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
OMi Policy - instance parameters
I Created a simple Scheduled Task policy which runs a script on the node with a parameter. I want to use this policy to run the script with different parameters. So I made the script parameter as instance parameter in the policy template. I deployed the policy on the node with multiple instance parameters but for some reason the policy only executes with the first instance parameter.
Here are some details of my policy.
It's a scheduled policy with the following command
ps -ef | grep %%SEARCH_STRING%%
I declared SEARCH_STRING as an instance parameter in the policy. My intention is to use this policy to test different process on the system.
I deployed the policy to a node with multiple instance parameters. I only get events for the first instance parameter.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Coudl you possibly share the script if its allowed and there is no sensitive info of course
Otherwise some screenhots and comments ect would help us to understand your problem better:)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hi Mario, I have update the question


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Hello Mario,
Why don't you use split function on perl to separete string that you want to grep using comma separeted?
for example:
Supose that you want to use instance to grep 3 strings:
1- java
2-tomcat
3-jboss
So you pass in a single string parameter (ex:Process) like this: java,tomcat,jboss.
In the script you use for example:
my $Processes; $Processes= $OVOSystem->ParameterGetString("Processes","%%Processes%%"); $Session->Value("Processes", $Processes); foreach my $process (split (/[,|]/, $Processes)) { open PS, 'ps -ef | grep '.$process.' |' or die; while (<PS>) { tr/ //s; s/^ //; print; } }
So you can check each ps and do what you want.
Is this what you want?