algenty / grafana-flowcharting

Flowcharting, plugin for Grafana to create complexe visio's draws style like technical architectures, floorplan, diagrams, hierarchical schema based on draw.io
Apache License 2.0
972 stars 148 forks source link

Zabbix Datasource Mapping Metrics "undefined", could not save. #283

Open tuanld89 opened 3 years ago

tuanld89 commented 3 years ago

Hi, I’m trying to use flowcharting 0.9.0 with Zabbix Datasource in Grafana 7.5.1 . But when I map Metrics I see Metrics and the Column field in the Mapping section, but the metrics only options are "undefined". flowchart I can select undefined, and select the Column. It works while Im editing, but once I click save or apply all my changes get deleted, Im assuming this issue is related to the undefined in the metric. Is there any way fix this issue?

image

Ryuras2012 commented 3 years ago

Hi ! I also had problems using Flowcharting 0.9.0 with Zabbix Datasource in Grafana 7.4.5. When I try to display on the map in Flowcharting problems on some object through the Data Source "Zabbix" Query Mode "Problems". Flowcharting I choose to select only the "undefined" option and after I click save or apply, all my changes are deleted. Is it possible to fix this problem? Zabbix problems

neil-yen commented 3 years ago

I have the same problem. It can work in edit-mode. But there is no modification after APPLY.

Grafana version-v7.4.5 Flowcharting version - 0.9.0 Datasource - Zabbix

aluiss commented 3 years ago

I have the same problem. It can work in edit-mode. But there is no modification after APPLY.

Grafana version-v7.4.5 Flowcharting version - 0.9.0 Datasource - Zabbix

I have the same problem. If i set up only 1 rule, i haven't the problem, but, when i setup more than one rule, the problem occur. Any one encounter a solution??

GustavoStingelin commented 3 years ago

I have the same problem, in the edit preview it works, but after applying the changes it doesn't work...

image

tuanld89 commented 3 years ago

Hi,

I solved this problem by choose option to disable data alignment, please try it:

image
GustavoStingelin commented 3 years ago

Hi,

I solved this problem by choose option to disable data alignment, please try it:

image

@tuanld89 I tried this, it only worked in edit mode.

GustavoStingelin commented 3 years ago

I'm trying in alpha 1.0.0, but I also have a problem. In metrics I tweeted with and without alias, same problem.

image

aluiss commented 3 years ago

I has enabled the "Disabled data alignment" and has work!

Thanks a lot!

GustavoStingelin commented 3 years ago

I has enabled the "Disabled data alignment" and has work!

Thanks a lot!

Please give me a screenshot or JSON config of this, it doesn’t work here.

aluiss commented 3 years ago

I has enabled the "Disabled data alignment" and has work! Thanks a lot!

Please give me a screenshot or JSON config of this, it doesn’t work here.

GRAFANA

aluiss commented 3 years ago

After configuring some items the problem recurs. But, when i refresh de page, it works.

This is kinda of crazy!

anilsagar commented 3 years ago

Same issue on influxDB as datasource

juge2 commented 3 years ago

For me it depends on the selected time range: <=6h works, when it is more I see the same "undefined" in "Apply to metrics" and values are not shown anymore for existing rules. "Disabled data alignment" did not change anything for me.

FlowCharting 0.9.1 / Grafana v7.5.4 / Zabbix data source 4.1.4

takhyun-ko commented 3 years ago

I have the Similar problem.

I performed transformations such as "Merge" and "Group By". But I can only select "undefined" on "apply to metrics" menu of flowcharting.

It seems to work well when I select "undefined" and procced. But, When reloading the page after saving, it encounters "Blank" on "apply to metrics" field and does not work.

If you know a solution to this issue, please share it.

My Grafana v7.3.7 (1e261642f4) Flowcharting version - 0.9.0 Datasource - Json API

xkilian commented 3 years ago

It seems any type of backend transformation is no longer compatible with the new dataframe formats. Someone will need to open the flowcharting code and make it compatible. As @algenty is not currently available to work on it, someone will need to open a PR for this.

rodrigocastrillon commented 3 years ago

I was desperate trying to make this plugin work. Then I found this issue open. By reading your comments I was able to make my map work. This is exactly what I did:

  1. Started a new dashboard
  2. Added the panel
  3. Set timeframe as 30min
  4. Pasted preexisting map inside panel configuration
  5. Added Zabbix metrics one by one, ticking the "disable data alignment"
  6. When adding new rules, the fields to input the metric names will be correct.

dashboard

ternium1 commented 2 years ago

I think I found a workaround: I'm using zabbix 5.4 with the latest version of the zabbix plugin & flowcharting alpha 1.0.0b.

