[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting Issue with Cloned machines and "host_monitid_unique" key

From: admin-at-extremeshok-dot-com
Subject: Re: Getting Issue with Cloned machines and "host_monitid_unique" key
Date: Wed, 04 Dec 2013 14:05:06 +0200
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

Run the following before you clone the vm.
service monit stop
rm -f /var/lib/monit/id
rm -f /var/lib/monit/state

Optional: Run the following once on the new cloned node.
monit -c /etc/monit/monitrc reload

On 12/4/2013 1:59 PM, Roose, Marco wrote:

Dear Monit team,

this is a common issue (cloning VMs is an everyday task or maybe you just have a VM template with an installed monit) and I thought about how on could solve this annoying problem.


Maybe one could implement a possibility to renew the id file from M/Monit. And/or one could think about adding an command line option to monit which does the same:


monit renew-id


Maybe this would be a feature to add in the next release?


Best regards,



From: address@hidden [mailto:address@hidden] On Behalf Of Martin Pala
Sent: Wednesday, December 04, 2013 12:49 PM
To: This is the general mailing list for monit
Subject: Re: Getting Issue with Cloned machines and "host_monitid_unique" key




the Monit ID is stored in the file (by default ~/, you can customize the location using "set idfile" statement)


To generate new ID:


1.) stop monit on the host with ID duplicate

2.) remove the ID file: rm -f ~/

3.) start monit (it will automatically generate new ID and store it to the file)








On 04 Dec 2013, at 12:44, Mital Vora <address@hidden> wrote:

Hi All,


I am trying to get multiple instances of same machine started up in the VMWare VCenter client (Cloned machines from the template of one using VMWare.


I am able to successfully add server1 and it shows up correctly in the mmonit screen.


I am getting following error messages in mmonit logs when I try to add server2


2013-12-04 05:24:40 SQLException: ERROR:  duplicate key value violates unique constraint "host_monitid_unique"

 raised in PostgresqlPreparedStatement_execute at src/db/postgresql/PostgresqlPreparedStatement.c:184 when processing URL /collector


It seems that monit is using something from the system which are not different in the cloned machines and so I am getting above errors and the sever2 is not getting added correctly.


My Question is: What does monit use as unique Id ?

Can we manually provide unique ID for monit ? if yes how ?


Mital Vora.

To unsubscribe:


To unsubscribe:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]