Dollar in argument
Posted: Fri Apr 21, 2017 5:16 am
Whatever combination I'm trying to make I'm unable to use a dollar in one of my arguments. I'm using "filter=start_type = 'auto'" and excluding the delayed services.
One of the problematic services is 'MSSQL$HPWJA'
So without escaping or double dollar:
With double dollar:
With double backslash and double dollar:
With single backslash and double dollar:
With double dollar in double quotes:
Not sure why the double dollar doesn't work as multiple posts suggest that is the solution? (such as https://support.nagios.com/forum/viewto ... =7&t=11763) Please advice how to handle this problem.
Willem
One of the problematic services is 'MSSQL$HPWJA'
So without escaping or double dollar:
Code: Select all
/usr/local/nagios/libexec/check_nrpe_v3 -2 -P 10240 -H hostname -t 30 -c check_service -a "filter=start_type = 'auto' and name not in ('Bonjour Service','clr_optimization_v4.0.30319_32','clr_optimization_v4.0.30319_64','DocAve 6 Report Service','DocAve 6 Media Service','gupdate','MSSQL$HPWJA','NetTcpPortSharing','RemoteRegistry','ShellHWDetection','sppsvc','stisvc','TBS','TrustedInstaller','wuauserv')"
CRITICAL: MSSQL$HPWJA=stopped (auto), delayed ()Code: Select all
/usr/local/nagios/libexec/check_nrpe_v3 -2 -P 10240 -H hostname -t 30 -c check_service -a "filter=start_type = 'auto' and name not in ('Bonjour Service','clr_optimization_v4.0.30319_32','clr_optimization_v4.0.30319_64','DocAve 6 Report Service','DocAve 6 Media Service','gupdate','MSSQL$$HPWJA','NetTcpPortSharing','RemoteRegistry','ShellHWDetection','sppsvc','stisvc','TBS','TrustedInstaller','wuauserv')"
CRITICAL: MSSQL$HPWJA=stopped (auto), delayed ()Code: Select all
/usr/local/nagios/libexec/check_nrpe_v3 -2 -P 10240 -H hostname -t 30 -c check_service -a "filter=start_type = 'auto' and name not in ('Bonjour Service','clr_optimization_v4.0.30319_32','clr_optimization_v4.0.30319_64','DocAve 6 Report Service','DocAve 6 Media Service','gupdate','MSSQL\\$$HPWJA','NetTcpPortSharing','RemoteRegistry','ShellHWDetection','sppsvc','stisvc','TBS','TrustedInstaller','wuauserv')"
CRITICAL: MSSQL$HPWJA=stopped (auto), delayed ()Code: Select all
/usr/local/nagios/libexec/check_nrpe_v3 -2 -P 10240 -H hostname -t 30 -c check_service -a "filter=start_type = 'auto' and name not in ('Bonjour Service','clr_optimization_v4.0.30319_32','clr_optimization_v4.0.30319_64','DocAve 6 Report Service','DocAve 6 Media Service','gupdate','MSSQL\$$HPWJA','NetTcpPortSharing','RemoteRegistry','ShellHWDetection','sppsvc','stisvc','TBS','TrustedInstaller','wuauserv')"
CRITICAL: MSSQL$HPWJA=stopped (auto), delayed ()Code: Select all
/usr/local/nagios/libexec/check_nrpe_v3 -2 -P 10240 -H hostname -t 30 -c check_service -a "filter=start_type = 'auto' and name not in ('Bonjour Service','clr_optimization_v4.0.30319_32','clr_optimization_v4.0.30319_64','DocAve 6 Report Service','DocAve 6 Media Service','gupdate','MSSQL"$$"HPWJA','NetTcpPortSharing','RemoteRegistry','ShellHWDetection','sppsvc','stisvc','TBS','TrustedInstaller','wuauserv')"
CRITICAL: MSSQL$HPWJA=stopped (auto), delayed ()Willem