rafal-szypulka / itm_exporter

ITM Exporter for Prometheus
MIT License
13 stars 2 forks source link

Issue to get data from customSQL Oracle RDB #3

Open romulolibralon opened 4 years ago

romulolibralon commented 4 years ago

Hi i need some help here, I did create a custom sql to get metrics from Oracle in ITM, but when i try get this data from itm_exporter, the return is null.

Captura de Tela 2020-07-17 às 10 48 23 AM

here is my config: - name: "KRZRDBCUSQ" datasets_uri: "/providers/itm.TEMS/datasources/TMSAgent.%25IBM.OracleAgentRDB/datasets" labels: ["ORIGINNODE", "STRVALUE1"] metrics: ["NUMVALUE1"] managed_system_group: "ger_prom_rdb"

itm_scrape_duration_seconds{group="KRZRDBCUSQ"} 2.117378146

rafal-szypulka commented 4 years ago

Start an exporter with -v option (verbose logging). You should see log entries starting with "ITM API REQUEST: <url>". Use the <url> with curl, ex. curl -u sysadmin:<password> <url> it should do the direct API request to ITM API and return json output. If you don't see metric values, then it is an ITM problem. If you see metrics values, please send me the json output.

romulolibralon commented 4 years ago

Hi,

[root@servername ~]# curl --max-time 20 -k --request GET --url 'http://:15200/ibm/tivoli/rest/providers/itm.TEMS/datasources/TMSAgent.%25IBM.OracleAgentRDB/datasets/MetricGroup.KRZRDBCUSQ/items?properties=all&param_Limit=1000&start=0&param_SourceToken=RZ:B7P-ger-sappdb22:RDB' --header 'authorization: Basic c3lzYWRtaW46cVZwb01NMmQ5NVNkZ1BB' --header 'content-type: application/json' {"items":[],"filteredRows":0,"identifier":"id","totalRows":0,"numRows":0} [root@servername ~]#

romulolibralon commented 4 years ago
image

in the same time

rafal-szypulka commented 4 years ago

ITM API does not provide these metrics, so there is nothing I could do on the exporter side. You may try to open the case with IBM in order to confirm that the mentioned curl request should return metric values. Did you try ITM Grafana plugin for this metric? Did it work?

romulolibralon commented 4 years ago

I can get these metrics, but I can only bring one value at a time due to the limitation of the plugin in this version, the new version of IBM APM would suit me, but the performance when I installed it was very bad. Anyway, Thanks for the help, I will close the issue.

rafal-szypulka commented 4 years ago

If you can get this metric via Grafana plugin, then it should work in exporter as well.. Maybe there is something I missed. I don't have an env to recreate it, so if you still would like to work on it, please do the following: in Grafana UI with Grafana APM plugin, create a simple panel that queries MetricGroup.KRZRDBCUSQ and can show metric value. Open developer tools->network tab and check the request to ITM API, it should start with /items. Send me the Request URL so we can compare what Grafana plugin does with request assembled by the exporter.

romulolibralon commented 4 years ago

`

GET  
scheme http
host
filename /api/datasources/proxy/2/datasources/TMSAgent.%25IBM.OracleAgentRDB/datasets/MetricGroup.KRZRDBCUSQ/items

  param_SourceToken | RZ:INST-hostname:RDB optimize | true properties | NUMVALUE1,WRITETIME,ORIGINNODE condition | SQLID = 'krz_waits' and STRVALUE1 contains 'WAITING db file sequential read' param_refId | 98229613606

`

romulolibralon commented 4 years ago

Hi, any idea ?