Documentum check

Hi,

Can Nagios check for files beginning with a particular name in a particular “Documentum” folder and report an error if number of files found is less than 1.

What plugin should be used for this?

Have attached an email which explains more clearly the requirement.

Thanks in advance

Hi there

I think check_fileage would be sufficient for your needs. It would even seem to be fine using a wildcard in the filename and will certainly complain if such a file is missing…

[root@localhost libexec]# ll test*.* -rwxr-xr-x 1 nagios nagios 519 Sep 22 11:28 test2.sh -rwxr-xr-x 1 nagios nagios 228 Sep 22 11:28 test3.sh -rwxr-xr-x 1 nagios nagios 367 Sep 22 11:28 test.bkp -rwxr-xr-x 1 nagios nagios 367 Sep 22 11:29 test.sh -rw-r--r-- 1 nagios nagios 7467 Sep 22 11:29 test.txt [root@localhost libexec]# ./check_file_age test*.* FILE_AGE OK: test2.sh is 5099845 seconds old and 519 bytes [root@localhost libexec]# ll missingfile*.* ls: missingfile*.*: No such file or directory [root@localhost libexec]# ./check_file_age missingfile*.* FILE_AGE CRITICAL: File not found - missingfile*.* [root@localhost libexec]#

HTH

/S

Thanks a lot buddy…However check_file_age is missing in checkcommands.cfg in our nagios server.

Yeah, you’ll need to install it and whatnot…

Sorry, that was like the worst reply ever… I was in a bad mood this morning :cry:
If you don’t have the check already, download it from nagiosexchange.org - you will/may/probably want to also edit the script and change the ‘default’ age settings to 0
If you are using it locally, define your check command object as something like check_file_exists - i.e.
[blockquote]# ‘check_file_exists’ command definition
define command{
command_name check_file_exists
command_line $USER1$/check_file_age $ARG1$
}[/blockquote]
Then you can use check_file_exists!filename in your service check.

This is a “local” check only, so of course if you are trying to check a file exists on a remote box you’ll have to install check_file_age on there instead (it’s perl) and configure NRPE or whatever as usual.

Thanks for the guidance.