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.12.3 available

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

Problems with dates on my plugin

I have developed an agent plugin that gets the last system update date from Windows computers. The problem is that although I collect the date and correctly generated the XML, the information is not correctly imported into the database. Any ideas on how to do it? Any help would save my life!!!

XML

...
<UPDATE>
    <LASTUPDATE>2017-01-20</LASTUPDATE>
</UPDATE>
...

Database

CREATE TABLE update (
  ID INTEGER NOT NULL AUTO_INCREMENT,
  HARDWARE_ID INTEGER NOT NULL,
  LASTUPDATE DATE NOT NULL,
  PRIMARY KEY(ID,HARDWARE_ID),
  UNIQUE(ID,HARDWARE_ID)
) ENGINE=INNODB;

in OCS Inventory NG server for Unix by (280 points)

1 Answer

0 votes
Hi,

I am currently working on a similar project, although I am not an expert on plugins for OCS Inventory.

The opinion that I can give you is to take the form of an operational plugin and whose characteristics are identical to yours (for example the plugin "uptime" - a unique data to be recovered and integrated into the database)...

> The mechanics (VBS, PHP and DB files) being of course specifically to adapt for your need.

Regards, Stéphane
by (32.6k points)
 
Powered by Question2Answer
...