Check_file_age - FILE_AGE CRITICAL: File not found

I am facing issue with the “check_file_age” pluggin, it working fine when i am executing it locally on the host. For reference,please find the screenshot from the local host;

And if i am trying to execute same from Master Node remotely on the end point, it gives always below error;
FILE_AGE CRITICAL: File not found

Screenshot from the master node is as under;
image

Icinga Version Info:

@dnsmichi dnsmichi - Need ur expert advise please

Hi and welcome,

  • never test plugins as root! Icinga is not running as root. Depending on the OS, it is icinga or nagios.
  • Please show the command “RT_Command” and the service config. Looks like your CLI file and the file in Icinga are different

Thank You for your response!

I tested it with the non-root users as well and the result is same, locally its working but from Master its not working;


image

image

@MarcusCaepio

You currently are executing the command on the node that is shown as “check source”.

If you want it to be executed on the remote host (the configured host object) you will need to configure the check to be either executed via check_by_ssh or install the Icinga Agent on the remote host that takes care of the check execution.

1 Like

Hi,
Icinga Agent is already installed on the remote host

Then all you should have to do is set Run on agent to yes in the Service template.
image

This will set the command endpoint (check source) to the host object the check is deployed to.

1 Like

Its working now :slight_smile:

Thank You for your support