Bug #70691 MEM3 agent seems to populate mysql.inventory.name with 'hostId' not 'hostid'
Submitted: 22 Oct 2013 22:42 Modified: 22 Jan 2014 9:46
Reporter: Simon Mudd (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Agent Severity:S3 (Non-critical)
Version:3.0.2.2900 OS:Any
Assigned to: CPU Architecture:Any

[22 Oct 2013 22:42] Simon Mudd
Description:
I notice from a server which has only had a MEM agent on it:

root@mem3host [(none)]> select * from mysql.inventory;
+--------+-------------------------------------------------------+
| name   | value                                                 |
+--------+-------------------------------------------------------+
| uuid   | 46691e25-3a58-11e3-bf50-ac162db8b8a8                  |
| hostId | ssh:{09:d8:53:2d:b5:de:1c:a6:bd:e8:10:e0:99:d7:b3:c2} |
+--------+-------------------------------------------------------+

an older MEM2 host shows:

root@mem2host [(none)]> select * from mysql.inventory;
+--------+-------------------------------------------------------+
| name   | value                                                 |
+--------+-------------------------------------------------------+
| uuid   | 850a1327-1133-4e33-8d21-4173918f79fb                  |
| hostid | ssh:{36:f8:33:a9:75:16:62:cc:2b:f9:f1:56:3a:1f:7f:60} |
+--------+-------------------------------------------------------+

Notice the name column uses 2 different values: 'hostid', or 'hostId'.

How to repeat:
Start a MEM2 agent on a server with no mysql.inventory table and see the name column values when it has run. Do the same for a MEM3 agent.

It seems they are different.

Suggested fix:
I am collecting history of these values to work around some issues when cloning and would prefer a single value to be used: hostid (to be compatible with MEM2) as this makes collecting data and checking for changes easier.

While this sounds like a tiny difference it has broken some scripts I wrote recently to collect the history of the contents of these tables so making things consistent would be good.
[22 Oct 2013 23:00] Simon Mudd
I'm not 100% sure which version of the agent created the MEM2 table but this is the version of the agent running on the server in question: 2.3.10.2152.
[22 Jan 2014 9:46] Mark Leith
Fixed in MEM 3.0.3

The Agent will create new mysql.inventory table entries using the string "hostid" instead of "hostId". Customers may update the key for existing mysql.inventory tables if necessary.

---

3.0.3 changelog:

        The Agent now creates new mysql.inventory
        table entries using the string "hostid" instead of "hostId", as
        it was written in MEM 2.3.x.