I open this topic because i think i’m facing a bug.
I run an icinga2 v2.13.2 with icingaweb and icinga-director in version 1.9.1.
I recently installed an agent node on a Rsyslog machine that is directly connected to the master node.
The connection is working fine and i’m able to make the agent run the following check command that i have configured like this:
/usr/lib64/nagios/plugins/check_logfiles --logfile /var/log/agents/PDUlogfile --criticalpattern "Authentication failed"
the command is executed correctly by the agent but then I get the following error:
UNKNOWN - (1 unknown in check_logfile.protocol-2022-09-14-12-19-42) - could not find logfile /var/log/agents/PDUlogfile
When I inspect the service to show the executed command icinga shows this:
'/usr/lib64/nagios/plugins/check_logfiles' '--logfile' '/var/log/agents/PDUlogfile' '--criticalpattern' "Authentication failed"
When i run this command on my agent machine (with root account) i don’t get the same error and the script is able to locate the logfile. Why ? It’s just like the executed command displayed is not actually the executed command.
I tried to see if it was a permission issue, so i changed the permission on the file, directory: none of this worked.
Finally I tried to copy the logfile inside the /usr/lib64/nagios/plugins/ directory and check if it was working, and surprise, when my file is in this folder it works…
Is there a path limitation for the icinga agent that prevents it from accessing other folder paths ? Or am I missing something else ?
I hope you will have some answers,