neuralfraud / grafana-prtg

A PRTG Datasource plugin for Grafana
179 stars 75 forks source link

JSONData Table with ActiveAlarms won't update #51

Closed JohnH77 closed 6 years ago

JohnH77 commented 7 years ago

I see your Sreenshots with Active Alarms Table that is useful for us. I have created a Table with raw Query an JSON Data URI: table.json Query String: content=sensors&columns=objid,downtimesince,device,sensor,lastvalue,status,message,priority&filter_status=5&filter_status image image

The Data in the Table won't update. I see just the Data that were created with the Table.

Did i do something wrong or how do you create the Active Alarms Table?

neuralfraud commented 7 years ago

Get rid of "&filter_status" at the end of your query...you're negating the previous filter

if all you want is down sensors, then only include "&filter_status=5" and ensure the auto refresh is enabled - the only way the data updates is when the panel/dashboard refreshes.

JohnH77 commented 7 years ago

thanks, that was the Problem. If i Refresh the Browser Window, there are new updates but the autorefresh in Grafana Dashboard dont work, so you mean to refresh the Browser Windows/tab?

neuralfraud commented 7 years ago

Auto refresh works just fine - we have dashboards for sFlow traffic stats that refresh every 30 seconds. How did you configure the "cache timeout" in your PRTG datasource setup? it should be about 1 minute - thats long enough to dedupe unnecessary backend requests and ensure dashboards can refresh frequently enough to be useful.

JohnH77 commented 7 years ago

The Configuration image

The Dashboard has three Metrics Graph that works good with grafana autorefresh but the Alarm Table on the same Dashboard dont work, we have to refresh the Browser Tab to refresh the Table. An idea what that can be?

miquelMariano commented 6 years ago

Hi, how to configure json panel exactely? If launch the query to api, I returned data, but if configure new panel, JSON is empty

image

image

Thanks a lot and good job :)

JohnH77 commented 6 years ago

@miquelMariano maybe because you need the content for the Grafana. Something like content=sensors&columns=objid,downtimesince,device,sensor,lastvalue,status,message,priority&filter_status=4

Can you please try the Example with an Dashboard. On my example (Screenshots Above) i have to refresh the Tab in the Browser to see new Json Data. With the auto refresh of Grafana it don't work.

miquelMariano commented 6 years ago

Fine, I try with you query and returns me data :)

Thanks a lot!

JohnH77 commented 6 years ago

@miquelMariano Can you please try the Example with an Dashboard. On my example (Screenshots Above) i have to refresh the Tab in the Browser to see new Json Data. With the auto refresh of Grafana it don't work.

JohnH77 commented 6 years ago

Can somebody please try the Example with an Dashboard or Table Panel. On my example (Screenshots Above) i have to refresh the Tab in the Browser to see new Json Data. With the auto refresh of Grafana it don't work. Even with the Template from Github it dont Work

image

s035t commented 6 years ago

i have the same problem. Table doesn't refresh, only when i refresh the hole page.

JohnH77 commented 6 years ago

@neuralfraud i tried the Dashboards with a default.ini config but have the same issue. The Metrics Graph and Singlestat works fine. Do you have an idea why this not automatically refresh? Grafana v. 4.6.1

maybe you can sent your Table Example that works?

my Table Json

