Server: 2.1.2
$ uname -a
Linux my_host 3.13.0-43-generic #72-Ubuntu SMP Mon Dec 8 19:35:06 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Ubuntu 14.0.4.1/LTS
Agent: latest OCS-NG_WINDOWS_AGENT_v2.1.1.1
The field of "RealMB" added via GUI got ID=22 and become "fields_22"
Plugin (shortened code, attempting to get m/b model):
wscript.echo _
"<ACCOUNTINFO>"& _
"<KEYNAME>fields_22</KEYNAME>"& _
"<KEYVALUE>" & varResModel & " ("&varItem.Manufacturer&")" & "</KEYVALUE>"&_
"</ACCOUNTINFO>"
Plugin results:
C:\>cscript test.vbs
<ACCOUNTINFO><KEYNAME>fields_22</KEYNAME><KEYVALUE>H55M-S2H (Gigabyte Technology Co., Ltd.)</KEYVALUE></ACCOUNTINFO>
Resulting XML on server (partial):
<?xml version="1.0" encoding="UTF-8" ?>
<REQUEST>
<DEVICEID>my_device</DEVICEID>
<CONTENT>
...
<ACCOUNTINFO>
<KEYNAME>fields_22</KEYNAME>
<KEYVALUE>H55M-S2H (Gigabyte Technology Co., Ltd.)</KEYVALUE>
</ACCOUNTINFO>
...
<ACCOUNTINFO>
<KEYNAME>fields_21</KEYNAME>
<KEYVALUE />
</ACCOUNTINFO>
<ACCOUNTINFO>
<KEYNAME>fields_22</KEYNAME>
<KEYVALUE />
</ACCOUNTINFO>
<HARDWARE>
<NAME>comp-name</NAME>
<WORKGROUP>comp-workgroup</WORKGROUP>
And finally part of admininfo.conf after "/force" (or after regular inventorying)
<ACCOUNTINFO>
<KEYNAME>fields_22</KEYNAME>
<KEYVALUE />
</ACCOUNTINFO>
So, what's wrong? How can I replace empty accountinfo column with actual information? It seems that plugin's output must be placed after the data read from .conf file, othewise the actual data become overwritten by obsolete ones.
BTW, nothing helped with the bios table modifications: 2.1.2 have bnothing in common with 1.x and all suggestions gave no results - they points to wrong places, wrong files etc.
I added MMODEL, MMANUFACTURER and MSN columns into BIOS table, all as "text (varchar)" similar to preexisting fields, changed some suggested PERL (or php?) scripts, but should I replace "accountinfo" with "bios" and "fields_22" with "MMANUFACTURER", I getting "ERROR *** AGENT => Failed to send Inventory <HTTP Status Code #500>", but server receives my XML (from .ocs file on server):
<BIOS>
<KEYNAME>MMANUFACTURER</KEYNAME>
<KEYVALUE>H55M-S2H (Gigabyte Technology Co., Ltd.)</KEYVALUE>
</BIOS>
<ACCOUNTINFO>
<KEYNAME>fields_22</KEYNAME>
<KEYVALUE>H55M-S2H (Gigabyte Technology Co., Ltd.)</KEYVALUE>
</ACCOUNTINFO>
What should I do other than put myself into mental hospital?