[Idea] Send Limit and Log - GLPI-Injector #610
Replies: 2 comments 2 replies
-
before having to modify glpi-injector, I would better like to understand what really happens. When run from a crontab, you should redirect stderr output to a file and before running again the injector you should probably have to rotate the generated file, just renaming it with a number or even a date. Assuming you're using You can for example use the following script (and for the example, let say it is
You can also use Than you can use follow this crontab example:
By always try to rotate logs the minute before running glpi-injector, you should keep the last 10 logs of glpi-injector output. Then maybe this can help you to find what's the real issue. |
Beta Was this translation helpful? Give feedback.
-
I made the .sh script in /etc/glpi-agent/glpi-injector-rotate-logs.sh to rotate the logs and do some tests And I created the log in /var/log/injector.log What I've already noticed with some manual runs is the following which is probably one of the problems I'm noticing:
I believe this is the main problem when we are talking about a very large sending park I left it running for some time to get the log, attached as an example, I used the final parameters: The cron that was already running before running did not have debug enabled, this log represents what I forced to run in parallel Sometimes I come across error 504 when trying to make the injector for GLPI, specifically about this I tried to increase the php.ini timeout on the GLPI server to try to resolve it, but it still happens sometimes |
Beta Was this translation helpful? Give feedback.
-
Your idea
I have a park of approximately thirty thousand computers that contact a single glpi proxy server through glpi-agent, these inventories are being saved in a specific folder, for example /inventario, and to send these .json files saved in this folder, I created several crons in Linux that run glpi-injector every 1 hour on the GLPI server
What I'm noticing with this situation is that glpi-injector can't handle 3-4 thousand files in a single glpi-injector task
My suggestion here for a glpi-injector feature would be to set a sending limit that can be set via parameter, so that it doesn't get overloaded or trying to send forever
I also didn't find any log that records glpi-injector's actions, I know that there are --debug and --verbose parameters, but if it is being run via cron, this information is lost as far as I noticed.
Beta Was this translation helpful? Give feedback.
All reactions