<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>Why devid isn't (always) associated with hostid?</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Having in each host the devid1..devmany it's easy do manage than dev10,dev30,devzbr</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Imagine you have 10 machines with 15 devices, your last machine will have devices ID 149..150 (if you add then at one time), not devid 1..10.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>The solution for now is to add two (not more then 99 mogstored) digits from the devid to hostid and other two(not more then 99 devices in one machine) for devid, something like this:</DIV><DIV>hostid 1: devid (0)101..110</DIV><DIV>hostid10: devid1001..1010</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>From table device:</DIV><DIV> PRIMARY KEY (`devid`),</DIV><DIV>should be</DIV><DIV> PRIMARY KEY (`devid`, `hostid`),</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>From mogadm, devices sub shouldn't return an hash in which devid is the key, but and array.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I haven't looked in the core.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Maybe it's hard to change or not, what do you think about it?</DIV><DIV><DIV><DIV><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><BR class="khtml-block-placeholder"></DIV><DIV>--</DIV><DIV>Delfim Machado</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>SMTP: <A href="mailto:delfim.c.machado@co.sapo.pt">delfim.c.machado@co.sapo.pt</A></DIV><DIV>XMPP: <A href="mailto:delfim.c.machado@sapo.pt">delfim.c.machado@sapo.pt</A></DIV><BR class="Apple-interchange-newline"></SPAN></SPAN></SPAN><DIV>SPAM: ******.*.*******@**.****.**</DIV><BR class="Apple-interchange-newline"></SPAN> </DIV><BR></DIV></DIV></BODY></HTML>