![](https://secure.gravatar.com/avatar/21caf0a08d095be7196a1648d20942be.jpg?s=120&d=mm&r=g)
I actually think it's a bug, because of the transition from the old vm code to the new vm code, but in such way that it simply does not remove the ones where the type is NULL - the code for each hypervisor is careful not to remove VMs that aren't inserted by itself. Please try and see if they come back in double after running the delete query and re-running discovery on the affected devices.
If I'm right, a one-off delete (or table truncate + rediscover all your vm hosts) will permanently solve the problem.
Tom
On 2016-02-04 10:31, Moerman, Maarten wrote:
I think writing a query to get this removed is not gonna help you, as the next poller run, they'll probably re-inserted again.
I would suggest to file a JIRA ticket with the problem described, and have the dev people make a permanent fix for this.
Maarten
Maarten Moerman | Mgr, Network Engineering | eBay Classifieds | +31-655122247 | mmoerman@ebay.com
From: observium on behalf of Christian Gerbrandt Reply-To: Observium Network Observation System Date: Wednesday, February 3, 2016 at 10:00 AM To: Observium Network Observation System Subject: Re: [Observium] duplicate entries in vminfo table . [SEC=UNCLASSIFIED]
I have the same with our monitoring. All the vmware servers show all vms twice.
On Feb 02, 2016, at 11:48 PM, Peter.Hine@familycourt.gov.au mailto:Peter.Hine@familycourt.gov.au wrote:
vCE 0.16.1.7533
going to the VMs tab of a vmWare server shows duplicate entries.
hunting this down in the code shows the following in html/pages/device/vm.inc.php
foreach (dbFetchRows("SELECT * FROM vminfo WHERE device_id = ? ORDER BY vm_name", array($device['device_id'])) as $vm) { print_vm_row($vm, $device); }
so running it on the command line echo 'SELECT * FROM vminfo WHERE device_id = '586' ORDER BY vm_name' | mysql --user=observium --password=not_my_pass observium
reveals the entries to be duplicated in the table.
they all seem to have the last field as a difference. there must be something missing in the code for adding the entries to not find the first entries and update them.
" 2586 586 vmware cbr-desktop E: tools not running 3072 2 powered off 4239aa20-542a-f088-dedf-afb508da6a9c NULL 2757 586 vmware cbr-desktop E: tools not running 3072 2 powered off 4239aa20-542a-f088-dedf-afb508da6a9c vmware-snmp "
either NULL or vmware-snmp.
Can someone in the Team give me a sql to remove the bad rows ?
thanks
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au mailto:peter.hine@familycourt.gov.au
The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail.
observium mailing list observium@observium.org mailto:observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium