Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.11.1 available

The official documentation can be found on http://wiki.ocsinventory-ng.org. Read it before asking your question.

VBS plugins' results not stored in accountinfo table

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


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>"&_


Plugin results:

C:\>cscript test.vbs

Resulting XML on server (partial):

<?xml version="1.0" encoding="UTF-8" ?>

            <KEYVALUE>H55M-S2H (Gigabyte Technology Co., Ltd.)</KEYVALUE>


            <KEYVALUE />
            <KEYVALUE />


And finally part of admininfo.conf after "/force" (or after regular inventorying)

    <KEYVALUE />


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):

            <KEYVALUE>H55M-S2H (Gigabyte Technology Co., Ltd.)</KEYVALUE>
            <KEYVALUE>H55M-S2H (Gigabyte Technology Co., Ltd.)</KEYVALUE>

What should I do other than put myself into mental hospital?

in OCS Inventory NG agent for Windows by (320 points)

1 Answer

0 votes

I also have problems adding data to XML by plugin performance (http://ask.ocsinventory-ng.org//1638/windows-8-user-report-problem-inventory-xml-workaround).

For instance, I tried the plugin lastloggeduser as it appears in the wiki, but in the moment of sending the inventory to server I also get the HTTP #500 error in the log.  [Server 2.1.2 and Agent under windows].

I haven't gathered any information likely to be a solution so far.

by (240 points)

See my next question. I've discovered that the solution exists, but I've no idea how to clean up all files on all PCs///

But have you tried that solution at least changing once the file? Cos I'm not sure if modifying the local file will make the server accept the data.
I found that the accountinfo is the only table modifyable by plugins. Attempts to modify other tables results the error 500.

As to changing local file.

For example, we have empy record for the field named "fields_22" in admininfo.conf. Regardless of plugin's output the data in admininfo.conf will not be changed unless I change them manually in server's table.

But if there isn't the record for this field in existing admininfo.conf, then plugin's output will be accepted and will be recorded into admininfo.conf and on server side. You may try this yourself.

In an ideal case, we must have all plugins working before the first inventory of specific computer in order to place correct data into proper fields within admininfo.conf. But it is impossible,
That would explain my problem (and screw me at a time). Would you mind to tell me where did you find the information about that? Thanks a lot for the help buddy

where did you find the information about that

Sorry, can't understand: information about what?

Powered by Question2Answer