Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have some java processes which need to be started by roster:

J1 on X --> J2 on Y --> J3 on Z

An idea comes to my mind is let J1 start automatically and use Nagios + NRPE to start J2 based the J1 state. Is there any better way to do this?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

Use ssh with public key encryption.

I had an environment like this. Starting the primary (J1 in your example) would connect to host Y and run command J2. Again, in your example, I would make the startup of J2 do the same thing: connect to Z and start J3.

Use ssh this way (with a public key) to start J2 from X:

ssh -i J2-on-Y.key user@y start j2

Likewise, starting up J2 on Y would have this command:

ssh -i J3-on-Z.key user@z start j3

With this in place, starting J1 would bring up all of the rest. Don't forget to account for shutdown as well - as well as the case when a startup is attempted but the process is already running.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.