oliver1
(mo)
November 25, 2021, 2:28pm
1
hi folks
i use Python 3.5.3
When i execute the script ./check:_sql i got the error SyntaxError : invalid syntax as you can see below. I tried to run the script with ‘–hostname=$HOSTADDRESS$’ nothing change.
i dont see what i forgot to get this error
lib/nagios/plugins# ./check_sql --hostname '$HOSTADDRESS$' --dbms 'oracle' --name 'bobo' --user 'testbobo' --password 'ABCDEFG_123456
333' --port '1521'
File "./check_sql", line 31
MP_INF: Tuple[float, float] = (float('-inf'), float('+inf'))
^
SyntaxError: invalid syntax
Hello oliver1,
which version of the python module cx_Oracle are you using?
Also, in your command example, I noticed that you are missing the Query/Statement
OMD[SITE]:~$ ./lib/nagios/plugins/check_sql --hostname '$HOSTADDRESS$' --dbms 'oracle' --name 'bobo' --user 'testbobo' --password 'ABCDEFG_123456333' --port '1521'
usage: check_sql [-h] [-v] [--debug] [-m] [-o] [-i CSV] [-d {postgres,mysql,mssql,oracle,db2}] [-H HOST] [-P PORT] [-w RANGE] [-c RANGE] [-t TEXT] -n NAME -u USER -p
PASSWORD
SQL-Statement|Procedure [SQL-Statement|Procedure ...]
check_sql: error: the following arguments are required: SQL-Statement|Procedure
When I add it, i am getting informed to install cx_Oracle .
The python3 version shipped with cmk seems to be 3.8.7 currently.
system
(system)
Closed
November 28, 2022, 2:18pm
3
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.