glpi-project / glpi-agent

GLPI Agent
GNU General Public License v2.0
212 stars 51 forks source link

logfile-maxsize parameter not accepted when installing GLPI-Agent #625

Closed erique-souza closed 3 months ago

erique-souza commented 3 months ago

Bug reporting acknowledgment

Yes, I read it

Professional support

Still not applicable

Describe the bug

I noticed that the parameter "--logfile-maxsize=x" is not being accepted in glpi-agent version 1.7.1 when installing the agent

In the documentation present here https://glpi-agent.readthedocs.io/en/latest/installation/linux-appimage.html the parameter exists, but in practice it tries to install the agent in Linux with this parameter, it gives an error and shows the --help screen, I also noticed that there is no reference in --help about this parameter, leading me to believe that it is not really implemented.

To reproduce

Try install glpi-agent in linux:

wget https://github.com/glpi-project/glpi-agent/releases/download/1.7.1/glpi-agent-1.7.1-linux-installer.pl --no-check-certificate && perl glpi-agent-1.7.1-linux-installer.pl --force --install --type=all --no-compression --service --server=https://glpiserver/plugins/glpiinventory/ --no-ssl-check --logfile=/var/log/glpi-agent.log --logger=stderr --debug=2 --logfile-maxsize=64 --color=1 --tag=Linux --tasks=netdiscovery,netinventory,inventory --httpd-trust=127.0.0.1 --verbose

Expected behavior

Installing GLPI-Agent accepting the logfile-maxsize parameter

Operating system

Linux

GLPI Agent version

1.7.1

GLPI version

Not applicable

GLPIInventory plugin or other plugin version

Not applicable

Additional context

No response

g-bougard commented 3 months ago

Hi @erique-souza

you're pointing the AppImage package documentation where you're using the perl linux installer. So you made a wrong assumption.

I can confirm you that option is not supported in perl linux installer. Check the available option running the installer with --help option as explained in doc: https://glpi-agent.readthedocs.io/en/latest/installation/index.html#linux-perl-installer

Then you have to install the agent and add a dedicated .cfg configuration file under /etc/glpi-agent/conf.d with not supported options. You can even install this file before the installation so options are taken from the first run.

erique-souza commented 3 months ago

Hi @erique-souza

you're pointing the AppImage package documentation where you're using the perl linux installer. So you made a wrong assumption.

I can confirm you that option is not supported in perl linux installer. Check the available option running the installer with --help option as explained in doc: https://glpi-agent.readthedocs.io/en/latest/installation/index.html#linux-perl-installer

Then you have to install the agent and add a dedicated .cfg configuration file under /etc/glpi-agent/conf.d with not supported options. You can even install this file before the installation so options are taken from the first run.

Understood, I hadn't really noticed that it was app image instead of perl in the documentation I thought the concept of the parameters was universal, but ok

If the logfile-maxsize parameter works if placed manually in the .cfg document, that already solves it for me, thank you, I just wanted to confirm if the command also worked if placed manually