Check_file_age plugin error

Hi,

I have implemented the following plugin through icinga.

https://www.monitoring-plugins.org/doc/man/check_file_age.html

How ever it is throwing the following error while running.

perl /opt/monitoring/check_file_new_age.pl

Can’t exec @PERL@ at /opt/monitoring/check_file_new_age.pl line 1

Also Icinga throws the following error,

execvpe(/opt/monitoring/check_file_age.pl) failed: No such file or directory.

The file is already there with adequate permissions.

Any one have faced similar issue and found a solution for this?

Thanks,
Sreenadh

This error is typical if the check is executed on the wrong host e.g. you want to run it at an agent, you need to add something like this to your service object:

command_endpoint = host.address