New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Grafana pulling over HTTP status for traffic light indicator

Votes:

0

Your Vote:

Up

Down

I've got Grafana pulling metrics for a dashboard out of PRTG and I'm wanting to setup a traffic light indicator for an HTTP sensor. It looks like the "statustext" on the senor reports Up, Warning, and Down. I'd like to have the traffic light report Up = Green, Warning = Orange, and Down = Red. I can't seem to figure out how to get the metric to pull using any sort of data using the metric type, text, or raw data within Grafana. Any thoughts on how to best pull this off?

grafana prtg sensor

Created on Aug 29, 2018 2:37:52 PM by  jdobbs (0) 1



3 Replies

Votes:

0

Your Vote:

Up

Down

What traffic light javascript/css combination are you using here?


Kind regards,
Stephan Linke, Tech Support Team

Created on Aug 30, 2018 6:57:26 AM by  Stephan Linke [Paessler Support]



Votes:

0

Your Vote:

Up

Down

It's this traffic light plugin over from Grafana:

https://grafana.com/plugins/snuids-trafficlights-panel

Created on Aug 30, 2018 12:50:15 PM by  jdobbs (0) 1



Votes:

0

Your Vote:

Up

Down

Hi,

Well, this is seemingly for Kibana, not PRTG. You might be better off with the SVG Panel plugin and something like this:

SVG code (basically, a traffic light)

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:cc="http://creativecommons.org/ns#"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:svg="http://www.w3.org/2000/svg"
   xmlns="http://www.w3.org/2000/svg"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   height="300"
   width="100"
   version="1.1">
  <defs>
  </defs>
  <g stroke="none">
  <circle r="30" cx="30" cy="30" fill="#888" id='red' />
  <circle r="30" cx="30" cy="100" fill="#888" id='yellow' />
  <circle r="30" cx="30" cy="170" fill="#888"  id='green' />
  </g>
</svg>

Code to change the colors accordingly

$(svgnode).find("#red").attr("fill","#d71920")
$(svgnode).find("#yellow").attr("fill","#ffcb05")
$(svgnode).find("#green").attr("fill","#b4cc38")

If I find the time today, I may come up with a way to make it state dependent, based on the output of getstatus.htm?id=<objid>, but it certainly won't use the PRTG plugin, as I seemingly cannot use the retrieved JSON query from a raw query :/


edit no dice unfortunately, couldn't properly query PRTGs API in the javascript field of the plugin :(


Kind regards,
Stephan Linke, Tech Support Team

Created on Aug 31, 2018 5:59:05 AM by  Stephan Linke [Paessler Support]

Last change on Aug 31, 2018 11:17:13 AM by  Stephan Linke [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.