Powershell script with first argument containing a space
Posted: Tue Oct 24, 2023 7:59 am
I have the following check:
/usr/local/nagios/libexec/check_ncpa.py -H thehost -t '' -P 5693 -M 'plugins/CheckClusterResourceGroupStatus.ps1' -a "'Cluster Group'"
But I get the following error
UNKNOWN - Resource group \'Cluster/Group\' not found
From what you can tell, the issue is that the argument contains a space and there is only one argument (Ive seen examples where there is two arguments and it works)
How can I fix this? I doubt its the script per say because it passes other non space arguments correctly.
/usr/local/nagios/libexec/check_ncpa.py -H thehost -t '' -P 5693 -M 'plugins/CheckClusterResourceGroupStatus.ps1' -a "'Cluster Group'"
But I get the following error
UNKNOWN - Resource group \'Cluster/Group\' not found
From what you can tell, the issue is that the argument contains a space and there is only one argument (Ive seen examples where there is two arguments and it works)
How can I fix this? I doubt its the script per say because it passes other non space arguments correctly.