NCPA Receiving error Plugin
Posted: Mon Oct 04, 2021 1:12 pm
Hello,
We're getting an error/Warning message in Nagios XI when executing a custom plugin within NCPA. The plugin/powershell script works fine. We were using it on nsclient with no issues. We recently changed the check over to NCPA. When testing the check, we're getting the warning - C:\Program Files (x86)\Nagios\NCPA\plugins\check_file_age.ps1 : Cannot process
argument transformation on parameter 'minutes'. Cannot convert value "120$" to
type "System.Int32". Error: "Input string was not in a correct format."
+ CategoryInfo : InvalidData: (:) [check_file_age.ps1], ParentCon
tainsErrorRecordException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,check_file_
age.ps1
When using the run check command, we getting the
[[email protected] ~]$ /usr/local/nagios/libexec/check_ncpa.py -H ******* -t '*******' -M 'plugins/check_file_age.ps1' -q 'args=\\******\Backup_K\ABSPRD\*********$*********\******\LOG\,args=120'
OK - Most recent file was touched 10/4/2021 1:40:15 PM
It's working, but but Still is showing up as Warning
We're getting an error/Warning message in Nagios XI when executing a custom plugin within NCPA. The plugin/powershell script works fine. We were using it on nsclient with no issues. We recently changed the check over to NCPA. When testing the check, we're getting the warning - C:\Program Files (x86)\Nagios\NCPA\plugins\check_file_age.ps1 : Cannot process
argument transformation on parameter 'minutes'. Cannot convert value "120$" to
type "System.Int32". Error: "Input string was not in a correct format."
+ CategoryInfo : InvalidData: (:) [check_file_age.ps1], ParentCon
tainsErrorRecordException
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,check_file_
age.ps1
When using the run check command, we getting the
[[email protected] ~]$ /usr/local/nagios/libexec/check_ncpa.py -H ******* -t '*******' -M 'plugins/check_file_age.ps1' -q 'args=\\******\Backup_K\ABSPRD\*********$*********\******\LOG\,args=120'
OK - Most recent file was touched 10/4/2021 1:40:15 PM
It's working, but but Still is showing up as Warning