in reply to Nagios custom Perl check

Hi,

an addition to what was said before. You don't check whether your domain list file could be opened. You could add something like:

... unless(open (FILE, $domainList)) { print "CRIT: Can't read file '$domainList': $!\n"; exit 1; } my @dom = <FILE>; ...

Regards
McA

Replies are listed 'Best First'.
Re^2: Nagios custom Perl check
by edimusrex (Monk) on Jul 22, 2014 at 13:07 UTC
    Ahh, looking back at the comments I think I now know the issue. I do not point to the full path of the domain list file in my script and I am willing to bet that's the issue. Thanks again.
      It was indeed the domains.txt file not having the absolute path. Error checking the file open made that clear. Guess I did not have enough coffee yesterday. Thanks again