Okay. I have included the numeric field. Here is the query
SELECT count(“term”) FROM “autogen”.“solutionSearchStats” WHERE time >= 1593973800000ms and time <= 1594405799000ms GROUP BY “searchTerm”
And attached is the dashboard.
Okay. I have included the numeric field. Here is the query
SELECT count(“term”) FROM “autogen”.“solutionSearchStats” WHERE time >= 1593973800000ms and time <= 1594405799000ms GROUP BY “searchTerm”
And attached is the dashboard.
Looks good, but in this case, is “term” the name of the Count field/column?
I used this, is rather new and fantastic Build a panel plugin | Grafana Plugin Tools
@raulsperoni Yes, “term” is the name of the value field (in influx jargon) and also the count field.
“searchTerm” is the tag.
ok, i’m running out of ideas, mainly because I’m not familiar with influx. But I don’t think that timeSeries is right for this.
Okay. Thanks for the suggestions.
But I have an sql server data source now which has the following table (SolutionSearchInsights) structure:-
Id SearchTerm DateTime SearchCount
1 | <10 Employees | 2020-06-29 00:00:00.000 | 2 |
---|---|---|---|
2 | 10 Employees | 2020-06-29 00:00:00.000 | 1 |
3 | 1024887 | 2020-07-03 00:00:00.000 | 2 |
4 | 562566 | 2020-06-10 00:00:00.000 | 1 |
5 | accident | 2020-06-10 00:00:00.000 | 1 |
6 | AD&D | 2020-06-09 00:00:00.000 | 2 |
7 | AD&D | 2020-06-10 00:00:00.000 | 1 |
I am using the following query:-
SELECT DateTime as time, SearchTerm as term, count(SearchTerm) as Count FROM SolutionSearchInsights GROUP BY DateTime, SearchTerm
In the options I have set the value for Count field as Count and Tags/Words Field value as SearchTerm
Even with this kind of data the panel is not showing any data. Could you please review?
Grafana mandates that in the result set of every query, time column must be returned. But as per the data you have shown there is no time column. Do you think this is causing the problem?
I will try some other datasource when I have time. But yes that could be. In my case if I go to the query inspector, the Data tab, y only get two columns: one for the words, the other for the number of words.
In this version of grafana you also have a “Transform” tab next to the “Query” tab. Maybe for testing purposes you can try transforming your data to take this two columns shape and see what happens.
Thanks for all the help @raulsperoni. Much appreciated.
I finally got the word cloud working for SQL server data source that I mentioned in the earlier comment.
I will try the transform option and certainly post if I am able to solve the issue I am facing with Influx DB.
Great! What did you change?
Used this query:- SELECT SearchTerm as term, count(SearchTerm) as Count FROM SolutionSearchInsights GROUP BY SearchTerm ORDER BY Count DESC
In the display options set the Count field as Count and Tags/Words Field as term
@raulsperoni - word cloud is now working with influxDB data source. Here are the changes needed:-
Time column is always needed if the format of the query for the panel is time series. If we do not want the time column we should first change the format of the query to Table rather than time series.
Applied a “Organize Fields” transformation and hid the time field.
In the Display Options for the panel set the count field as Count and Tags/Words Field as searchTerm
Thank you @raulsperoni for suggesting “Transform” option.
@raulsperoni This is a great plugin!
One thing that I feel would significantly enhance it is the ability to remove/exclude certain words such as stop words. Perhaps that feature already exists and I am missing it. Any thoughts?
Thank you! In my case I’m doing that in elasticsearch. I guess it makes sense because data and metrics will be consistent throughout grafana panels in a dashboard. But, it wouldn’t harm to have a denylist of words in the panel options… maybe you can open an issue in github?
It works out of the box with Influx too, just remove the GROUP BY time filter in the default Influx query editor.
SELECT “your_value” FROM “your_measurement” AND $timeFilter GROUP BY “your_tag”
I tried with Grafana 5.2.0 and facing some initialisation issues.
Fetch error:
404 Not Found
Instantiating https://xyzhost.domain/public/app/plugins/panel/magnesium-wordcloud-panel/module
Loading app/plugins/panel/magnesium-wordcloud-panel/module
Please suggest if any alternative to install the plugin in Grafana 5.2.0.