Grafana worldmap panel with Influxdb doesn't show points - influxdb

I installed Worldmap Panel for Grafana but I cannot display points on Worldmap Panel. I looked at
Grafana worldmap: table datasource
and other links but didn't find answer.
I tried to use countries.json :
Added screenshot
I don't have reputation 10 so I cannot add more than 2 links. I tried also create table : points,key=AL,name=Alabama,latitude=32.7990 longitude=-86.8073
and in Worldmap selected for Location Data : table, for Table Label Field : points but still cannot see points.
Could you please give an idea for any possible solutions : countries, states, geohash, json, jsonp or table to be able to see points for Worldmap Panel?
Thank you

The first thing I recognize with your table data is, that you provide the coordinates as latitude,longitude but you need to provide them as geohash.
As you are asking for any possible solution I am providing you my solution with influxdb:
1) Insert into influxdb:
curl -i -XPOST 'http://localhost:8086/write?db=mydb' --data-binary 'worldmap_test,host=server01,geohash=gbsuv7z value=1'
2) Set datasource in grafana to your influxdb database
3) Now in the worldmap panel set the created datasouce and use the following metric:

After some experimenting, I figured out that Worldmap can match country codes in Influx Db.
Choose the country code tag in the group by.
Alias it with $tag_tagname where tagname is the country code tag name.
Choose Format as Time Series
On the Worldmap tab, choose Location Data -> Countries

Related

How to generate a distribution based bar chart on row_numbers

I have a SQL query that acts as a data source in my tableau desktop:
SELECT
row_number() over (order by sales) as rn,
article_number,
country,
SUM(sold_items) as si,
SUM(sales) as sales
FROM data.sales
WHERE sales.order_date between '2021-01-01' and '2021-12-31'
GROUP BY 2, 3
On tableau I dragged rn to column and sales to row to generate a bar chart. The following is the output:
I want to convert this into a 0-100% distribution chart so that I can get the following result:
How can I achieve this? Also, I want the user to filter by country level so even if the # of records increase or decrease, the distribution should always be consistent with the filtered data.
You can do this with nested table calcs.
For example, the following uses the Superstore sample data set, and then first computes a running total of SUM(Sales) per day, then converts that to a percent of total. Notice the edit table calc dialog box - applying two back to back calculations in this case.
The x-axis in this example is Order-Date, and in your question, the the x-axis is a percentage somehow - so its not exactly what you requested but still shows that table calcs are an easy way to do these types of operations.
Also, realize you can just connect to the sales table directly, the custom sql isn’t adding any value, and in fact can defeat query optimizations that Tableau normally makes.
The tableau help docs explains table calculations. Pay attention to the discussion on partitioning and addressing.

Google Spreadsheet chart not pulling information from table correctly

I have 2 tabs relating to the graph I'm working with. I have multiple graphs all working properly but one in particular. I have tried selecting different ranges to use for the data range, I have tried using different types of graphs. All the same I get the same results. The other graphs use the same information from the same table.
The graph's purpose is to compare the Highest Price and the Lowest Price per item. HERE is a link to a sample sheet with the same information as the original. Thank you for any help you can give!
values needs to be numeric not text string so in worst case a conversion is needed:
=ArrayFormula({INDEX(SPLIT(F4:F13, " "),,1), INDEX(SPLIT(G4:G13, " "),,1)})
and then you can plot your chart...

Create a report from google sheets

I have a Google Sheets file I use to enter data on different properties.
Each row in this file represents a single property.
If a certain property is of interest, I would like generate a report for it.
I need a functionality that will extract all data fields from a single row, and insert them in a new file (google sheets or preferably a Google Docs file) with a pre built format that would present the data nicely like a report.
Thanking you in advance
Avi
Here is a very preliminary answer, to see if this is the right direction.
See my sample sheet.
This lets you select, in C3, which address you want a report on. The fields shown in green change as you select a different address. All of the report fields could be modified like this - you just need to point to which column in the Properties database contains the values.
Is this roughly what you were looking to achieve?

Using a field from influxdb as the title / label for a point on a grafana dashboard

As the title suggests, I have a Grafana 'graph' that I populate with points from InfluxDB. The elements of the time series have two fields: 'rate' and 'source'. The graph is time on the x-axis of course, and 'rate' on the y-axis. I'd like to see 'source' when I hover over a point. Is this possible with Grafana / Infux?`
Unless I've misunderstood your question, you should be able to use aliasByNode to achieve this.
Click on the metric editor, and you should be able to add it like in the example.
Here's the example

Grafana dynamically display new hosts added by collectd

How to get grafana to dynamically add graphs for newly added hosts? For example, I have grafana chart to display load average for existing hosts. When I add a new host, the collectd will send the new host metrics to influxdb. But every time I have to manually add one more graph in grafana which is not desired? Is there a way to get grafana automatically plot the new host metrics without changing grafana?
You have to make use of the Grafana HTTP api and update your dashboard by adding the new graph that you want. This practically means that you have to:
use the api to take the json of the dashboard
handle this data and add your extra code for the new panel that you want to add
use the api again to update the dashboard
The hierarchy is simple: a dashboard has rows and rows have panels. Probably you will have to add some json code inside panels. Go check your json file and all these will make sense to you...
You can use regexp patterns in InfluxDB 0.8 (see also the 0.9 equivalent docs) to match all your newly added hosts. InfluxDB regexps use the Golang syntax.
For example, to match all series starting with stats.cpuNUMBER:
series: /^stats\.cpu\d+/
select: avg(load)
However this way you won't get one new plot for each newly added host, but a line for every host in the same plot.
You have to add regex in your select clause.
SELECT mean(value) FROM /logstash.*.requests.count/ WHERE $timeFilter
GROUP BY time($interval)
Above script will plot each series matching above regex automatically for all hosts without changing the grafana.
logstash.ABC1.requests.count
logstash.ABC2.requests.count
logstash.ABC3.requests.count
When ABC4 host is added and it is shipped correctly, new graph will be plotted automatically.

Resources