Help needed to check filesize..Facing issue while uisng check_myfilesize.pl
Posted: Thu Oct 30, 2025 9:26 am
Hi,
I'm using Nagios XI 2026R1, I'm trying to monitor the filesize of a remote server using check_ncpa.py and check_myfilesize.pl(placed on client/remote server) but facing the below issue.
(Usage) : check_myfilesize.pl Filename critical_size warning_size
While trying from Nagios XI as below
./testncpa.py -H HOSTNAME -t TOKEN -M plugins/check_myfilesize.pl -a "/userdata/datastore/lib/config/datastore_007/msgs.db 10000000000 10000000000 "
error is as below which is wrong (In my opinion, it is not taking -a as one argument)
Argument "datastore" isn't numeric in numeric gt (>) at /usr/local/ncpa/plugins/check_myfilesize.pl line 37.
Critical: Current file size is 4096bytes
I'm able to use the plugin locally and it's giving me correct data
./check_myfilesize.pl /userdata/datastore/lib/config/datastore_007/msgs.db 10000000000 100000000000
OK: Current file size is 6219264bytes
Is anyone can help me on this to resolve this or any suggestions to use different plugin for this use case?
Thank You
I'm using Nagios XI 2026R1, I'm trying to monitor the filesize of a remote server using check_ncpa.py and check_myfilesize.pl(placed on client/remote server) but facing the below issue.
(Usage) : check_myfilesize.pl Filename critical_size warning_size
While trying from Nagios XI as below
./testncpa.py -H HOSTNAME -t TOKEN -M plugins/check_myfilesize.pl -a "/userdata/datastore/lib/config/datastore_007/msgs.db 10000000000 10000000000 "
error is as below which is wrong (In my opinion, it is not taking -a as one argument)
Argument "datastore" isn't numeric in numeric gt (>) at /usr/local/ncpa/plugins/check_myfilesize.pl line 37.
Critical: Current file size is 4096bytes
I'm able to use the plugin locally and it's giving me correct data
./check_myfilesize.pl /userdata/datastore/lib/config/datastore_007/msgs.db 10000000000 100000000000
OK: Current file size is 6219264bytes
Is anyone can help me on this to resolve this or any suggestions to use different plugin for this use case?
Thank You