I had an independent java process running in linux. I wanted it to be monitored constantly. So I installed jenkins and started the process from jenkins. Jenkins keep showing the process as ongoing through which I know that the process is running.
Though it works as per my requirement, I wanted to know if this is a good approach? All the java process will be tied to the jenkins session, will it cause any memory issue?
Advertisement
Answer
Although Jenkins was designed, in the first instance, to do much more than monitor processes, it’s not at all “wrong” to use Jenkins for the sole purpose of process monitoring. If Jenkins fits your use case, then use it.
Jenkins is designed to handle a large number of memory intensive processes, so I would doubt that you would easily run into memory issues with just monitoring java processes. However, it sounds like your concern is with the fact that the java processes may be long running, in which case I suppose it’s possible to have memory issues; but without more specific information, it’s hard to say. You can, of course, modify the jenkins jvm configurations (heap, perm gen, ec) to better fit your needs if the out-of-the-box configurations don’t suffice.