Closed tiankola closed 3 years ago
Check by running manually first. What is in the logs? What is in the files in the out directory?
Groeten, Ronald Rood
Op 21 dec. 2020 om 17:20 heeft kola notifications@github.com het volgende geschreven:
I've configured it, but I can't get the data. I don't know what's wrong
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
They all look normal, and only the state value of ZBx itself is output. There is no data for the table space. I don't know where I configured it wrong
Which statuses do you get, for which items?
If you read etc/zbxdb_checks/db2/ you will find the queries I prepared for db2. It could be the tablespaces queries are not there. Currently I have no access to a db2 installation so I might need a bit of help to be able to help you by adding new queries.
Groeten, Ronald Rood
Op 22 dec. 2020 om 06:36 heeft kola notifications@github.com het volgende geschreven:
They all look normal, and only the state value of ZBx itself is output. There is no data for the table space. I don't know where I configured it wrong
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
log: 2020-12-22 20:16:56,640main30_start python-3.7.1 zbxdb-3.08 pid=29561 Connecting ... 2020-12-22 20:16:56,641main30_zbxdb found db_type=db2, driver ibm_db; checking for driver 2020-12-22 20:16:57,961_dbconnections.db240<module 'ibm_db' from '/usr/local/python3/lib/python3.7/site-packages/ibm_db-3.0.2-py3.7-linux-x86_64.egg/ibm_db.cpython-37m-x86_64-linux-gnu.so'> 2020-12-22 20:16:57,962_dbconnections.db240['ATTR_CASE', 'CASE_LOWER', 'CASE_NATURAL', 'CASE_UPPER', 'IBM_DBClientInfo', 'IBM_DBConnection', 'IBM_DBServerInfo', 'IBM_DBStatement', 'PARAM_FILE', 'QUOTED_LITERAL_REPLACEMENT_OFF', 'QUOTED_LITERAL_REPLACEMENT_ON', 'SQL_API_SQLROWCOUNT', 'SQL_ATTR_AUTOCOMMIT', 'SQL_ATTR_CURRENT_SCHEMA', 'SQL_ATTR_CURSOR_TYPE', 'SQL_ATTR_INFO_ACCTSTR', 'SQL_ATTR_INFO_APPLNAME', 'SQL_ATTR_INFO_PROGRAMNAME', 'SQL_ATTR_INFO_USERID', 'SQL_ATTR_INFO_WRKSTNNAME', 'SQL_ATTR_QUERY_TIMEOUT', 'SQL_ATTR_ROWCOUNT_PREFETCH', 'SQL_ATTR_TRUSTED_CONTEXT_PASSWORD', 'SQL_ATTR_TRUSTED_CONTEXT_USERID', 'SQL_ATTR_USE_TRUSTED_CONTEXT', 'SQL_AUTOCOMMIT_OFF', 'SQL_AUTOCOMMIT_ON', 'SQL_BIGINT', 'SQL_BINARY', 'SQL_BIT', 'SQL_BLOB', 'SQL_BLOB_LOCATOR', 'SQL_CHAR', 'SQL_CLOB', 'SQL_CLOB_LOCATOR', 'SQL_CURSOR_DYNAMIC', 'SQL_CURSOR_FORWARD_ONLY', 'SQL_CURSOR_KEYSET_DRIVEN', 'SQL_CURSOR_STATIC', 'SQL_DBCLOB', 'SQL_DBCLOB_LOCATOR', 'SQL_DBMS_NAME', 'SQL_DBMS_VER', 'SQL_DECFLOAT', 'SQL_DECIMAL', 'SQL_DOUBLE', 'SQL_FALSE', 'SQL_FLOAT', 'SQL_GRAPHIC', 'SQL_INDEX_CLUSTERED', 'SQL_INDEX_OTHER', 'SQL_INTEGER', 'SQL_LONGVARBINARY', 'SQL_LONGVARCHAR', 'SQL_LONGVARGRAPHIC', 'SQL_NUMERIC', 'SQL_PARAM_INPUT', 'SQL_PARAM_INPUT_OUTPUT', 'SQL_PARAM_OUTPUT', 'SQL_REAL', 'SQL_ROWCOUNT_PREFETCH_OFF', 'SQL_ROWCOUNT_PREFETCH_ON', 'SQL_SMALLINT', 'SQL_TABLE_STAT', 'SQL_TINYINT', 'SQL_TRUE', 'SQL_TYPE_DATE', 'SQL_TYPE_TIME', 'SQL_TYPE_TIMESTAMP', 'SQL_VARBINARY', 'SQL_VARCHAR', 'SQL_VARGRAPHIC', 'SQL_WCHAR', 'SQL_WLONGVARCHAR', 'SQL_WVARCHAR', 'SQL_XML', 'USE_WCHAR', 'WCHAR_NO', 'WCHAR_YES', 'doc', 'file', 'loader', 'name', 'package', 'spec', 'version', 'active', 'autocommit', 'bind_param', 'callproc', 'check_function_support', 'client_info', 'close', 'column_privileges', 'columns', 'commit', 'conn_error', 'conn_errormsg', 'conn_warn', 'connect', 'createdb', 'createdbNX', 'cursor_type', 'dropdb', 'exec_immediate', 'execute', 'execute_many', 'fetch_assoc', 'fetch_both', 'fetch_row', 'fetch_tuple', 'field_display_size', 'field_name', 'field_nullable', 'field_num', 'field_precision', 'field_scale', 'field_type', 'field_width', 'foreign_keys', 'free_result', 'free_stmt', 'get_db_info', 'get_last_serial_value', 'get_num_result', 'get_option', 'next_result', 'num_fields', 'num_rows', 'pconnect', 'prepare', 'primary_keys', 'procedure_columns', 'procedures', 'recreatedb', 'result', 'rollback', 'server_info', 'set_option', 'special_columns', 'statistics', 'stmt_error', 'stmt_errormsg', 'stmt_warn', 'table_privileges', 'tables']
out files: $ cat zbxdb.node2.zbx node2 "zbxdb[uptime]" 1608640557 1140 node2 "zbxdb[opentime]" 1608640557 1139 node2 "zbxdb[query,test_1m,inst.uptime,status]" 1608640557 42S22 node2 "zbxdb[query,test_1m,inst.uptime,ela]" 1608640557 0.0022733980149496347 node2 "db[delta_scn]" 1608640557 310963 node2 "db[current_scn]" 1608640557 310963 node2 "zbxdb[query,test_1m,scn_lsn,status]" 1608640557 0 node2 "zbxdb[query,test_1m,scn_lsn,ela]" 1608640557 0.0028748550103046 node2 "zbxdb[query,test_1m,scn_lsn,fetch]" 1608640557 0.0003523350169416517 node2 "zbxdb[query,test_1m,,ela]" 1608640557 0.006205226993188262 node2 "zbxdb[query,,,ela]" 1608640557 0.007459704007487744 node2 "zbxdb[cpu,user]" 1608640557 0.21412399999999998 node2 "zbxdb[cpu,sys]" 1608640557 0.07036099999999999 node2 "zbxdb[mem,maxrss]" 1608640557 29184 node2 "zbxdb[connect,status]" 1608640557 0
So the connection is ok. Does this data become visible in latest data?
When I look in https://github.com/ikzelf/zbxdb/blob/master/etc/zbxdb_checks/db2/primary.10.cfg it looks a lot like tablespaces are discovered but there is no query to get the sizing info of them. The p_ts.lld query should cause tablespaces items to be generated in zabbix.
You can take the oracle queries as an example for what is intended. If you know a bit of sql, a bit of db2 and take the oracle p_ts from https://github.com/ikzelf/zbxdb/blob/master/etc/zbxdb_checks/oracle/primary.19.cfg as an example for the output format that is expected, you should be able to make that work.
Ofcourse I am willing to help but without access to a db2 database that is a bit hard.
Groeten, Ronald Rood
Op 22 dec. 2020 om 13:38 heeft kola notifications@github.com het volgende geschreven:
out files: $ cat zbxdb.node2.zbx node2 "zbxdb[uptime]" 1608640557 1140 node2 "zbxdb[opentime]" 1608640557 1139 node2 "zbxdb[query,test_1m,inst.uptime,status]" 1608640557 42S22 node2 "zbxdb[query,test_1m,inst.uptime,ela]" 1608640557 0.0022733980149496347 node2 "db[delta_scn]" 1608640557 310963 node2 "db[current_scn]" 1608640557 310963 node2 "zbxdb[query,test_1m,scn_lsn,status]" 1608640557 0 node2 "zbxdb[query,test_1m,scn_lsn,ela]" 1608640557 0.0028748550103046 node2 "zbxdb[query,test_1m,scn_lsn,fetch]" 1608640557 0.0003523350169416517 node2 "zbxdb[query,test_1m,,ela]" 1608640557 0.006205226993188262 node2 "zbxdb[query,,,ela]" 1608640557 0.007459704007487744 node2 "zbxdb[cpu,user]" 1608640557 0.21412399999999998 node2 "zbxdb[cpu,sys]" 1608640557 0.07036099999999999 node2 "zbxdb[mem,maxrss]" 1608640557 29184 node2 "zbxdb[connect,status]" 1608640557 0
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
ok,I'll try thanks
If you happen to have the ability to give me sql access to a database, I could help.
Groeten, Ronald Rood
Op 22 dec. 2020 om 15:29 heeft kola notifications@github.com het volgende geschreven:
ok,I'll try thanks
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Did you get this up?
No problem. I can collect data already. thanks
OK, glad to read that. Just in case you might want to push a few nice configurations for db2 ..... I am all open for that. It might also help others.
Yes, I'll upload it later
Hi,
thanks for your db2 contribution :-D I will see how I can merge the template and the queries since many items will be the same as are already in the existing template.
with kind regards, Ronald.
On 24 Mar 2021, at 15:05, kola @.***> wrote:
templates zbxdb db2.zip https://github.com/ikzelf/zbxdb/files/6197822/templates.zbxdb.db2.zip — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ikzelf/zbxdb/issues/61#issuecomment-805849556, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADZJBR24XE4XPVZGSWP4HDTFHWR7ANCNFSM4VENSMLA.
I've configured it, but I can't get the data. I don't know what's wrong