Firstly, the metric should not have any special characters (apparently it is working for spaces but avoid : , ' [ ] . { } = + / \ * , etc.) because it interferes with the regex (we can see that in the browser console. it is possible to change the name by using the setalias function while modifying the query. Also, do not set any special options in the query options (everything is set to auto for me). I think that the time range helps too. Though, I don't think that 'Disable data alignment really helps, at least I'm unsure: it is only set for one metric and everything is working fine. EDIT: Only setting one metric with disable data alignment is fine (but it is necessary). underscores are working in the aliases. Time range set to 3 hours is fine.

zeduperes commented 2 years ago

I have the same issue:

Grafana 8.3.3 FlowCharting 0.9.1 Zabbix DataSource 4.2.2

tilsonnoc commented 2 years ago

Has there been any update on this issues? I am having the same problem

algenty commented 2 years ago

I'll try that on 1.0.0c, i need to install zabbix withdocker. see you soon

arthurbruni commented 2 years ago

Eu estava desesperado tentando fazer esse plugin funcionar. Então eu encontrei este problema aberto. Ao ler seus comentários, consegui fazer meu mapa funcionar. Isto é exatamente o que eu fiz:

  1. Iniciou um novo painel
  2. Adicionado o painel
  3. Definir prazo como 30min
  4. Mapa preexistente colado dentro da configuração do painel
  5. Adicionadas métricas do Zabbix uma a uma, marcando a opção "desativar alinhamento de dados"
  6. Ao adicionar novas regras, os campos para inserir os nomes das métricas estarão corretos.

painel de controle

Coming to thank, here it worked!

algenty commented 2 years ago

@arthurbruni, thx for your help

tilsonnoc commented 2 years ago

How do I run the latest ver from a docker container? I use bellow in the compose file but how would you specify using ver 1.0.0c as it only pulls ver 0.9.1

environment:

alakond commented 2 years ago

Hi! Zabbix 5.4.12 grafana - v8.5.2 (90701be19c) FlowCharting 1.0.0a

Sorry for YouTube, but this is the only way I can explain what is happening: https://youtu.be/mNzht51HT34

I've tried stripping spaces and underscores from hostnames and item names, but that didn't help. What else can you try?

algenty commented 2 years ago

Hi, After migration, i will try to reproduce it. be patient

tilsonnoc commented 2 years ago

Is there any way to get FlowCharting 1.0.0c installed on the Grafana cloud instance?

algenty commented 2 years ago

not yet, 1.0.0X style unstable

ftoledo commented 1 year ago

I has enabled the "Disabled data alignment" and has work! Thanks a lot!

Please give me a screenshot or JSON config of this, it doesn’t work here.

It does not work for me either (grafana 9.3.2)

sirasao2 commented 1 year ago

Same issue with me. I am on Grafana 9.1.2. I did a "rows to fields" transform for Snowflake data however "apply to metrics" comes as undefined, and even after I select so manually and save and apply, the changes do not stay.

narjessel commented 1 year ago

I have the same issue, I tried all the solutions above but nothing worked.

ftoledo commented 1 year ago

any news for this issue?

romgille commented 1 year ago

Hi @algenty ! We really need this feature to work 😉 Can we help you in any way ? Thanks for your work !

HorselessName commented 1 year ago

I am having the same problem.

When using multiple Metrics for some weird reason, it does not allow me to select anything. If using multiple Items in one metric, it goes "Undefined"...

HorselessName commented 1 year ago

So, I have good news and bad news guys.

The good news is: I fixed the problem. I can now make fully customized diagrams and send, individually, metrics to each shape. I discovered how to make this plugin work using Zabbix Data Source after many tries, and comparing working data from other Data-Sources (Like Graphite).

The bad news: It's a nasty solution. Looks a lot like a cheap work-around and even tho I was able to fix it, I did not discover the origin of this problem => Do not know if the problem resides in Grafana itself, in Zabbix Data Source Plugin or in this plugin right here called Flowcharting.

Anyways, here is how I did it:

Some Conditions must be met first:

  1. Each Metric have to be unique and have a unique ALIAS.
  2. Each Metric must have it's own table, with only two columns: Time, AliasName.
  3. There must NOT BE a single SPACE nor a Special Caracter in ANY fields - Group, Host and Item.

So, to achieve this, on your metrics, do - And remember, all strings here are UNIQUE and Individual:

Metric A:

Group => $group Host => $host <<<<< ----- THIS IS IMPORTANT - It must NOT resolve to multiple HOSTs (Single Host only!) Item Tag => $tag Item => ping_latencia_cirion_avg <<<<< ----- THIS IS IMPORTANT - It must be UNIQUE and HAVE NO SPECIAL CARACTERS NOR SPACES.

Functions (This is ALSO important and will not work if you don't do it - This is used for setting a ALIAS which is required by Flowcharint Plugin and separating each metric into it's own table.):

groupBy(15m, last); setAlias($__zbx_item);

Metric B:

Group => $group Host => $host <<<<< ----- THIS IS IMPORTANT - It must NOT resolve to multiple HOSTs (Single Host only!) Item Tag => $tag Item => ping_latencia_cloudflare_avg <<<<< ----- THIS IS IMPORTANT - It must be UNIQUE and HAVE NO SPECIAL CARACTERS NOR SPACES.

Functions (This is ALSO important and will not work if you don't do it - This is used for setting a ALIAS which is required by Flowcharint Plugin and separating each metric into it's own table.):

groupBy(16m, last); setAlias($zbxitem); ____^^^___ => Notice that I changed from 15m to 16m? If you use the same timestamp, the metrics will be merged into one table only - So they all must have different timestamps.

And, finally, you must set the option "Disable data alignment" in all your metrics. Here is a image below for easier compreension:

-- Metrics Example image

-- Flowcharting Options rules image

-- Diagram Itself on Grafana Panel image

-- Condition 2 Met Example image

I know it's a ugly solution and you have to change a couple of things, but, it's the only thing we can do while we wait for a fix.

Ryuras2012 commented 1 year ago

Unfortunately, it looks like this project is dead. The mountain was wonderful for Grafana. It is very sad that this plugin is not being developed.

ftoledo commented 1 year ago

Unfortunately, it looks like this project is dead. The mountain was wonderful for Grafana. It is very sad that this plugin is not being developed.

very sad, Is there any other plugin you can recommend? In principle I just need to put a background image and put some icons or text on it, which changes color depending on some trigger.

ToshinoKyoko commented 1 year ago

My solution how to get all metrics in one table and one datasource

Setting source image image

And how mapping work now. image