Passing argument to Oracle check_xi_oraclequery command
Posted: Tue Mar 26, 2019 11:57 am
I am trying to use $ARG2$ feature to pass parameter to my query.
--connect 'host:1521/service' --username 'username' --password 'pwd' --mode sql --name="select max(round((total_mb - free_mb)/(total_mb)*100,0)) from sys.v_\$asm_diskgroup where name like '$ARG2$'" --warning 80 --critical 90
$ARG2$ is replaced with the value I provide when I run < run command> .
But $ARG2$ is not replaced with the value I am passing when query is executed from service.
Hence the result from the query is "UNKNOWN".
--connect 'host:1521/service' --username 'username' --password 'pwd' --mode sql --name="select max(round((total_mb - free_mb)/(total_mb)*100,0)) from sys.v_\$asm_diskgroup where name like '$ARG2$'" --warning 80 --critical 90
$ARG2$ is replaced with the value I provide when I run < run command> .
But $ARG2$ is not replaced with the value I am passing when query is executed from service.
Hence the result from the query is "UNKNOWN".