“service” name is not the same as “process” name … service name in Monit is
unique description of the monitored service - not related to the monitored
object. If you have multiple processes with the same process name, you can
monitor them, just choose unique service name for each process:
check process myprocess_XYZ with pidfile /var/run/myprocess1.pid
check process myprocess_ABC with pidfile /var/run/myprocess2.pid
> On 20 Jul 2015, at 19:26, Samitha Wijedasa <[email protected]> wrote:
>
> Hi,
>
> I'm getting "Error: service name conflict, <process name> already defined"
> error if I define two configuration entries for the corresponding process
> with different pid files in the same configuration file. Only way I can get
> this thing implemented is to run two instances of monit with two different
> configuration files.
>
> Thanks
>
> Samitha
>
>
>
> On Monday, 20 July 2015, 11:26, Martin Pala <[email protected]> wrote:
>
>
> Yes,
>
> if you use pidfile, the process name is not significant - monit checks the
> process by the PID from the file, they can have the same name.
>
> Regards,
> Martin
>
>
>
>> On 20 Jul 2015, at 17:24, Samitha Wijedasa <[email protected]
>> <mailto:[email protected]>> wrote:
>>
>> Hi,
>>
>> How can I monitor two processes with the same name but different PID files ?
>>
>> Thanks
>>
>> Samitha
>
>
>
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general