Giter Site home page Giter Site logo

Comments (5)

MacroPower avatar MacroPower commented on May 20, 2024 1

Hey, could you please try placing an analytics panel on a dashboard and loading it with a network inspector open to see if a request is being attempted?

Using the http_listener is smart but I'm not sure if the JSON data_format will work with the output I'm sending. I might give it a try later this week to see if I can get something working, but I think I will need to change the returned object structure.

from macropower-analytics-panel.

MacroPower avatar MacroPower commented on May 20, 2024 1

Hello @aerosadegh , sorry this took so long. I've just updated the plugin to support Grafana 7, and while I was at it I flattened the output object. This is what the JSON looks like now:

{
 "server": "http://example.com:8080/telegraf",
 "description": "new-dashboard-copy",
 "key": "fCZ4jTmMk",
 "hidden": false,
 "postEnd": true,
 "host": "localhost:3000",
 "update": "",
 "isSignedIn": true,
 "id": 1,
 "login": "admin",
 "email": "admin@localhost",
 "name": "admin",
 "lightTheme": false,
 "orgCount": 1,
 "orgId": 1,
 "orgName": "Main Org.",
 "orgRole": "Admin",
 "isGrafanaAdmin": true,
 "gravatarUrl": "/avatar/46d229b033af06a191ff2267bca9ae56",
 "timezone": "browser",
 "locale": "en-US",
 "helpFlags1": 0,
 "hasEditPermissionInFolders": true,
 "time": 1591727672
}

I'm working on getting together an example Telegraf config to include as well :)

from macropower-analytics-panel.

MacroPower avatar MacroPower commented on May 20, 2024 1

Hello again,

I have added an example telegraf config in a new "example" directory, click here. Please feel free to play around with the options. I have the output set to file, just so it's a bit easier to test:

image

I also added a new option in the plugin's settings to disable cors, but I recommend that you instead solve the problem via putting telegraf behind a reverse proxy with proper certs.

The new version is not on the plugin repo yet, but you can manually grab it here: https://github.com/MacroPower/macropower-analytics-panel/releases/tag/v0.0.3

from macropower-analytics-panel.

aerosadegh avatar aerosadegh commented on May 20, 2024

Thank you again.

I check Console in the Inspect Element:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://example.com:8080/telegraf. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://example.com:8080/telegraf. (Reason: CORS request did not succeed).
Can I fix this problem or you must change something in your plugin?

Exactly!
Your data structure needs to change for me.
When I try to Inject your JSON data-format to InfluxDB , I missed data in "user" field and some other keys.
Could you consider a suitable "line protocol" or other data_format to your plugin?

from macropower-analytics-panel.

MacroPower avatar MacroPower commented on May 20, 2024

Telegraf support is now included in the official release https://grafana.com/grafana/plugins/macropower-analytics-panel

Please open another issue if you have any problems or questions!

from macropower-analytics-panel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.