Hello Côme, as I understand, you want to report the error in fusioninventory-agent if the XML inventory it pushed failed in some way to be integrated in FusionDirectory.
In that way, just think FIA is just an HTTP client. So and as it only tries to submit an XML, the only thing it checks for error is the HTTP Status code of the server. And then it only logs the returned status line. See HTTP::Response doc, what is log is just the return of $r->status_line() (see request method in FIA code at lib/FusionInventory/Agent/HTTP/Client.pm). In conclusion, try just to return an HTTP error with a short description. See also : http://php.net/manual/fr/function.http-response-code.php Hope this help, Best regards, Guillaume Bougard TECLIB' Montpellier 3 rue Doria, 34000 Montpellier, France ----- Mail original ----- De: "Côme Chilliet" <[email protected]> À: [email protected] Envoyé: Mercredi 2 Décembre 2015 12:27:23 Objet: [Fusioninventory-devel] collect.php protocol Hello, In FusionDirectory we have a FusionInventory plugin using a collect.php file which we give to the agent as server, for instance: sudo fusioninventory-agent --server="http://localhost/fusiondirectory/collect.php" It works, but I can’t seem to find documentation about the XML protocol in use, is there some somewhere? I’m especially interested in how errors could be handled, if my collect.php script encounter an error, I’d like to be able to return it in order for fi-agent to signal it in the command output. Côme _______________________________________________ Fusioninventory-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/fusioninventory-devel _______________________________________________ Fusioninventory-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/fusioninventory-devel
