Page 1 of 1

Monitor number of files

Posted: Tue Sep 10, 2013 7:53 am
by amitdaniel
Hi ,

i need your help with monitoring number of files on remote server ( it's mean that i must have the " -H " function)
I found this plugin called "check_files.pl"

and when i tried to run this like that :" ./check_files.pl -F -D /etc '*.*' -w 1 -c 3 -H 10.0.51.51 "

i get this error : UNKNOWN ERROR - execution of ssh -o BatchMode=yes -o ConnectTimeout=30 10.0.51.51

but when i check on local directory i succeed to monitor.

someone can help me with that ? or maybe give me another plugin ?


Thanks !!!

Re: Monitor number of files

Posted: Tue Sep 10, 2013 10:37 am
by abrist
These types of checks are usually done through an agent if they need to be run against a remote system. Does the plugin include a -H option in its help?

Re: Monitor number of files

Posted: Tue Sep 10, 2013 10:37 am
by slansing
You can run it to a remote host if you use the SNMP version of that plugin, which would require additional setup steps. I'd also recommend running the following for the plugin's help output:

Code: Select all

./check_files.pl --help 
As Andy said you may need to install NRPE on the remote system then call it from the XI server locally to that server.

Re: Monitor number of files

Posted: Tue Sep 10, 2013 10:55 am
by gshergill
Hi amitdaniel,

The help output should show the following:

Code: Select all

-H, --hostaddress=<STR>
    This option followed by the IP address or the server name execute "ls"
    on the remote server with ssh. Beware the script must be run with an account
    that has its public key to the remote server.
Personally, I'd agree with abrist as well and recommend using NRPE, it's what I use for this check and it has no issues.

Code: Select all

/check_files.pl -D /var/log/openfire -F error.* -w 5 -c 10
Kind Regards,

Gary Shergill

Re: Monitor number of files

Posted: Tue Sep 10, 2013 2:10 pm
by abrist
amitdaniel,
Do you have an update?

Re: Monitor number of files

Posted: Wed Sep 11, 2013 12:07 am
by amitdaniel
yeah

it's working when i tried to add the -H option.
another plugins working on that server (i monitor storage , cpu , memory and more)

Re: Monitor number of files

Posted: Wed Sep 11, 2013 10:53 am
by lmiltchev
Marking it as "resolved".