Data Manipulation for Grafana | Use REST API, Data Source and Queries to manipulate your data

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 97

  • @volkovlabs
    @volkovlabs  Год назад +7

    One of our best videos thus far! Will you be using this plugin in your projects?

    • @ПашаБлагов-и1ъ
      @ПашаБлагов-и1ъ Год назад +1

      Добрый день! Если у Вас есть возможность сделать ролик ли хотя бы описать кратко здесь как поменять цвет темы на свой? редактирование файлов в папке /public/build/*.css не дает результата :((

    • @volkovlabs
      @volkovlabs  Год назад

      @@ПашаБлагов-и1ъ We have not experimented with changing themes yet in our project. I will check when I have time.
      --
      Mikhail

    • @ПашаБлагов-и1ъ
      @ПашаБлагов-и1ъ Год назад +1

      @@volkovlabs thanks:)

  • @roewan90
    @roewan90 Год назад +1

    Thank you so much for this tutorial video! I followed the tutorial but I used MSSQL instead of PostgreSQL and it worked! 😁

    • @volkovlabs
      @volkovlabs  Год назад

      Glad to hear that!

    • @ДаниилГригорьев-о6ы
      @ДаниилГригорьев-о6ы 9 месяцев назад

      @@volkovlabsPostgres does not work on plugin version 3.6. You can specify a valid or invalid query in custom code but the notification will be successful independently of the query. Valid query doesn’t executed too

  • @renobodyrenobody
    @renobodyrenobody Год назад +1

    Used it again today (forgot what I've done one month ago). Thanks a lot again.

  • @henroljeogutierrez1294
    @henroljeogutierrez1294 Год назад +2

    Very nice explanation and plugin too! ❤️ Thanks Volkov labs!
    Suggestion: For multiselect, add option that the value selections can be from a query datasource.

    • @volkovlabs
      @volkovlabs  Год назад +1

      Thank you. Could you please open an issue in the GitHub: github.com/volkovlabs/volkovlabs-form-panel

    • @AsuwiniP
      @AsuwiniP 10 месяцев назад +1

      @@volkovlabs , please add the values from the query data source, that would be very helpful

    • @volkovlabs
      @volkovlabs  10 месяцев назад

      @@AsuwiniP It's included in the latest releases: volkovlabs.io/blog/tags/data-manipulation/

  • @asifmohammed1001
    @asifmohammed1001 9 месяцев назад +1

    Dear Volkova, i am not able add Data Manipulation Visualization in the panel, i didn't not find, may be it is licencsed or i need Grafana Enterprise license to used it.

    • @volkovlabs
      @volkovlabs  9 месяцев назад

      Data Manipulation is an open-source plugins which can be installed for any Grafana instance: grafana.com/grafana/plugins/volkovlabs-form-panel/.
      Follow our videos and documentation: volkovlabs.io/plugins/volkovlabs-form-panel/

  • @pingzhang7443
    @pingzhang7443 Год назад +1

    This is another great plugin that really helps. Thank you for your great work.

    • @volkovlabs
      @volkovlabs  Год назад +1

      Thank you, Ping. I hope your project is doing great!

  • @douglasfugazi
    @douglasfugazi Год назад +1

    Thanks for this video, very helpful.
    Congratulations for the new milestone 🎉

    • @volkovlabs
      @volkovlabs  Год назад +2

      Glad you liked it! We just publish a blog post to accompany this video: volkovlabs.io/blog/form-panel-data-source-20230908/.
      We appreciate your support!

    • @douglasfugazi
      @douglasfugazi Год назад

      @@volkovlabs awesome, I will take a look on that. 👌

  • @naomiconsultancy9520
    @naomiconsultancy9520 9 месяцев назад +1

    Is there a way to indicate that a form element is required before the Submit button is enabled? I don't want the user to be able to Submit the form unless certain required form elements have values. can you share any example on that ? Thanks for video .

    • @volkovlabs
      @volkovlabs  8 месяцев назад

      This feature was added in v3.5.0: github.com/VolkovLabs/volkovlabs-form-panel/pull/324. We will provide examples in the upcoming blog.

  • @yuu-kun3461
    @yuu-kun3461 Год назад +2

    I was just playing with this a couple days ago! Thank you for the video.
    Can you please add rawSQL examples in your documentation? As of right now, rawSQL is only shown in a blog post, and lacks an example.
    I didn't realize the field worked with backticks and variables with ${} format, instead I used a rather ugly, yet working, concatenation chain😅

    • @volkovlabs
      @volkovlabs  Год назад +1

      We just released a new version 3.2.0/3.2.1 and will update documentation later this week with examples and schemas.

  • @sajallovey
    @sajallovey 11 месяцев назад +1

    @volkovlabs, This is an awesome plugin and I am using it for updating values. It would be great if you can show a video how we can make use of CSV while uploading data from input from user to update values. Many thanks

    • @volkovlabs
      @volkovlabs  11 месяцев назад

      Thank you. Could you please explain step by step: "Make use of CSV while uploading data from input from user to update value".

    • @sajallovey
      @sajallovey 11 месяцев назад +1

      @@volkovlabs I want to allow user to change multiple values using a csv file in which user will provide his values. Lets say there are multiple accounts with their budget value for different months.
      Now we take input from account owner to update their budget value for various months in one go using csv file. This feature will facilitate one account owner to change budget data who is responsible for various multiple accounts for various months. I am trying to achieve this but not successful on Grafana. However, it works fine for single account owner with single value for budget as well as month.

    • @volkovlabs
      @volkovlabs  11 месяцев назад

      @@sajallovey You can build Dynamic Forms using CSV Data Source with as many options and section as your want to create a data grid, if I understand correctly: volkovlabs.io/plugins/volkovlabs-form-panel/dynamic/

  • @xgodo-com
    @xgodo-com 11 месяцев назад +1

    Do you accept orders for custom plugin development?

    • @volkovlabs
      @volkovlabs  11 месяцев назад

      It depends on the plugin. We specialize on business use cases and don't create any kind of plugins.

    • @xgodo-com
      @xgodo-com 11 месяцев назад

      I am a business. I sell data to clients and deliver it in tables. I want to use grafana as a part of my data delivery system. However, the problem is grafana query editor is not suitable for everyday usage by non-tech person. What I need is to bring the grafana query builder from the editor to the main panel screen. I mostly operate tables. So my users need to be able to create custom queries to search for data that they are interested in among my entire dataset. I need a plugin that will bring the visual query builder to the panel main screen. I searched all the options that grafana offer and there is nothing like this. Is there any way you can help me?@@volkovlabs

  • @renobodyrenobody
    @renobodyrenobody Год назад +2

    Thanks. Anyway... There is a problem with the version. Right now only v3.1 of your plugin is available.

    • @volkovlabs
      @volkovlabs  Год назад

      We just released a new version 3.2.0/3.2.1 and submitted to Grafana for Review. It will appear in the Grafana Catalog after review. Meanwhile, you can download from GitHub.

    • @renobodyrenobody
      @renobodyrenobody Год назад +1

      @@volkovlabs Still not here in Grafana.

    • @volkovlabs
      @volkovlabs  Год назад

      Plugin was updated. You should be able to install it from the Grafana Catalog.

  • @Matt-n9l1l
    @Matt-n9l1l Год назад +1

    This is an amazing tool! How would I go about using it to create a new record rather than updating an existing record? I would like to display a running log in Grafana and give the user the opportunity to add a new event record to the log.

    • @volkovlabs
      @volkovlabs  Год назад +1

      Don't use Initial Query, unless you want to popular initial values. Use REST API POST request or Data Source to create a new query in Update Request.

  • @DanielAugusta-d6j
    @DanielAugusta-d6j Год назад +1

    Hi, In Form Elements, if an ID has more than one result, how do I make it show all of them and not just 1?

    • @volkovlabs
      @volkovlabs  Год назад

      Do you use Query, Data Source or REST API? Depends on the request you can look into using Transformations or Custom Requests to merge results.

  • @LuCkY-sq7ge
    @LuCkY-sq7ge 11 месяцев назад +1

    Can i also change a datasource or create a datasource via the data manipulator an grafana api?

    • @volkovlabs
      @volkovlabs  11 месяцев назад

      That's an interesting question. You can use Custom Requests to send POST request to Grafana API as described in documentation. Please share your code if you manage to do it. What is your use case to change datasources?

  • @WasilMasood
    @WasilMasood 11 месяцев назад +1

    Is there a way to include dashboard variables in form elements?

    • @volkovlabs
      @volkovlabs  11 месяцев назад

      There are many ways where variables are supported: volkovlabs.io/plugins/volkovlabs-form-panel/variables/

  • @tetragrammat0n
    @tetragrammat0n Год назад +1

    Does this work for advance filtering the data? I am not looking to update the data but simply get advance conditional based, data type based filtering options for my clickhouse powered huge data tables that I am browsing using grafana

    • @volkovlabs
      @volkovlabs  11 месяцев назад +1

      Yes, you can use Custom Code in the Update Request to update dashboard variables using locationService: volkovlabs.io/plugins/volkovlabs-form-panel/code/#update-variable-after-update-request-to-interact-with-other-panels

    • @volkovlabs
      @volkovlabs  11 месяцев назад

      Also, check out the Variable panel. It supports Tree View, text boxes to update dashboard variables out of the box.

  • @JamesGriffins
    @JamesGriffins Год назад +1

    Does it work with the SQLite plugin ? Because I tried a panel just as you did with a SQLite database and then with a MySQL database, and it only works with the MySQL one

    • @volkovlabs
      @volkovlabs  Год назад +1

      All data sources are the same from the panel's point of view. Support for Data Sources is a new functionality, and we have not tested it against many data sources yet.
      If you see a specific error, please open an issue in GitHub: github.com/VolkovLabs/volkovlabs-form-panel.
      The SQLite data source is a community plugin, and it may be missing the required functionality supported in native MySQL and PostgreSQL data sources.

  • @renobodyrenobody
    @renobodyrenobody Год назад +1

    started to play with it and it's brillant. Thanks a lot

    • @volkovlabs
      @volkovlabs  Год назад

      Glad to hear! Let us know how it goes.

    • @renobodyrenobody
      @renobodyrenobody Год назад +1

      @@volkovlabs Spend the whole on it. It's huge! But there is some things with postgres, like the number values, I don't understand how it works when strings are ok. Also when submit, the page is reloaded... It means if I don't save before, I loose my changes, haha!

    • @volkovlabs
      @volkovlabs  Год назад

      @@renobodyrenobody You don't need to reload the dashboard if you don't need to. You can adjust the Custom Code after the Update request as you need it.
      Regarding numbers, I need more information to understand the issue.
      --
      Mikhail

    • @renobodyrenobody
      @renobodyrenobody Год назад +1

      @@volkovlabs I cannot see the 0 (zero values) using the control : maybe a parameter. So I converted to string and manage the update as I want, cause it's just postgres. I deliver in production today, impatient to show this to colleagues. It's a huge change, so many years using Grafana for showing data and explaining we don't write in database. But now, the control is so good, we can propose some nice user interfaces, we can call a database function and it's built in minutes. A huge save of time.
      BTW the custom code for update is here: where can I avoid a reload for the page after submit?
      const payload = {};
      elements.forEach((element) => {
      if (!element.value) {
      return;
      }
      payload[element.id] = element.value;
      })
      /*return payload;*/
      /**
      * Data Source payload
      */
      return {
      rawSql: `update prom_container_down set b_acquit=${payload.b_acquit}
      where t_instance='${payload.t_instance}'`,
      format: 'table',
      };

    • @volkovlabs
      @volkovlabs  Год назад +1

      @@renobodyrenobody We have an issue opened for the zero values. Will be fixed in the upcoming version: github.com/VolkovLabs/volkovlabs-form-panel/issues/247

  • @roewan90
    @roewan90 Год назад +1

    is it possible to insert multiple records at the same time using this plugin?

    • @volkovlabs
      @volkovlabs  Год назад

      It's possible, just do multiple INSERT queries for the Data Source.

  • @spideysix9
    @spideysix9 6 месяцев назад

    Hi your Data Manipulation plugin has helped me a lot. In my new project i need to insert value to a table in postgres database and that too by defining a function because the values were being inserted as comma separated values. I have defined the function in database and i need to call the function from the plugin. Is there a way to do this? Thanks in advance.

    • @volkovlabs
      @volkovlabs  6 месяцев назад

      You can call any SQL statement in the Update Request. Check out the blog and RUclips video: volkovlabs.io/blog/form-panel-file-upload-20240310/

  • @tomassantos2998
    @tomassantos2998 10 месяцев назад +1

    Hi there. Does it work with SQLite databases? I've tried with an sqlite3 database and the values are not updated. :(

    • @tomassantos2998
      @tomassantos2998 10 месяцев назад +1

      P.s: I think the issue may be only related with the update request payload. But I don't know what else I can do here.

    • @volkovlabs
      @volkovlabs  10 месяцев назад +1

      @@tomassantos2998 Do you use SQLite Data Source? Do you see any errors? All Data sources are the same from the panel point of view and should be supported out of the box.

    • @tomassantos2998
      @tomassantos2998 10 месяцев назад +1

      @@volkovlabs yes, i use SQlite Data Source. When I click on "Submit" button it shows a sucess message but the values are not updated. I tried with MySQL database and worked perfectly, but not with SQLite database. Any suggestion ?

    • @volkovlabs
      @volkovlabs  10 месяцев назад

      @@tomassantos2998 I have not used SQLlite Data Source. I can think of permissions issue to update data, which may not be returned properly from the data source.
      Try to execute the query directly from the Query Editor to check that it's working as expected or from the SQLLite command line using the same user as defined for the data source.
      --
      Mikhail

  • @sugu045
    @sugu045 Год назад +1

    Hi Can get the data present in the Panel using RestAPI without accessing Data source ?

    • @volkovlabs
      @volkovlabs  Год назад

      Yes, this is how the panel was initially developed: volkovlabs.io/plugins/volkovlabs-form-panel/architecture/

  • @generalchris90
    @generalchris90 Год назад +1

    Is there a way to connect input to specific users? For example, individual users could login and vote/comment/submit and it would link to their account? Thanks for your superb videos!!

    • @volkovlabs
      @volkovlabs  Год назад +1

      You can use global variable ${__user.email} or ${__user.login} as Header Parameter to send it in the REST API or use in the Data Source update request.

    • @generalchris90
      @generalchris90 Год назад

      Thank you,@@volkovlabs! We'll give that a try... Y'all are the best!

  • @chillsdreams8878
    @chillsdreams8878 10 месяцев назад +1

    Status: 500. Message: db query error: pq: syntax error at or near "device1" what could be the reason for getting this error . getting this after trying to run the query

    • @volkovlabs
      @volkovlabs  10 месяцев назад

      Did you quote 'device1' as string? Please send the full query to understand the issue. You can see it in the Browser's Network tab or print it out in the Console using: console.warn()

    • @chillsdreams8878
      @chillsdreams8878 10 месяцев назад +1

      @@volkovlabs SELECT min, max, speed FROM configuration WHERE name = '$device'; this is the query i am running as given in the tutorial i have setup variable panel and can see 4 devices in it the error i am facing is with is while executing the query in data manipulation panel setup
      SELECT min, max, speed FROM configuration WHERE name = 'device1'; when i run this query it is running successfully and i can see the selected values in query field inside the form element section

    • @volkovlabs
      @volkovlabs  10 месяцев назад

      @@chillsdreams8878 Could you please open an issue in the Data Manipulation repository with screenshots and details to take a closer look: github.com/VolkovLabs/volkovlabs-form-panel/issues
      --
      Mikhail

    • @chillsdreams8878
      @chillsdreams8878 10 месяцев назад +1

      @@volkovlabs Yes sure i'll do it.

  • @jorgealvarezcabado7997
    @jorgealvarezcabado7997 9 месяцев назад +1

    Hi, thanks for the video!! Do you know if i can execute a script from another machine with this plugin?

    • @volkovlabs
      @volkovlabs  9 месяцев назад

      You can do POST API Request to execute a script.

    • @jorgealvarezcabado7997
      @jorgealvarezcabado7997 9 месяцев назад +1

      @@volkovlabs Do you have any references or documentation?

    • @volkovlabs
      @volkovlabs  9 месяцев назад

      @@jorgealvarezcabado7997 Documentation is here with examples: volkovlabs.io/plugins/volkovlabs-form-panel/

  • @kaioosouza2427
    @kaioosouza2427 Год назад +1

    Does someone know if i can verify if a variable has an specific value to show different data on my panel?

    • @volkovlabs
      @volkovlabs  Год назад +1

      Variable are automatically replaced in the Custom Code. You can add/modify elements following Documentation: volkovlabs.io/plugins/volkovlabs-form-panel/dynamic/
      If you are talking about data from data source or query, then you can use variables there as well.

    • @kaioosouza2427
      @kaioosouza2427 Год назад +1

      ​@@volkovlabsI mean, I want to check if the variable has a specific value to determine which query I am going to display on the panel. I couldn't find any information about it

    • @volkovlabs
      @volkovlabs  Год назад

      @@kaioosouza2427 Could you please open an issue in GitHub and explain in details what you are looking for: github.com/volkovlabs/volkovlabs-form-panel

  • @chandup
    @chandup Год назад +1

    Good topic. Appreciate it! Is it possible to display internal documents (markdown, svg/png images, etc.) links or possible to actually read docs in Grafana itself?

    • @volkovlabs
      @volkovlabs  Год назад

      Are you asking about the Data Manipulation plugin or in general? If in general, then take a look at Base64 image which allows to display images and PDF documents. For markdown, check the Dynamic Text panel.

    • @chandup
      @chandup Год назад +1

      @@volkovlabs thanks for responding. Not Data Manipulation plug-in. In general, if I want to view my internal markdown docs in Grafana just like how I view them as VSCode preview or on browser. Looking for a method to have all docs also within Grafana (both write & view docs).

    • @volkovlabs
      @volkovlabs  Год назад +1

      @@chandup As I mentioned, you can use Dynamic Text panel to display Markdown/ HTML files from any data source. To write docs, you can use Data Manipulation which provides Code Editor similar to VSCode.
      --
      Mikhail

    • @chandup
      @chandup Год назад +1

      @@volkovlabs got it. Thanks for the info! Appreciate it!

    • @volkovlabs
      @volkovlabs  Год назад +1

      @@chandup Share the results when you got it working to highlight in the upcoming blog posts.

  • @susuvlog4707
    @susuvlog4707 Год назад +1

    I use 'mysql workbench' but it doesn't work. please help me.

    • @volkovlabs
      @volkovlabs  Год назад

      Please send us more details.

    • @susuvlog4707
      @susuvlog4707 Год назад +1

      @@volkovlabs I read data from SQL and display on dashboard OK. but can not update new value to SQL. Please help me.

    • @susuvlog4707
      @susuvlog4707 Год назад +1

      @@volkovlabs code update SQL----> rawSql: ' UPDATE kiefel.replace_date SET name = ${payload.name}, date_time = ${payload.date_time} where ID = 1 ', please help me check it

    • @volkovlabs
      @volkovlabs  Год назад

      What is the error? If you followed our tutorial it should work

    • @susuvlog4707
      @susuvlog4707 Год назад

      @@volkovlabs
      - My database:
      CREATE TABLE kiefel.configuration (
      name text,
      max integer not null,
      min integer not null,
      speed integer not null)
      insert into kiefel.configuration values("device1",100,10,11);
      insert into kiefel.configuration values("device2",200,20,22);
      insert into kiefel.configuration values("device3",300,30,33);
      I use mysql workbench .
      code Mysql on dashboard :------> rawSql: 'UPDATE configuration SET min=111, max=222 where speed=22',
      format: 'table',
      when I press button submit on dashboard show up "Values update successful", but i am check my database it not update. please help me.