Systems Management (OpenView-OP Mgmt) Support and News Forum
Showing results for 
Search instead for 
Do you mean 

pattern matching question - java with two parameters to check

SOLVED
Go to Solution
Highlighted
Occasional Contributor

pattern matching question - java with two parameters to check

We have plenty of java process monitors in place but a new requirement came before us.  Monitor a java with these two strings...

 

-Dweblogic.Name=AdminServer

And

-Daismt.env=prod

 

So I would think that

 

-Dweblogic.Name=AdminServer<*> -Daismt.env=prod

 

would work as parameter and in fact does pass my matching test when i copy the grep result into pattern matching test box.  But when I deploy the policy it does not find a match and sends an alert.

 

I am reluctant to post entire grep for ps -ef | grep java but just know there is a string between the two parameters I am checking for.

 

Guy (not Senir, he was selfish and used his name in our account)

 

Thanks for any suggestions :-)

1 ACCEPTED SOLUTIONS
Valued Contributor

Re: pattern matching question - java with two parameters to check

Hello,

 

Does the parameter string end with "-Daismt.env=prod"?

 

Try the following ( add <*> at the end of parameter list)...
-Dweblogic.Name=AdminServer<*>-Daismt.env=prod<*>
Note :- Assuming the parameter starts with "-Dweblogic.Name=AdminServer"
 

Best Regards,
Gopinath Manickam

To show your appreciation, click KUDOS !!!
4 REPLIES
Valued Contributor

Re: pattern matching question - java with two parameters to check

Hello,

 

Does the parameter string end with "-Daismt.env=prod"?

 

Try the following ( add <*> at the end of parameter list)...
-Dweblogic.Name=AdminServer<*>-Daismt.env=prod<*>
Note :- Assuming the parameter starts with "-Dweblogic.Name=AdminServer"
 

Best Regards,
Gopinath Manickam

To show your appreciation, click KUDOS !!!
Valued Contributor Valued Contributor

Re: pattern matching question - java with two parameters to check

Is the managed node a Solaris box?

 

If so, if you use ps -ef to list the process not all parameters may be shown and you'll have to use /usr/ucb/bin/ps auxwww instead to display all command parameters...

Occasional Contributor

Re: pattern matching question - java with two parameters to check

Great idea, thank you, testing now.

 

-Guy

Occasional Contributor

Re: pattern matching question - java with two parameters to check

Redhat box.