Multi "Customer" Application dashboard in Grafana

JohnD Blackburn <[email protected]> Mon, 10 Dec 2018 05:57:11 +0000
Newsgroups gmane.network.opennms.general
Message-ID <AM6PR0602MB3381FF068D6C2D65221579D2CBA50@AM6PR0602MB3381.eurprd06.prod.outlook.com>
--===============6996041574778633042==
Content-Language: en-US
Content-Type: multipart/alternative;
	boundary="_000_AM6PR0602MB3381FF068D6C2D65221579D2CBA50AM6PR0602MB3381_"

--_000_AM6PR0602MB3381FF068D6C2D65221579D2CBA50AM6PR0602MB3381_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

I'm trying to set up a dashboard in Grafana to display the statistics for o=
ur application clusters in the context of a customer.

Basically, the Dashboard needs a dropdown to select the customers OpenNMS s=
erver as the datasource, and will display performance metrics for the batch=
 server, online servers (multiple, depending on customer size), services se=
rver and database server.

Each customer has the same set of servers with the only difference in serve=
r names being a 3 character code representing the customer.

I can create 1 dashboard per customer by exporting the JSON from the dashbo=
ard of 1 customer, and updating the 3 character code for each of the server=
s referenced in the dashboard, but I figured that Grafana should be smarter=
 than that and I should be able to get the dashboard to display the custome=
r specific graphs dependant on the datasource specified.

However, I can't figure out how to get Grafana to find the customer specifi=
c server names.

Each server type has a naming convention that is consistent across all cust=
omers, for example, the batch servers would be "batch_cust1", "batch_cust2"=
, etc,  and the online servers would be "online1_cust1", "online2_cust1", "=
online1_cust2", "online2_cust2" etc

I can't find much info on how to variablise node names in Grafana for OpenN=
MS data sources, so I was looking at the "OpenNMS JVM Metrics" dashboard wh=
ich I downloaded from the Grafana site, I can see a variable used to find O=
penNMS servers with a query field "nodeFilter(serviceName like 'OpenNMS-JVM=
')", so attempting to model that format, to get the customer batch server n=
ame, I've created a variable and tried various query options like: "nodeFil=
ter(nodeName like 'batch')", "nodeFilter(nodeName like 'batch%')", "nodeFil=
ter(Label like 'batch')"  However, without any documentation, I'm flying bl=
ind and guessing what I need to configure to get this working.  What do I n=
eed to do to get this working?

If there is a better forum to ask this question, please let me know.

Regards,
John








--_000_AM6PR0602MB3381FF068D6C2D65221579D2CBA50AM6PR0602MB3381_
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Dus-ascii"=
>
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Verdana;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
	{font-family:ABBvoice;
	panose-1:2 13 6 3 2 5 3 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
span.EmailStyle17
	{mso-style-type:personal-compose;
	font-family:"Verdana",sans-serif;
	color:windowtext;
	font-weight:normal;
	font-style:normal;
	text-decoration:none none;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"EN-AU" link=3D"#0563C1" vlink=3D"#954F72">
<div class=3D"WordSection1">
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif">I&#8217;m trying to set up a dashboard in Grafana to display the sta=
tistics for our application clusters in the context of a customer.<o:p></o:=
p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif">Basically, the Dashboard needs a dropdown to select the customers Op=
enNMS server as the datasource, and will display performance metrics for th=
e batch server, online servers (multiple, depending
 on customer size), services server and database server.<o:p></o:p></span><=
/p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif">Each customer has the same set of servers with the only difference i=
n server names being a 3 character code representing the customer.<o:p></o:=
p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif">I can create 1 dashboard per customer by exporting the JSON from the=
 dashboard of 1 customer, and updating the 3 character code for each of the=
 servers referenced in the dashboard, but I figured
 that Grafana should be smarter than that and I should be able to get the d=
ashboard to display the customer specific graphs dependant on the datasourc=
e specified.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif">However, I can&#8217;t figure out how to get Grafana to find the cus=
tomer specific server names.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif">Each server type has a naming convention that is consistent across a=
ll customers, for example, the batch servers would be &#8220;batch_cust1&#8=
221;, &#8220;batch_cust2&#8221;, etc, &nbsp;and the online servers would be
 &#8220;online1_cust1&#8221;, &#8220;online2_cust1&#8221;, &#8220;online1_c=
ust2&#8221;, &#8220;online2_cust2&#8221; etc<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif">I can&#8217;t find much info on how to variablise node names in Graf=
ana for OpenNMS data sources, so I was looking at the &#8220;OpenNMS JVM Me=
trics&#8221; dashboard which I downloaded from the Grafana site,
 I can see a variable used to find OpenNMS servers with a query field &#822=
0;nodeFilter(serviceName like &#8216;OpenNMS-JVM&#8217;)&#8221;, so attempt=
ing to model that format, to get the customer batch server name, I&#8217;ve=
 created a variable and tried various query options like: &#8220;nodeFilter=
(nodeName
 like &#8216;batch&#8217;)&#8221;, &#8220;nodeFilter(nodeName like &#8216;b=
atch%&#8217;)&#8221;, &#8220;nodeFilter(Label like &#8216;batch&#8217;)&#82=
21;&nbsp; However, without any documentation, I&#8217;m flying blind and gu=
essing what I need to configure to get this working.&nbsp; What do I need t=
o do to get this working?<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif">If there is a better forum to ask this question, please let me know.=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif">Regards,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span style=3D"font-family:&quot;Verdana&quot;,sans-=
serif">John<o:p></o:p></span></p>
<p class=3D"MsoNormalCxSpMiddle" style=3D"mso-margin-bottom-alt:auto;mso-ad=
d-space:auto">
<span style=3D"font-size:9.0pt;font-family:&quot;ABBvoice&quot;,sans-serif;=
mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormalCxSpMiddle" style=3D"mso-margin-bottom-alt:auto;mso-ad=
d-space:auto">
<span style=3D"font-size:9.0pt;font-family:&quot;ABBvoice&quot;,sans-serif;=
mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormalCxSpMiddle" style=3D"margin-bottom:13.0pt;mso-add-spac=
e:auto"><span style=3D"font-size:9.0pt;font-family:&quot;ABBvoice&quot;,san=
s-serif;mso-fareast-language:EN-AU"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
</div>
</body>
</html>

--_000_AM6PR0602MB3381FF068D6C2D65221579D2CBA50AM6PR0602MB3381_--


--===============6996041574778633042==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============6996041574778633042==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-discuss mailing list

To *unsubscribe* or change your subscription options, see the bottom of this page:
https://lists.sourceforge.net/lists/listinfo/opennms-discuss
--===============6996041574778633042==--