neuralfraud / grafana-prtg Goto Github PK
View Code? Open in Web Editor NEWA PRTG Datasource plugin for Grafana
A PRTG Datasource plugin for Grafana
I am trying to play around with Templating variables. I created few variables, but it doesn't give me desired result.
I am trying to get a result as shown in the attached image.
I want to get the results by selecting one of the values from Groups -> one of the values from Host -> one of the values from Sensor and finally channel, along with top resources.
My variables give out all the values of each Group, host, sensor and channel.
Can you please explain a bit more about how to use templating variables with images if possible?
Once this works out I wish to pull request and write a detailed explanation about Templating variables :)
Please let me know if you need more information.
Thanks.
With multiple remote probes, the name of the probe should be included in order to make the list more manageable.
Hey,
I have a Bandwidth sensor on my PRTG that gives the traffic from the outside (Internet) to my organization.
Now it's 72,000 kbit\s , when i add this sensor to the grafana i'm not getting the correct value -
I tried to change it to kbit\s and still not the correct value -
I looked at the XML that the PRTG API gives , and it looks like it's the correct value , i thinks it's something in the grafana , i don't know what.
Any idea?
Thanks!
I just installed the 4.0 release yesterday and I'm having to rejigger my dashboards. It just requires touching them to refresh, but what I'm seeing now is that the Host is no longer displayed. I can check "Include Sensor Name" but that just adds the relative sensor name and the actual host is still unclear.
Here's an example graph of multiple servers overlaid on the same graph, with Inc Sensor checked:
lodash has been updated with grafana 4.0
_.map function seems to not work any more. Check lodash dependency
Hello, I have PRTG version 15.3.19.4027+ installed as the latest gives me errors on both a clean installation and upgrades... I have SSL enabled and when I try and set the IP to either local or the IP address or the PRTG server it gives me "HTTP error" not found, is this due to me having SSL enabled?
I have enabled and disabled SSL and i still receive the same error ,when i goto /api i get Not found on the webpage.
Any idea's?
Hi,
When I try to get traffic data from SNMP traffic sensors, I'm getting the value divided by ten.
For example: I'm currently at 1.031.366.613 bits/s on my core router, reported bt PRTG, but the plugin gets 103.136.661 bits/s.
What do you need in order to debug this?
Many thanks!
When adding the data source and selecting the type as "PRTG for Grafana 3" I receive the error "Error loading https://10.0.50.17/public/app/datasource/jasonlashua-prtg-datasource/module.js".
When looking in that folder my module.js file in one more directory in with the "dist" folder not directly in the "jasonlashua-prtg-datasource" folder.
INSIDE THE JASONLASHUA-PRTG-DATASOURCE FOLDER
******@grafana:/usr/share/grafana/public/app/plugins/datasource/jasonlashua-prtg-datasource$ ll
total 24
drwxrwxr-x 4 default default 4096 Aug 27 20:37 ./
drwxr-xr-x 12 root root 4096 Oct 17 10:32 ../
drwxrwxr-x 4 default default 4096 Aug 27 20:37 dist/
-rw-rw-r-- 1 default default 1328 Aug 27 20:37 gruntfile.js
-rw-rw-r-- 1 default default 1084 Aug 27 20:37 package.json
drwxrwxr-x 4 default default 4096 Aug 27 20:37 src/
INSIDE THE DIST FOLDER:
*****@grafana:/usr/share/grafana/public/app/plugins/datasource/jasonlashua-prtg-datasource/dist$ ll
total 160
drwxrwxr-x 4 default default 4096 Aug 27 20:37 ./
drwxrwxr-x 4 default default 4096 Aug 27 20:37 ../
-rw-rw-r-- 1 default default 8865 Aug 27 20:37 datasource.js
-rw-rw-r-- 1 default default 11945 Aug 27 20:37 datasource.js.map
drwxrwxr-x 2 default default 4096 Aug 27 20:37 img/
-rw-rw-r-- 1 default default 1724 Aug 27 20:37 module.js
-rw-rw-r-- 1 default default 1198 Aug 27 20:37 module.js.map
drwxrwxr-x 2 default default 4096 Aug 27 20:37 partials/
-rw-rw-r-- 1 default default 591 Aug 27 20:37 plugin.json
-rw-rw-r-- 1 default default 2604 Aug 27 20:37 PRTAPICore.js
-rw-rw-r-- 1 default default 1433 Aug 27 20:37 PRTAPICore.js.map
-rw-rw-r-- 1 default default 17548 Aug 27 20:37 PRTGAPIService.js
-rw-rw-r-- 1 default default 27884 Aug 27 20:37 PRTGAPIService.js.map
-rw-rw-r-- 1 default default 10722 Aug 27 20:37 query_ctrl.js
-rw-rw-r-- 1 default default 14789 Aug 27 20:37 query_ctrl.js.map
-rw-rw-r-- 1 default default 137 Aug 27 20:37 README.md
-rw-rw-r-- 1 default default 6821 Aug 27 20:37 xmlparser.js
-rw-rw-r-- 1 default default 7978 Aug 27 20:37 xmlparser.js.map
-rw-rw-r-- 1 default default 3787 Aug 27 20:37 XMLtoJSON.xsl
Hi all,
I have a question ?
What is the older version of PRTG to work with this Plug-in ?
Thanks in advance ?
Hello,
I am not geting to configure.
Whem i hit save & test apears:
undefined: undefined
Can anyone help me ?
that's my email: [email protected]
I realy need help guys.
Thank you.
Hello, i have a Problem so add a data source.
i get error:
Connection failed
Could not connect to /api/datasources/proxy/2/status.json?username=mheyder&password=****+&undefined
If i switch the Access to direct i get:
Unknown error
error.config is undefined
Thanks for help!!
I've been trying to get Grafana to connect to my newly updated PRTG installation but I've yet to have luck. For whatever reason I get the following error when testing connectivity within Grafana even with the URL field correctly filled out:
Unknown error
Cannot read property 'url' of undefined
Grafana version is 2.5.0. I tried with 2.6.0 as well with no luck.
In testing beta 3.0, I dropped jasonlashua-prtg-datasource in public/app/plugins/datasource directory
I was able to add the plugin, but it fails to display the configuration of the plugin where we can add login information and URL to the PRTG server.
In PRTG I have a probe per region (North-America, Europe, AFOS etc.), I need to visualize multiple devices from different probes. Unfortunately, I'm unable to select a probe in grafana-prtg. Is there any other way?
EDIT: I found a workaround, by changing the JSON I can request my wanted scope. It won't be shown right under Metrics, but it works. Will set it to solved now :)
Pulled the latest update of the plugin today. When trying to add to grafana as a new datasource I receive the following errors:
Plugin Error
(SystemJS) XHR error (404 Not Found) loading http://192.168.135.71:3000/public/app/plugins/datasource/jasonlashua-prtg-datasource/module.js?bust=1490011140149 Error: XHR error (404 Not Found) loading http://192.168.135.71:3000/public/app/plugins/datasource/jasonlashua-prtg-datasource/module.js?bust=1490011140149 Error loading http://192.168.135.71:3000/public/app/plugins/datasource/jasonlashua-prtg-datasource/module.js
Which makes sense since the module.js file its trying to find is in fact in http://192.168.135.71:3000/public/app/plugins/datasource/jasonlashua-prtg-datasource**/dist/**module.js
Metric scale doesn't do anything.
Implement metric scale factor support (e.g. multiply/divide/invert)
I was just wondering if you could post the queries that you used to create the "Templated Dash 1" template that is in the screenshot. For example, the "PRTG System Status" row. I have been trying to figure it out and can not get it to work. Thanks
Group will not populate, but Host, Sensor, and Channel will. The datasource tests out OK, but I dont get any data.
This is the error when you click into the Group box:
Uncaught TypeError: a.toLowerCase is not a function
at b.matcher (boot.js:8)
at boot.js:8
at Function.grep (boot.js:48)
at b.process (boot.js:8)
at b.h.lookup (boot.js:8)
at HTMLInputElement. (boot.js:8)
at Function.each (boot.js:48)
at na.fn.init.each (boot.js:47)
at na.fn.init.a.fn.typeahead (boot.js:8)
matcher @ boot.js:8
(anonymous) @ boot.js:8
grep @ boot.js:48
process @ boot.js:8
h.lookup @ boot.js:8
(anonymous) @ boot.js:8
each @ boot.js:48
each @ boot.js:47
a.fn.typeahead @ boot.js:8
Is there anything else I can try? Maybe go back a couple of revisions of Grafana? Thanks!
The plugin API for 3.0 has changed. This makes this plugin non-functional past 2.6 in its current state. The plugin needs to be revised to support 3.0.
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
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?
I'm assuming this is an issue with logic somewhere, and it's the same thing that I thought was the issue with the Sensor Factory sensor but it's an actual global problem.
Let's say you structure PRTG into groups that use the actual device names as the group names. The devices within those groups are actually named in accordance with what the device contains (Ethernet Interfaces for example). This is a pretty way to build a sunburst for a large device such as a UCS chassis as an example.
When you have a device with the same name in different groups (either on purpose or by accident) the plugin does not work properly. You'll get a bunch of N/A's in Grafana. Would this a Grafana problem or plugin problem? If it's Grafana well crap. If it's the plugin, would it be possible to differentiate same device names via group location and make sure something unique is supplied to Grafana?
Hi,
I´m running Grafana v3.1.1 and followed your guide. Sadly I´m unable to see PRTG in available datasources.
Any tips?
SNMP Bandwidth sensors do not appear to work with the grafana plugin. Data is not displayed on the graphs.
I do see from previous threads that official support for linux has not been provided and/or tested. However, any information you may be able to provide would be excellent. I have added the repository into the linux directory /var/lib/grafana/plugins/jasonlashua-prtg-datasource. When I restarted grafana, the plugin did show up. When I entered the credentials for the prtg data source I did not receive any errors.
The issue comes into play when I start to create dashboards. When I create a new dashboard, I actually do see the prtg core, probes and sensors as options for selection. So it seems that grafana is able to make a connection to prtg and get that information. However, grafana doesn't actually graph any of the data. Any tips/ideas on what I can do to make this work. Any files I can edit? Or any logs I can look at for errors? Would kindly appreciate any information you can provide.
Data Source was successfully added and the test completes fine.
URL: http://192.168.135.60/api
Access: Proxy
Username: user
Passhash: hash
Cache Timeout: 1
Success
PRTG API version: 17.1.28.1341
However when I try to create a graph and select PRTG as the data source, all of the metric fields only return * as a an option.
If you add a Graphite data source, you get a menu at the end of the query which has a bunch of transformation options (i.e. "Combine", "Transform", "Calculate", etc.). When you add data from PRTG, there is no such menu. Can this be added?
Use case: I'm pulling processor utilizations from a farm and I want to make a chart of the average (i.e. Server1CPU1+Server1CPU2+Server2CPU1+.../(num of CPUs)). I'm pretty new to Grafana, so I don't know if I can just hack this together in the Panel JSON or if the UI is needed for it.
Thanks!
Implement functions for metrics, such as interpolation (max data points), and aggregations, min, max, avg, median, etc.
First of all I would like to thank you neuralfraud for the great work you're doing here!
I hate to post an issue. But, this is something I am really looking forward to. I have just installed Grafana grafana.4.1.2 version and followed all the mentioned steps as per the installation guideline.
The issue I am facing is after adding the PRTG as a new datasource. I am getting a plugin error.
Message:
Unexpected end of input
Stack trace:
SyntaxError: Unexpected end of input
at Object.parse (native)
at new xmlXform (https://host.example.com/public/app/plugins/datasource/PRTG/xmlparser.js?bust=1450216354962:156:17)
at https://host.example.com/public/app/plugins/datasource/PRTG/api_wrapper.js?bust=1450216354962:179:20
at i (https://host.example.com/app/app.a44ece05.js:13:3780)
at https://host.example.com/app/app.a44ece05.js:13:3952
at n.$eval (https://host.example.com/app/app.a44ece05.js:13:11572)
at n.$digest (https://host.example.comapp/app.a44ece05.js:13:10003)
at n.$apply (https://host.example.com/app/app.a44ece05.js:13:11839)
at f (https://host.example.com/app/app.a44ece05.js:12:18511)
at r (https://host.example.com/app/app.a44ece05.js:12:20308)
Anything I can do to help you debug here?
Singlestat panels can be useful for displaying the general status of a sensor. PRTG uses several numeric codes to denote Up, Down, Down (Acknowledged), and others.
Status is part of a sensor, not a channel within a sensor, so it requires a slightly different query. perhaps add a checkbox option?
Caveats: would require you to manually create a "value to text" mapping... but you're sysadmins and you already know what the status codes are.. so no big deal, right?
Hi,
I am getting the following error with all sensors in the latest version of this PRTG plugin
Unknown error: Unauthorized
I have looked and can confirm the username and passhash I am using is correct
Many thanks,
Rob
Templating is broken in the current release.
Support for the Sensor Factory sensor would allow for easier reporting and display of overall device statistics that PRTG is calculating via the sensor's user configurable settings.
Currently the values retrieved from PRTG do not yield any type of data for Grafana to work with. PRTG is supplying the data, but the value returned is always 0 or an error.
Hey,
I have annoying issue -
I have 4 Windows servers that i monitor there Memory usage , for the example i have a server called DC-C01 and server that called Filesrv , the sensor on the filesrv called "% free Filesrv" and on the DC-C01 it's called "% free DC-C01" - (PRTG names)
On the grafana server all the names starts to mismatch and all the servers sensors are called "% free Filesrv" -
It happens with all servers and this is an example for only one mismatch but all servers are saying "% free Filesrv" , i did refresh to the Datasource 10 times , i removed the sensors and created them again, i restarted both servers.
Any ideas?
Thanks!
Color should change when regex or variable is present, however this seems to be broke in the v4.0.0 release
I'm getting a "401: Unauthorized" error when trying to connect to the PRTG API.
I have Grafana and PRTG sitting on the same system, with PRTG using port 80 for access and Grafana using port 8080.
When I try to connect to PRTG from Grafana I keep getting the 401 error regardless of whether I use the account password or the Passhash. I've attached a screenshot of my config, am I missing something? I feel like I've tried every combination imaginable and just cannot get the API to connect. I've also tried using the default prtgadmin account (with password & passhash) with no luck.
Currently, for any group, device and sensor I choose that is under a clustered PRTG group I get no hint which cluster node is actually the one I'm getting my values from.
This is especially important when you're monitoring roundtrip times or latency from different, clustered locations.
It would be great to see the node for any sensor that's under a cluster group.
First of all, thanks for this amazing proyect.
This error is when select a simple metric from prtg: sensor ping.
Thanks !!!
TypeError: Cannot read property 'q' of undefined
at eval (http://127.0.0.1:12345/public/plugins/jasonlashua-prtg-datasource/datasource.js?bust=1485460741385:114:45)
at l (http://127.0.0.1:12345/public/app/boot.js:52:14654)
at Function.Sg [as map] (http://127.0.0.1:12345/public/app/boot.js:53:15348)
at PRTGDataSource.query (http://127.0.0.1:12345/public/plugins/jasonlashua-prtg-datasource/datasource.js?bust=1485460741385:98:42)
at b.issueQueries (http://127.0.0.1:12345/public/app/boot.js:46:4632)
at b.issueQueries (http://127.0.0.1:12345/public/app/boot.js:19:2788)
at g (http://127.0.0.1:12345/public/app/boot.js:42:13902)
at http://127.0.0.1:12345/public/app/boot.js:42:14074
at o.$eval (http://127.0.0.1:12345/public/app/boot.js:42:21715)
at o.$digest (http://127.0.0.1:12345/public/app/boot.js:42:20201)
Graph not working when opening from Different TimeZone
when trying to load a graph that pulling data from PRTG.
example GMT+8 area trying to open from its browser Graph that taken from the PRTG (located on TimeZone GMT+3 its not working.
i need to do last 6 hours and than it will start show me data of the last hour
When the Group and Device filters are empty, or set to "*", the Sensor list is incomplete.
Hi all,
i get this error message when i configure any query :
Grafana version: 2.5.0, commit: v2.5.0+1-g287d8ca
PRTG : PRTG Network Monitor 16.3.25.6072 x64 (Licence FREE 100) (Just for test)
Message:
Unexpected token
in JSON at position 347
Stack trace:
SyntaxError: Unexpected token
in JSON at position 347
at Object.parse (native)
at new xmlXform (http://[IP]:3000/public/app/plugins/datasource/PRTG/xmlparser.js?bust=1473245533497:148:17)
at http://[IP]:3000/public/app/plugins/datasource/PRTG/api_wrapper.js?bust=1473245533497:175:20
at i (http://[IP]:3000/app/app.b4b243aa.js:13:3780)
at http://[IP]:3000/app/app.b4b243aa.js:13:3952
at n.$eval (http://[IP]:3000/app/app.b4b243aa.js:13:11572)
at n.$digest (http://[IP]:3000/app/app.b4b243aa.js:13:10003)
at n.$apply (http://[IP]:3000/app/app.b4b243aa.js:13:11839)
at f (http://[IP]:3000/app/app.b4b243aa.js:12:18511)
at r (http://[IP]:3000/app/app.b4b243aa.js:12:20308
Hello,
Thank you so much for writing this plugin, it really fills a valuable niche I think.
Do you know if the plugin supports HTTPS connectivity to PRTG? I can't seem to get it to work.
However when I set up a dummy PRTG install on HTTP it worked just fine.
Cheers!
So far, the datasource works well. This morning, I created a new dashboard with new graphs. All was well.
I went to another machine and logged in to the Grafana server. When I looked at that dashboard, all the graphs were broken with "err.data undefined" errors. When I went to the datasource to test it, I got an "undefined:undefined" error. Refreshing the pages didn't help.
I eventually tracked it down to the fact that I must view the PRTG web page before it works. Once I see the PRTG web login, refreshing the Grafana dashboards causes them to begin working just fine. I also tested the datasource and it connected fine and gave the version number like it should.
I tried deleting browser data to see if it was a cookie or something, but that didn't change it. I did that, restarted the browser, and everything still worked. I tested under Chrome (latest version) and Firefox (47.0.1).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.