{ "columns": [ { "text": "status_raw", "value": "status_raw" }, { "text": "status", "value": "status" }, { "text": "device", "value": "device" }, { "text": "sensor", "value": "sensor" }, { "text": "downtimesince", "value": "downtimesince" }, { "text": "message_raw", "value": "message_raw" } ], "datasource": null, "fontSize": "90%", "hideTimeOverride": false, "id": 8, "links": [], "minSpan": 1, "pageSize": null, "repeat": null, "scroll": true, "showHeader": true, "sort": { "col": 0, "desc": true }, "span": 12, "styles": [ { "alias": "#", "colorMode": "row", "colors": [ "rgba(50, 172, 45, 0.97)", "rgba(132, 107, 3, 0.89)", "rgba(245, 54, 54, 0.9)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 0, "pattern": "status_raw", "thresholds": [ "4", "5" ], "type": "number", "unit": "short" } ], "targets": [ { "channel": { "name": "" }, "device": { "name": "" }, "errors": {}, "functions": [], "group": { "name": "" }, "hide": false, "options": { "includeDeviceName": false, "includeSensorName": false, "mode": { "name": "Raw", "value": 3 } }, "raw": { "queryString": "content=sensors&columns=objid,downtimesince,device,sensor,lastvalue,status,message,priority&filter_status=5&filter_tags=@tag(-noerror)", "uri": "table.json" }, "refId": "A", "sensor": { "name": "" } }, { "channel": { "name": "" }, "device": { "name": "" }, "errors": {}, "functions": [], "group": { "name": "" }, "options": { "includeDeviceName": false, "includeSensorName": false, "mode": { "name": "Raw", "value": 3 } }, "raw": { "queryString": "content=sensors&columns=objid,downtimesince,device,sensor,lastvalue,status,message,priority&filter_status=4&filter_tags=@tag(-noerror)", "uri": "table.json" }, "refId": "B", "sensor": { "name": "" } } ], "timeFrom": null, "title": "Alarm", "transform": "json", "type": "table" }

JohnH77 commented 6 years ago

i have create a Grafana Playlist and add the Dashboards. With Playlist the Table Data are updated automatically.

I think, i can close here. Thanks @neuralfraud for the PRTG-Grafana Plugin

istvanSA commented 6 years ago

This is closed because it was "fixed" by using an playlist but this is still an issue which i'm running into also the metrics query from prtg works just fine and refreshed but the table doesnt. I'd rather not use a playlist or a forcefull refresh on the page because that makes the screen "blink" on the refresh which is annoying if you use it as a bigscreen and you constantly see the page refresh

olsonnn commented 6 years ago

Same issue here.

ohmar commented 6 years ago

Same issue here. Unfortunate that this was marked as closed.

badbart commented 6 years ago

Same issue here.

scfigg commented 6 years ago

Same here.

BestBackwards commented 6 years ago

Ditto, seems to be the same as #85

bashers222 commented 6 years ago

Same here

stianro commented 6 years ago

Same here :(

BestBackwards commented 6 years ago

@Rozz7niner and everyone else, I'm fairly certain the developer has stopped developing this / caring. So if anyone wants to start developing a new plugin it'd be appreciated.

jhavens12 commented 5 years ago

Same issue

BestBackwards commented 5 years ago

@neuralfraud do you support this plugin anymore? If not please could you delete the repo because it's too buggy for use.

My-Random-Thoughts commented 5 years ago

@neuralfraud do you support this plugin anymore? If not please could you delete the repo because it's too buggy for use.

Unfortunately, there isn't really any alternative (that I have seen)

BestBackwards commented 5 years ago

@neuralfraud do you support this plugin anymore? If not please could you delete the repo because it's too buggy for use.

Unfortunately, there isn't really any alternative (that I have seen)

Well, maybe if we put enough pressure on @PRTG we might get something done?

sroul commented 3 years ago

Hi @JohnH77 ,

could you please share me the Json file of image

the dashboard.

i need the same dashboard for my project for me data are coming in json format. How can i visualize them like table format.(as per the image Above)

JohnH77 commented 3 years ago

Hi @JohnH77 ,

could you please share me the Json file of image

the dashboard.

i need the same dashboard for my project for me data are coming in json format. How can i visualize them like table format.(as per the image Above)

Hi @sroul

its a Table

image

String: content=sensors&columns=objid,downtimesince,device,sensor,lastvalue,status,message,priority&filter_status=5&filter_tags=@tag(-noerror)

String: content=sensors&columns=objid,downtimesince,device,sensor,lastvalue,status,message,priority&filter_status=4&filter_tags=@tag(-noerror)

the Same as export: my Table Json

{ "columns": [ { "text": "status_raw", "value": "status_raw" }, { "text": "status", "value": "status" }, { "text": "device", "value": "device" }, { "text": "sensor", "value": "sensor" }, { "text": "downtimesince", "value": "downtimesince" }, { "text": "message_raw", "value": "message_raw" } ], "datasource": null, "fontSize": "90%", "hideTimeOverride": false, "id": 8, "links": [], "minSpan": 1, "pageSize": null, "repeat": null, "scroll": true, "showHeader": true, "sort": { "col": 0, "desc": true }, "span": 12, "styles": [ { "alias": "#", "colorMode": "row", "colors": [ "rgba(50, 172, 45, 0.97)", "rgba(132, 107, 3, 0.89)", "rgba(245, 54, 54, 0.9)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 0, "pattern": "status_raw", "thresholds": [ "4", "5" ], "type": "number", "unit": "short" } ], "targets": [ { "channel": { "name": "" }, "device": { "name": "" }, "errors": {}, "functions": [], "group": { "name": "" }, "hide": false, "options": { "includeDeviceName": false, "includeSensorName": false, "mode": { "name": "Raw", "value": 3 } }, "raw": { "queryString": "content=sensors&columns=objid,downtimesince,device,sensor,lastvalue,status,message,priority&filter_status=5&filter_tags=@tag(-noerror)", "uri": "table.json" }, "refId": "A", "sensor": { "name": "" } }, { "channel": { "name": "" }, "device": { "name": "" }, "errors": {}, "functions": [], "group": { "name": "" }, "options": { "includeDeviceName": false, "includeSensorName": false, "mode": { "name": "Raw", "value": 3 } }, "raw": { "queryString": "content=sensors&columns=objid,downtimesince,device,sensor,lastvalue,status,message,priority&filter_status=4&filter_tags=@tag(-noerror)", "uri": "table.json" }, "refId": "B", "sensor": { "name": "" } } ], "timeFrom": null, "title": "Alarm", "transform": "json", "type": "table" }

sroul commented 3 years ago

Hi @JohnH77

Thnks for your reply.

But after i wrote the 1st query string i got some json data.

image

please let me know how can i get visualize data like you.

if possible could you please share me the whole json file so that i can import it in the grafana dashboard

benisonj commented 2 years ago

image Try with the transform setting to see in the table.