Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: undefined (reading 'split') queryStr #38

Open
Laatem opened this issue Feb 21, 2022 · 0 comments
Open

TypeError: undefined (reading 'split') queryStr #38

Laatem opened this issue Feb 21, 2022 · 0 comments

Comments

@Laatem
Copy link

Laatem commented Feb 21, 2022

When I try to export my panel with InfluxDB datasource, I got this error from the grafana-data-exporter

C:\Users\user\Downloads\Nouveau dossier\grafana-data-exporter-0.5.1\dist\server.js:58892
this._queryParts = queryStr.split(INFLUX_QUERY_TIME_REGEX);
^

TypeError: Cannot read properties of undefined (reading 'split')
at new InfluxdbMetric (C:\Users\user\Downloads\Nouveau dossier\grafana-data-exporter-0.5.1\dist\server.js:58892:37)
at metricFactory (C:\Users\user\Downloads\Nouveau dossier\grafana-data-exporter-0.5.1\dist\server.js:58833:16)
at Metric.get metricQuery [as metricQuery] (C:\Users\user\Downloads\Nouveau dossier\grafana-data-exporter-0.5.1\dist\server.js:58855:33)
at Object. (C:\Users\user\Downloads\Nouveau dossier\grafana-data-exporter-0.5.1\dist\server.js:32426:32)
at Generator.next ()
at C:\Users\user\Downloads\Nouveau dossier\grafana-data-exporter-0.5.1\dist\server.js:32379:71
at new Promise ()
at __awaiter (C:\Users\user\Downloads\Nouveau dossier\grafana-data-exporter-0.5.1\dist\server.js:32375:12)
at Object.queryByMetric (C:\Users\user\Downloads\Nouveau dossier\grafana-data-exporter-0.5.1\dist\server.js:32413:12)
at Exporter. (C:\Users\user\Downloads\Nouveau dossier\grafana-data-exporter-0.5.1\dist\server.js:58678:64)

But no error with the panel
image

So I checked the server.js file and did a little debug, I found out that this :

js var queryStr = datasource.params.q;

So basicly here, this script try to get the param "q" from the datasource.params, but my datasource look like this
params: { db: 'dataclient', epoch: 'ms' }, type: 'influxdb', datasourceId: 3
The param "q" is missing, I didn't look further, if anyone has a solution to this problem I would appreciate !

Grafana v7.0.0
InfluxDB v1.8.3
Grafana-data-exporter-panel v0.5.1
Grafana-data-exporter v0.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant